Affects Version/s: Minecraft 1.14.2, Minecraft 1.14.3 Pre-Release 1, Minecraft 1.14.3 Pre-Release 2, Minecraft 1.14.3 Pre-Release 3, Minecraft 1.14.3 Pre-Release 4, Minecraft 1.14.3, Minecraft 1.14.4 Pre-Release 1, Minecraft 1.14.4 Pre-Release 2, Minecraft 1.14.4 Pre-Release 3, Minecraft 1.14.4 Pre-Release 4, 1.14.4, 19w36a, 19w40a, 19w41a
Fix Version/s: None
Category:Chunk loading, Commands, Entities
Chunk positions of entities are not updated when they are moved to another chunk by /teleport, /data modify or /execute store until entity ticking.
- Reopen the world.
The following warning message is printed, and the level fails to load the entity.
net.minecraft.server.level.ServerLevel#updateChunkPos should be called to update entities among entity sections, but it's not called in the above commands. Entities moved to another chunk will not be re-added to the proper entity section until ServerLevel#tickNonPassenger that includes updateChunkPos is called.
In the reproduction steps, the entity teleported to the chunk [62500, 0] has Pos=[1000000.5d, 0.0d, 0.5d], but it's still in the chunk [0, 0] since the chunk [62500, 0] is not an entity ticking chunk. This inconsistency causes the failure on entity loading.
No inconsistency occurs in /spreadplayers since it calls Entity#teleportToWithTicket on success. Entity#teleportToWithTicket adds a region ticket with level 0, updates tickets, and then calls Entity#teleportTo that includes ServerLevel#updateChunkPos.
- Load the destination chunk.
- Throw an exception and don't move the target entities if the destination chunk is not loaded.