Tags
Creators
Details
4.1.4
Compatibility
Changes
The bug was caused by calling entity.discard() directly inside the ENTITY_LOAD / EntityJoinLevelEvent handler — the moment a chunk loads an entity into the
world.
At that point, the entity tracker hasn't finished registering the entity yet. It hasn't determined which players are in range, and hasn't sent spawn or
destroy packets to anyone. Discarding the entity in this transitional state could cause the tracker to partially register an already-removed entity — some
clients would receive a spawn packet but never get the matching destroy packet, leaving a ghost entity stuck on their screen that other players can't see.
Fix: Instead of discarding immediately during chunk load, entities are now added to a pendingChunkLoadDiscards list. This list is drained at END_SERVER_TICK, after the entity tracker has had a full tick to sync with all clients. At that point, discard() goes through the normal removal flow and every client gets the destroy packet properly.
Projects on Modrinth are automatically available through a Maven repository for use with JVM build tools such as Gradle. To learn more about the Modrinth Maven API, click here.
Note: When available, you should use the creator's maven repo instead as it will have transitive dependency information that the Modrinth Maven API does not. You may also end up with duplicate dependencies if you use a mix of Modrinth and non-Modrinth Maven repositories for your dependencies, because the group identifier will be different when served through the Modrinth Maven API.
Maven coordinates:
Version ID:
build.gradle:
repositories {
exclusiveContent {
forRepository {
maven {
name = "Modrinth"
url = "https://api.modrinth.com/maven"
}
}
// forRepositories(fg.repository) // Uncomment when using ForgeGradle
filter {
includeGroup "maven.modrinth"
}
}
}
// Standard Gradle dependency
dependencies {
implementation "maven.modrinth:qPJLoYyi:UwYwFtzp"
}
// Legacy Loom dependency
dependencies {
modImplementation "maven.modrinth:qPJLoYyi:UwYwFtzp"
}

