Teleporting an entity from another dimension can cause UUID duplication in entity sections
The bug
When teleporting an entity from another dimension, the entity is added to the entity sections in the destination dimension even though there are already entities with the same UUID as the teleported entity.
How to reproduce
- Mark the chunk [0, 0] in the overworld and the end to be force loaded.
/execute in minecraft:overworld run forceload add 0 0
/execute in minecraft:the_end run forceload add 0 0
- Let the overworld be the destination dimension and add an entity with the UUID 0-0-0-0-24ee6.
/execute in minecraft:overworld run summon minecraft:item_frame 0 0 0 {UUID: [I; 0, 0, 0, 151270], Fixed: true, CustomName: '"151270"'} - Let the end be the origin dimension and add an entity with the UUID 0-0-0-0-24ee6.
/execute in minecraft:the_end run summon minecraft:item_frame 0 0 0 {UUID: [I; 0, 0, 0, 151270], Fixed: true, CustomName: '"151270"'} - Teleport the entity in the end to the overworld.
/execute in minecraft:the_end as @e[x=0, y=0, z=0, dx=0] in minecraft:overworld run teleport @s 0 0 0
→ Keeping entity minecraft:item_frame that already exists with UUID 00000000-0000-0000-0000-000000024ee6
- Check entities in the entity sections.
/execute in minecraft:overworld run say @e[x=0, y=0, z=0, dx=0]
→
151270, 151270, the entity in the end is added to the entity sections in the overworld. The entity sections in the overworld now have two entities with the same UUID 0-0-0-0-24ee6.
Code analysis
// net.minecraft.server.level.ServerLevel public void addFromAnotherDimension(Entity entity) { boolean forcedLoading = entity.forcedLoading; entity.forcedLoading = true; // Since this level already has an entity with the same UUID as `entity`, the game warns about UUID duplication and does not add `entity` to this level. this.addWithUUID(entity); entity.forcedLoading = forcedLoading; // However, `entity` is added to the entity sections in this level without UUID check. // UUID duplication in entity sections causes here. this.updateChunkPos(entity); }
Linked Issues
- Fixed
intsuc- 13
- 6
- Confirmed
- Entities
- /teleport UUID dimension entity
1.14.1-pre1 - 1.16.4-pre1
1.14.1-pre1 1.14.1-pre2 1.14.1 1.14.2-pre1 1.14.2-pre2 1.14.2-pre3 1.14.2-pre4 1.14.2 1.14.3-pre1 1.14.3-pre2 1.14.3-pre3 1.14.3-pre4 1.14.3 1.14.4-pre1 1.14.4-pre2 1.14.4-pre3 1.14.4-pre4 1.15.2 20w18a 20w20b 20w21a 1.16-pre5 1.16.1 20w29a 1.16.2-pre1 1.16.2 1.16.3 1.16.4-pre1- 20w45a
Created Issue:
Teleporting entity between dimensions causes data inconsistency between world and chunk section
The bug
Due to UUID collision, teleporting entities back and forth between dimensions in the same tick causes data inconsistency between global entity maps in ServerWorld and entity sections in WorldChunk.
How to reproduce
execute in minecraft:overworld run summon minecraft:armor_stand 0 0 0 {UUIDMost: 0L, UUIDLeast: 0L, Tags: ["A"]} execute in minecraft:the_nether run teleport 0-0-0-0-0 0 0 0 execute in minecraft:overworld run teleport 0-0-0-0-0 0 0 0 function test schedule function test 2t# test.mcfunction say test execute as @e[tag=A] run say found in global ID map execute as 0-0-0-0-0 run say found in global UUID map execute as @e[x=0, y=0, z=0, distance=..1] run say found in chunk sectionsExpected result
All the say commands are printed successfully.
Actual result
[Server] test [Armor Stand] found in global UUID map [Armor Stand] found in chunk sections [Server] test [Armor Stand] found in chunk sectionsIn the same tick, the entity is not found in the global ID map.
After 2 ticks, the entity is not found even in the global UUID map.
The bug
Due to UUID collision, teleporting entities back and forth between dimensions in the same tick causes data inconsistency between global entity maps in ServerWorld and entity sections in WorldChunk.
How to reproduce
execute in minecraft:overworld run summon minecraft:armor_stand 0 0 0 {UUIDMost: 0L, UUIDLeast: 0L, Tags: ["A"]} execute in minecraft:the_nether run teleport 0-0-0-0-0 0 0 0 execute in minecraft:overworld run teleport 0-0-0-0-0 0 0 0 function test schedule function test 2t# test.mcfunction say test execute as @e[tag=A] run say found in global ID map execute as 0-0-0-0-0 run say found in global UUID map execute as @e[x=0, y=0, z=0, distance=..1] run say found in chunk sectionsExpected result
All the say commands are printed successfully.
Actual result
[Server] test [Armor Stand] found in global UUID map [Armor Stand] found in chunk sections [Server] test [Armor Stand] found in chunk sectionsIn the same tick, the entity is not found in the global ID map.
After 2 ticks, the entity is not found even in the global UUID map.
The bug
Due to UUID collision, teleporting entities back and forth between dimensions in the same tick causes data inconsistency between global entity maps in ServerWorld and entity sections in WorldChunk.
How to reproduce
execute in minecraft:overworld run summon minecraft:armor_stand 0 0 0 {UUIDMost: 0L, UUIDLeast: 0L, Tags: ["A"]} execute in minecraft:the_nether run teleport 0-0-0-0-0 0 0 0 execute in minecraft:overworld run teleport 0-0-0-0-0 0 0 0 function test schedule function test 2t# test.mcfunction say test execute as @e[tag=A] run say found in global ID map execute as 0-0-0-0-0 run say found in global UUID map execute as @e[x=0, y=0, z=0, distance=..1] run say found in chunk sectionsExpected result
All the say commands are printed successfully.
Actual result
[Server] test [Armor Stand] found in global UUID map [Armor Stand] found in chunk sections [Server] test [Armor Stand] found in chunk sectionsIn the same tick, the entity is not found in the global ID map.
After 2 ticks, the entity is not found even in the global UUID map.
The bug
Due to UUID collision, teleporting entities back and forth between dimensions in the same tick causes data inconsistency between global entity maps in ServerWorld and entity sections in WorldChunk.
How to reproduce
execute in minecraft:overworld run summon minecraft:armor_stand 0 0 0 {UUIDMost: 0L, UUIDLeast: 0L, Tags: ["MC-151270"]} execute in minecraft:the_nether run teleport 0-0-0-0-0 0 0 0 execute in minecraft:overworld run teleport 0-0-0-0-0 0 0 0 function test schedule function test 2t# test.mcfunction say test execute as @e[tag=MC-151270] run say found in global ID map execute as 0-0-0-0-0 run say found in global UUID map execute as @e[x=0, y=0, z=0, distance=..1] run say found in chunk sectionsExpected result
All the say commands are printed successfully.
Actual result
[Server] test [Armor Stand] found in global UUID map [Armor Stand] found in chunk sections [Server] test [Armor Stand] found in chunk sectionsIn the same tick, the entity is not found in the global ID map.
After 2 ticks, the entity is not found even in the global UUID map.
Teleporting entity between dimensions causes data inconsistency between world andchunksection
Teleporting entity between dimensions causes data inconsistency between world and chunk section
The bug
Due to UUID collision, teleporting entities back and forth between dimensions in the same tick causes data inconsistency between global entity maps in ServerWorld and entity sections in WorldChunk.
How to reproduce
execute in minecraft:overworld run summon minecraft:armor_stand 0 0 0 {UUIDMost: 0L, UUIDLeast: 0L, Tags: ["MC-151270"]} execute in minecraft:the_nether run teleport 0-0-0-0-0 0 0 0 execute in minecraft:overworld run teleport 0-0-0-0-0 0 0 0 execute in minecraft:overworld run function test schedule function test 2t# test.mcfunction say test execute as @e[tag=MC-151270] run say found in global ID map execute as 0-0-0-0-0 run say found in global UUID map execute as @e[x=0, y=0, z=0, distance=..1] run say found in chunk sectionsExpected result
All the say commands are printed successfully.
Actual result
[Server] test [Armor Stand] found in global UUID map [Armor Stand] found in chunk sections [Server] test [Armor Stand] found in chunk sectionsIn the same tick, the entity is not found in the global ID map.
After 2 ticks, the entity is not found even in the global UUID map.
The bug
Due to UUID collision, teleporting entities back and forth between dimensions in the same tick causes data inconsistency between global entity maps in ServerWorld and entity sections in WorldChunk.
How to reproduce
# setup.mcfunction # Loads the destination chunk execute in minecraft:the_nether run setworldspawn 0 0 0
execute in minecraft:overworld run summon minecraft:armor_stand 0 0 0 {UUIDMost: 0L, UUIDLeast: 0L, Tags: ["MC-151270"]} execute in minecraft:the_nether run teleport 0-0-0-0-0 0 0 0 execute in minecraft:overworld run teleport 0-0-0-0-0 0 0 0 execute in minecraft:overworld run function test schedule function test 2t# test.mcfunction say test execute as @e[tag=MC-151270] run say found in global ID map execute as 0-0-0-0-0 run say found in global UUID map execute as @e[x=0, y=0, z=0, distance=..1] run say found in chunk sectionsExpected result
All the say commands are printed successfully.
Actual result
[Server] test [Armor Stand] found in global UUID map [Armor Stand] found in chunk sections [Server] test [Armor Stand] found in chunk sectionsIn the same tick, the entity is not found in the global ID map.
After 2 ticks, the entity is not found even in the global UUID map.
The bug
Due to UUID collision, teleporting entities back and forth between dimensions in the same tick causes data inconsistency between global entity maps in ServerWorld and entity sections in WorldChunk.
How to reproduce
# setup.mcfunction # Loads the destination chunk execute in minecraft:the_nether run setworldspawn 0 0 0
execute in minecraft:overworld run summon minecraft:armor_stand 0 0 0 {UUIDMost: 0L, UUIDLeast: 0L, Tags: ["MC-151270"]} execute in minecraft:the_nether run teleport 0-0-0-0-0 0 0 0 execute in minecraft:overworld run teleport 0-0-0-0-0 0 0 0 execute in minecraft:overworld run function test schedule function test 2t# test.mcfunction say test execute as @e[tag=MC-151270] run say found in global ID map execute as 0-0-0-0-0 run say found in global UUID map execute as @e[x=0, y=0, z=0, distance=..1] run say found in chunk sectionsExpected result
All the say commands are printed successfully.
Actual result
[Server] test [Armor Stand] found in global UUID map [Armor Stand] found in chunk sections [Server] test [Armor Stand] found in chunk sectionsIn the same tick, the entity is not found in the global ID map.
After 2 ticks, the entity is not found even in the global UUID map.
The bug
Due to UUID collision, teleporting entities back and forth between dimensions in the same tick causes data inconsistency between global entity maps in ServerWorld and entity sections in WorldChunk.
How to reproduce
execute in minecraft:overworld run summon minecraft:armor_stand 0 0 0 {UUIDMost: 0L, UUIDLeast: 0L, Tags: ["MC-151270"]} execute in minecraft:the_nether run teleport 0-0-0-0-0 0 0 0 execute in minecraft:overworld run teleport 0-0-0-0-0 0 0 0 execute in minecraft:overworld run function test schedule function test 2t# test.mcfunction say test execute as @e[tag=MC-151270] run say found in global ID map execute as 0-0-0-0-0 run say found in global UUID map execute as @e[x=0, y=0, z=0, distance=..1] run say found in chunk sectionsExpected result
All the say commands are printed successfully.
Actual result
[Server] test [Armor Stand] found in global UUID map [Armor Stand] found in chunk sections [Server] test [Armor Stand] found in chunk sectionsIn the same tick, the entity is not found in the global ID map.
After 2 ticks, the entity is not found even in the global UUID map.
The bug
Teleporting entities back and forth between dimensions in the same tick causes data inconsistency between global entity maps in ServerWorld and entity sections in WorldChunk.
How to reproduce
Make sure that the original dimension comes after the destination dimension in the world identity hash map in MinecraftServer.
execute in minecraft:overworld run summon minecraft:armor_stand 0 0 0 {UUIDMost: 0L, UUIDLeast: 0L, Tags: ["MC-151270"]} execute in minecraft:the_nether run teleport 0-0-0-0-0 0 0 0 execute in minecraft:overworld run teleport 0-0-0-0-0 0 0 0 execute in minecraft:overworld run function test schedule function test 2t# test.mcfunction say test execute as @e[tag=MC-151270] run say found in global ID map execute as 0-0-0-0-0 run say found in global UUID map execute as @e[x=0, y=0, z=0, distance=..1] run say found in chunk sectionsExpected result
All the say commands are printed successfully.
Actual result
[Server] test [Armor Stand] found in global UUID map [Armor Stand] found in chunk sections [Server] test [Armor Stand] found in chunk sectionsIn the same tick, the entity is not found in the global ID map.
After 2 ticks, the entity is not found even in the global UUID map.
The bug
Teleporting entities back and forth between dimensions in the same tick causes data inconsistency between global entity maps in ServerWorld and entity sections in WorldChunk.
How to reproduce
Make sure that the original dimension comes after the destination dimension in the world identity hash map in MinecraftServer.
execute in minecraft:overworld run summon minecraft:armor_stand 0 0 0 {UUIDMost: 0L, UUIDLeast: 0L, Tags: ["MC-151270"]} execute in minecraft:the_nether run teleport 0-0-0-0-0 0 0 0 execute in minecraft:overworld run teleport 0-0-0-0-0 0 0 0 execute in minecraft:overworld run function test schedule function test 2t# test.mcfunction say test execute as @e[tag=MC-151270] run say found in global ID map execute as 0-0-0-0-0 run say found in global UUID map execute as @e[x=0, y=0, z=0, distance=..1] run say found in chunk sectionsExpected result
[Server] test [Armor Stand] found in global ID map [Armor Stand] found in global UUID map [Armor Stand] found in chunk sections [Server] test [Armor Stand] found in global ID map [Armor Stand] found in global UUID map [Armor Stand] found in chunk sections
All the say commands are printed successfully.
Actual result
[Server] test [Armor Stand] found in global UUID map [Armor Stand] found in chunk sections [Server] test [Armor Stand] found in chunk sectionsIn the same tick, the entity is not found in the global ID map.
After 2 ticks, the entity is not found even in the global UUID map.
The bug
Teleporting entities back and forth between dimensions in the same tick causes data inconsistency between global entity maps in ServerWorld and entity sections in WorldChunk.
How to reproduce
Make sure that the original dimension comes
after the destination dimension in the world identity hash map inMinecraftServer.execute in minecraft:overworld run summon minecraft:armor_stand 0 0 0 {UUIDMost: 0L, UUIDLeast: 0L, Tags: ["MC-151270"]} execute in minecraft:the_nether run teleport 0-0-0-0-0 0 0 0 execute in minecraft:overworld run teleport 0-0-0-0-0 0 0 0 execute in minecraft:overworld run function test schedule function test 2t# test.mcfunction say test execute as @e[tag=MC-151270] run say found in global ID map execute as 0-0-0-0-0 run say found in global UUID map execute as @e[x=0, y=0, z=0, distance=..1] run say found in chunk sectionsExpected result
[Server] test [Armor Stand] found in global ID map [Armor Stand] found in global UUID map [Armor Stand] found in chunk sections [Server] test [Armor Stand] found in global ID map [Armor Stand] found in global UUID map [Armor Stand] found in chunk sections
All the say commands are printed successfully.
Actual result
[Server] test [Armor Stand] found in global UUID map [Armor Stand] found in chunk sections [Server] test [Armor Stand] found in chunk sectionsIn the same tick, the entity is not found in the global ID map.
After 2 ticks, the entity is not found even in the global UUID map.
The bug
Teleporting entities back and forth between dimensions in the same tick causes data inconsistency between global entity maps in ServerWorld and entity sections in WorldChunk.
How to reproduce
Make sure that the original dimension comes after the destination dimension in the world identity hash map in MinecraftServer.
execute in minecraft:overworld run summon minecraft:armor_stand 0 0 0 {UUIDMost: 0L, UUIDLeast: 0L, Tags: ["MC-151270"]} execute in minecraft:the_nether run teleport 0-0-0-0-0 0 0 0 execute in minecraft:overworld run teleport 0-0-0-0-0 0 0 0 execute in minecraft:overworld run function test schedule function test 2t# test.mcfunction say test execute as @e[tag=MC-151270] run say found in global ID map execute as 0-0-0-0-0 run say found in global UUID map execute as @e[x=0, y=0, z=0, distance=..1] run say found in chunk sectionsExpected result
[Server] test [Armor Stand] found in global ID map [Armor Stand] found in global UUID map [Armor Stand] found in chunk sections [Server] test [Armor Stand] found in global ID map [Armor Stand] found in global UUID map [Armor Stand] found in chunk sections
All the say commands are printed successfully.
Actual result
[Server] test [Armor Stand] found in global UUID map [Armor Stand] found in chunk sections [Server] test [Armor Stand] found in chunk sectionsIn the same tick, the entity is not found in the global ID map.
After 2 ticks, the entity is not found even in the global UUID map.
The bug
Teleporting entities back and forth between dimensions in the same tick causes data inconsistency between global entity maps in ServerWorld and entity sections in WorldChunk.
How to reproduce
Make sure that the original dimension comes after the destination dimension in the world identity hash map in MinecraftServer.
execute in minecraft:overworld run summon minecraft:armor_stand 0 0 0 {UUIDMost: 0L, UUIDLeast: 0L, Tags: ["MC-151270"]} execute in minecraft:the_nether run teleport 0-0-0-0-0 0 0 0 execute in minecraft:overworld run teleport 0-0-0-0-0 0 0 0 execute in minecraft:overworld run function test schedule function test 2t# test.mcfunction say test execute as @e[tag=MC-151270] run say found in global ID map execute as 0-0-0-0-0 run say found in global UUID map execute as @e[x=0, y=0, z=0, distance=..1] run say found in chunk sectionsExpected result
[Server] test [Armor Stand] found in global ID map [Armor Stand] found in global UUID map [Armor Stand] found in chunk sections [Server] test [Armor Stand] found in global ID map [Armor Stand] found in global UUID map [Armor Stand] found in chunk sections
All the say commands are printed successfully.
Actual result
[Server] test [Armor Stand] found in global UUID map [Armor Stand] found in chunk sections [Server] test [Armor Stand] found in chunk sectionsIn the same tick, the entity is not found in the global ID map.
After 2 ticks, the entity is not found even in the global UUID map.
The bug
Teleporting entities back and forth between dimensions in the same tick causes data inconsistency between global entity maps in ServerWorld and entity sections in WorldChunk.
How to reproduce
Make sure that the original dimension comes after the destination dimension in the world identity hash map in MinecraftServer, otherwise restart the server.
execute in minecraft:overworld run summon minecraft:armor_stand 0 0 0 {UUIDMost: 0L, UUIDLeast: 0L, Tags: ["MC-151270"]} execute in minecraft:the_nether run teleport 0-0-0-0-0 0 0 0 execute in minecraft:overworld run teleport 0-0-0-0-0 0 0 0 execute in minecraft:overworld run function test schedule function test 2t# test.mcfunction say test execute as @e[tag=MC-151270] run say found in global ID map execute as 0-0-0-0-0 run say found in global UUID map execute as @e[x=0, y=0, z=0, distance=..1] run say found in chunk sectionsExpected result
[Server] test [Armor Stand] found in global ID map [Armor Stand] found in global UUID map [Armor Stand] found in chunk sections [Server] test [Armor Stand] found in global ID map [Armor Stand] found in global UUID map [Armor Stand] found in chunk sections
All the say commands are printed successfully.
Actual result
[Server] test [Armor Stand] found in global UUID map [Armor Stand] found in chunk sections [Server] test [Armor Stand] found in chunk sectionsIn the same tick, the entity is not found in the global ID map.
After 2 ticks, the entity is not found even in the global UUID map.
The bug
Teleporting entities back and forth between dimensions in the same tick causes data inconsistency between global entity maps in ServerWorld and entity sections in WorldChunk.
How to reproduce
Make sure that the original dimension comes after the destination dimension in the world identity hash map in MinecraftServer
, otherwise restart the server.execute in minecraft:overworld run summon minecraft:armor_stand 0 0 0 {UUIDMost: 0L, UUIDLeast: 0L, Tags: ["MC-151270"]} execute in minecraft:the_nether run teleport 0-0-0-0-0 0 0 0 execute in minecraft:overworld run teleport 0-0-0-0-0 0 0 0 execute in minecraft:overworld run function test schedule function test 2t# test.mcfunction say test execute as @e[tag=MC-151270] run say found in global ID map execute as 0-0-0-0-0 run say found in global UUID map execute as @e[x=0, y=0, z=0, distance=..1] run say found in chunk sectionsExpected result
[Server] test [Armor Stand] found in global ID map [Armor Stand] found in global UUID map [Armor Stand] found in chunk sections [Server] test [Armor Stand] found in global ID map [Armor Stand] found in global UUID map [Armor Stand] found in chunk sections
All the say commands are printed successfully.
Actual result
[Server] test [Armor Stand] found in global UUID map [Armor Stand] found in chunk sections [Server] test [Armor Stand] found in chunk sectionsIn the same tick, the entity is not found in the global ID map.
After 2 ticks, the entity is not found even in the global UUID map.
The bug
Teleporting entities back and forth between dimensions in the same tick causes data inconsistency between global entity maps in ServerWorld and entity sections in WorldChunk.
How to reproduce
Make sure that the original dimension comes after the destination dimension in the world identity hash map in MinecraftServer, otherwise restart the server.
execute in minecraft:overworld run summon minecraft:armor_stand 0 0 0 {UUIDMost: 0L, UUIDLeast: 0L, Tags: ["MC-151270"]} execute in minecraft:the_nether run teleport 0-0-0-0-0 0 0 0 execute in minecraft:overworld run teleport 0-0-0-0-0 0 0 0 execute in minecraft:overworld run function test schedule function test 2t# test.mcfunction say test execute as @e[tag=MC-151270] run say found in global ID map execute as 0-0-0-0-0 run say found in global UUID map execute as @e[x=0, y=0, z=0, distance=..1] run say found in chunk sectionsExpected result
[Server] test [Armor Stand] found in global ID map [Armor Stand] found in global UUID map [Armor Stand] found in chunk sections [Server] test [Armor Stand] found in global ID map [Armor Stand] found in global UUID map [Armor Stand] found in chunk sections
All the say commands are printed successfully.
Actual result
[Server] test [Armor Stand] found in global UUID map [Armor Stand] found in chunk sections [Server] test [Armor Stand] found in chunk sectionsIn the same tick, the entity is not found in the global ID map.
After 2 ticks, the entity is not found even in the global UUID map.
The bug
Teleporting entities back and forth between dimensions in the same tick causes data inconsistency between global entity maps in ServerWorld and entity sections in WorldChunk.
How to reproduce
Make sure that the original dimension comes after the destination dimension in the world identity hash map in MinecraftServer, otherwise restart the server.
execute in minecraft:overworld run summon minecraft:armor_stand 0 0 0 {UUIDMost: 0L, UUIDLeast: 0L, Tags: ["MC-151270"]} execute in minecraft:the_nether run teleport 0-0-0-0-0 0 0 0 execute in minecraft:overworld run teleport 0-0-0-0-0 0 0 0 execute in minecraft:overworld run function test schedule function test 2t# test.mcfunction say test execute as @e[tag=MC-151270] run say found in global ID map execute as 0-0-0-0-0 run say found in global UUID map execute as @e[x=0, y=0, z=0, distance=..1] run say found in chunk sectionsExpected result
[Server] test [Armor Stand] found in global ID map [Armor Stand] found in global UUID map [Armor Stand] found in chunk sections [Server] test [Armor Stand] found in global ID map [Armor Stand] found in global UUID map [Armor Stand] found in chunk sections
All the say commands are printed successfully.
Actual result
[Server] test [Armor Stand] found in global UUID map [Armor Stand] found in chunk sections [Server] test [Armor Stand] found in chunk sectionsIn the same tick, the entity is not found in the global ID map.
After 2 ticks, the entity is not found even in the global UUID map.
The bug
Teleporting entities back and forth between dimensions in the same tick causes data inconsistency between global entity maps in ServerWorld and entity sections in WorldChunk.
How to reproduce
Make sure that the original dimension comes after the destination dimension in the world identity hash map in MinecraftServer, otherwise restart the server.
execute in minecraft:overworld run summon minecraft:armor_stand 0 0 0 {UUIDMost: 0L, UUIDLeast: 0L, Tags: ["MC-151270"]} execute in minecraft:the_nether run teleport 0-0-0-0-0 0 0 0 execute in minecraft:overworld run teleport 0-0-0-0-0 0 0 0 execute in minecraft:overworld run functiontestschedule function test 2t#test.mcfunction say test execute as @e[tag=MC-151270] run say found in global ID map execute as 0-0-0-0-0 run say found in global UUID map execute as @e[x=0, y=0, z=0, distance=..1] run say found inchunksectionsExpected result
[Server] test [Armor Stand] found in global ID map [Armor Stand] found in global UUID map [Armor Stand] found inchunksections[Server] test [Armor Stand] found in global ID map [Armor Stand] found in global UUID map [Armor Stand] found inchunksections
All the say commands are printed successfully.Actual result
[Server] test [Armor Stand] found in global UUID map [Armor Stand] found inchunksections[Server] test [Armor Stand] found inchunksectionsIn the same tick, the entity is not found in the global ID map.
After 2 ticks, the entity is not found even in the global UUID map.
The bug
Teleporting entities back and forth between dimensions in the same tick causes data inconsistency between global entity maps in ServerWorld and entity sections in WorldChunk.
How to reproduce
- Make sure that the original dimension comes after the destination dimension in the world identity hash map in MinecraftServer, otherwise restart the server.
- Run the following command from console.
function 0# 0.mcfunction execute in minecraft:overworld run summon minecraft:armor_stand 0 0 0 {UUIDMost: 0L, UUIDLeast: 0L, Tags: ["MC-151270"]} execute in minecraft:the_nether run teleport 0-0-0-0-0 0 0 0 execute in minecraft:overworld run teleport 0-0-0-0-0 0 0 0 execute in minecraft:overworld run function 0 schedule function test 2t# 1.mcfunction say test execute as @e[tag=MC-151270] run say found in global ID map execute as 0-0-0-0-0 run say found in global UUID map execute as @e[x=0, y=0, z=0, distance=..1] run say found in entity sectionExpected result
[Server] test [Armor Stand] found in global ID map [Armor Stand] found in global UUID map [Armor Stand] found in entity section [Server] test [Armor Stand] found in global ID map [Armor Stand] found in global UUID map [Armor Stand] found in entity sectionThe entity is found in all places.
Actual result
Keeping entity minecraft:armor_stand that already exists with UUID 00000000-0000-0000-0000-000000000000 [Server] test [Armor Stand] found in global UUID map [Armor Stand] found in entity section [Server] test [Armor Stand] found in entity sectionIn the same tick, the entity is not found in the global ID map with a warning about UUID collision. After 2 ticks, the entity is not found even in the global UUID map.
Further issue
Repeating the reproduction step causes entity duplication with the same UUID in the entity section.
Teleporting entity between dimensions causes data inconsistency between world andchunksectionTeleporting entity between dimensions causes data inconsistency between world and entity section
The bug
Teleporting entities back and forth between dimensions in the same tick causes data inconsistency between global entity maps in ServerWorld and entity sections in WorldChunk.
How to reproduce
- Make sure that the original dimension comes after the destination dimension in the world identity hash map in MinecraftServer, otherwise restart the server.
- Run the following command from console.
function 0# 0.mcfunction execute in minecraft:overworld run summon minecraft:armor_stand 0 0 0 {UUIDMost: 0L, UUIDLeast: 0L, Tags: ["MC-151270"]} execute in minecraft:the_nether run teleport 0-0-0-0-0 0 0 0 execute in minecraft:overworld run teleport 0-0-0-0-0 0 0 0 execute in minecraft:overworld run function0schedule functiontest2t# 1.mcfunction say test execute as @e[tag=MC-151270] run say found in global ID map execute as 0-0-0-0-0 run say found in global UUID map execute as @e[x=0, y=0, z=0, distance=..1] run say found in entity sectionExpected result
[Server] test [Armor Stand] found in global ID map [Armor Stand] found in global UUID map [Armor Stand] found in entity section [Server] test [Armor Stand] found in global ID map [Armor Stand] found in global UUID map [Armor Stand] found in entity sectionThe entity is found in all places.
Actual result
Keeping entity minecraft:armor_stand that already exists with UUID 00000000-0000-0000-0000-000000000000 [Server] test [Armor Stand] found in global UUID map [Armor Stand] found in entity section [Server] test [Armor Stand] found in entity sectionIn the same tick, the entity is not found in the global ID map with a warning about UUID collision. After 2 ticks, the entity is not found even in the global UUID map.
Further issue
Repeating the reproduction step causes entity duplication with the same UUID in the entity section.
The bug
Teleporting entities back and forth between dimensions in the same tick causes data inconsistency between global entity maps in ServerWorld and entity sections in WorldChunk.
How to reproduce
- Make sure that the original dimension comes after the destination dimension in the world identity hash map in MinecraftServer, otherwise restart the server.
- Run the following command from console.
function 0# 0.mcfunction execute in minecraft:overworld run summon minecraft:armor_stand 0 0 0 {UUIDMost: 0L, UUIDLeast: 0L, Tags: ["MC-151270"]} execute in minecraft:the_nether run teleport 0-0-0-0-0 0 0 0 execute in minecraft:overworld run teleport 0-0-0-0-0 0 0 0 execute in minecraft:overworld run function 1 schedule function 1 2t# 1.mcfunction say test execute as @e[tag=MC-151270] run say found in global ID map execute as 0-0-0-0-0 run say found in global UUID map execute as @e[x=0, y=0, z=0, distance=..1] run say found in entity sectionExpected result
[Server] test [Armor Stand] found in global ID map [Armor Stand] found in global UUID map [Armor Stand] found in entity section [Server] test [Armor Stand] found in global ID map [Armor Stand] found in global UUID map [Armor Stand] found in entity sectionThe entity is found in all places.
Actual result
Keeping entity minecraft:armor_stand that already exists with UUID 00000000-0000-0000-0000-000000000000 [Server] test [Armor Stand] found in global UUID map [Armor Stand] found in entity section [Server] test [Armor Stand] found in entity sectionIn the same tick, the entity is not found in the global ID map with a warning about UUID collision. After 2 ticks, the entity is not found even in the global UUID map.
Further issue
Repeating the reproduction step causes entity duplication with the same UUID in the entity section.
The bug
Teleporting entities back and forth between dimensions in the same tick causes data inconsistency between global entity maps in ServerWorld and entity sections in WorldChunk.
How to reproduce
- Make sure that the original dimension comes after the destination dimension in the world identity hash map in MinecraftServer, otherwise restart the server.
- Run the following command from console.
function 0# 0.mcfunction execute in minecraft:overworld run summon minecraft:armor_stand 0 0 0 {UUIDMost: 0L, UUIDLeast: 0L, Tags: ["MC-151270"]} execute in minecraft:the_nether run teleport 0-0-0-0-0 0 0 0 execute in minecraft:overworld run teleport 0-0-0-0-0 0 0 0 execute in minecraft:overworld run function 1 schedule function 1 2t# 1.mcfunction say test execute as @e[tag=MC-151270] run say found in global ID map execute as 0-0-0-0-0 run say found in global UUID map execute as @e[x=0, y=0, z=0, distance=..1] run say found in entity sectionExpected result
[Server] test [Armor Stand] found in global ID map [Armor Stand] found in global UUID map [Armor Stand] found in entity section [Server] test [Armor Stand] found in global ID map [Armor Stand] found in global UUID map [Armor Stand] found in entity sectionThe entity is found in all places.
Actual result
Keeping entity minecraft:armor_stand that already exists with UUID 00000000-0000-0000-0000-000000000000 [Server] test [Armor Stand] found in global UUID map [Armor Stand] found in entity section [Server] test [Armor Stand] found in entity sectionIn the same tick, the entity is not found in the global ID map
with a warning about UUID collision. After 2 ticks, the entity is not found even in the global UUID map.Further issue
Repeating the reproduction step causes entity duplication with the same UUID in the entity section.
The bug
Teleporting entities back and forth between dimensions in the same tick causes data inconsistency between global entity maps in ServerWorld and entity sections in WorldChunk.
How to reproduce
- Make sure that the original dimension comes after the destination dimension in the world identity hash map in MinecraftServer, otherwise restart the server.
- Run the following command from console.
function 0# 0.mcfunction execute in minecraft:overworld run summon minecraft:armor_stand 0 0 0 {UUIDMost: 0L, UUIDLeast: 0L, Tags: ["MC-151270"]} execute in minecraft:the_nether run teleport 0-0-0-0-0 0 0 0 execute in minecraft:overworld run teleport 0-0-0-0-0 0 0 0 execute in minecraft:overworld run function 1 schedule function 1 2t# 1.mcfunction say test execute as @e[tag=MC-151270] run say found in global ID map execute as 0-0-0-0-0 run say found in global UUID map execute as @e[x=0, y=0, z=0, distance=..1] run say found in entity sectionExpected result
[Server] test [Armor Stand] found in global ID map [Armor Stand] found in global UUID map [Armor Stand] found in entity section [Server] test [Armor Stand] found in global ID map [Armor Stand] found in global UUID map [Armor Stand] found in entity sectionThe entity is found in all places.
Actual result
Keeping entity minecraft:armor_stand that already exists with UUID 00000000-0000-0000-0000-000000000000 [Server] test [Armor Stand] found in global UUID map [Armor Stand] found in entity section [Server] test [Armor Stand] found in entity sectionIn the same tick, a warning about UUID collision is printed and the entity is not found in the global ID map. After 2 ticks, the entity is not found even in the global UUID map.
Further issue
Repeating the reproduction steps causes entity duplication with the same UUID in the entity section.
The bug
Teleporting entities back and forth between dimensions in the same tick causes data inconsistency between
globalentity maps in ServerWorldand entity sections in WorldChunk.How to reproduce
- Make sure that the original dimension comes after the destination dimension in the world identity hash map in MinecraftServer, otherwise restart the server.
- Run the following command from console.
function 0# 0.mcfunction execute in minecraft:overworld run summon minecraft:armor_stand 0 0 0 {UUIDMost: 0L, UUIDLeast: 0L, Tags: ["MC-151270"]} execute in minecraft:the_nether run teleport 0-0-0-0-0 0 0 0 execute in minecraft:overworld run teleport 0-0-0-0-0 0 0 0 execute in minecraft:overworld run function 1 schedule function 1 2t# 1.mcfunction say test execute as @e[tag=MC-151270] run say found inglobalID map execute as 0-0-0-0-0 run say found inglobalUUID map execute as @e[x=0, y=0, z=0, distance=..1] run say found in entity sectionExpected result
[Server] test [Armor Stand] found inglobalID map [Armor Stand] found inglobalUUID map [Armor Stand] found in entity section [Server] test [Armor Stand] found inglobalID map [Armor Stand] found inglobalUUID map [Armor Stand] found in entity sectionThe entity is found in all places.
Actual result
Keeping entity minecraft:armor_stand that already exists with UUID 00000000-0000-0000-0000-000000000000 [Server] test [Armor Stand] found inglobalUUID map [Armor Stand] found in entity section [Server] test [Armor Stand] found in entity sectionIn the same tick, a warning about UUID collision is printed and the entity is not found in the
globalID map. After 2 ticks, the entity is not found even in theglobalUUID map.Further issue
Repeating the reproduction steps causes entity duplication with the same UUID in the entity section.
The bug
Teleporting entities back and forth between dimensions in the same tick causes data inconsistency between regular entity maps in ServerLevel and entity sections in WorldChunk.
How to reproduce
- Make sure that the original dimension comes after the destination dimension in the world identity hash map in MinecraftServer, otherwise restart the server.
- Run the following command from console.
function 0# 0.mcfunction execute in minecraft:overworld run summon minecraft:armor_stand 0 0 0 {UUIDMost: 0L, UUIDLeast: 0L, Tags: ["MC-151270"]} execute in minecraft:the_nether run teleport 0-0-0-0-0 0 0 0 execute in minecraft:overworld run teleport 0-0-0-0-0 0 0 0 execute in minecraft:overworld run function 1 schedule function 1 2t# 1.mcfunction say test execute as @e[tag=MC-151270] run say found in regular ID map execute as 0-0-0-0-0 run say found in regular UUID map execute as @e[x=0, y=0, z=0, distance=..1] run say found in entity sectionExpected result
[Server] test [Armor Stand] found in regular ID map [Armor Stand] found in regular UUID map [Armor Stand] found in entity section [Server] test [Armor Stand] found in regular ID map [Armor Stand] found in regular UUID map [Armor Stand] found in entity sectionThe entity is found in all places.
Actual result
Keeping entity minecraft:armor_stand that already exists with UUID 00000000-0000-0000-0000-000000000000 [Server] test [Armor Stand] found in regular UUID map [Armor Stand] found in entity section [Server] test [Armor Stand] found in entity sectionIn the same tick, a warning about UUID collision is printed and the entity is not found in the regular ID map. After 2 ticks, the entity is not found even in the regular UUID map.
Further issue
Repeating the reproduction steps causes entity duplication with the same UUID in the entity section.
The bug
Teleporting entities back and forth between dimensions in the same tick causes data inconsistency between regular entity maps in ServerLevel and entity sections in WorldChunk.
How to reproduce
- Make sure that the original dimension comes after the destination dimension in the
worldidentity hash map in MinecraftServer, otherwise restart the server.- Run the following command from console.
function 0# 0.mcfunction execute in minecraft:overworld run summon minecraft:armor_stand 0 0 0 {UUIDMost: 0L, UUIDLeast: 0L, Tags: ["MC-151270"]} execute in minecraft:the_nether run teleport 0-0-0-0-0 0 0 0 execute in minecraft:overworld run teleport 0-0-0-0-0 0 0 0 execute in minecraft:overworld run function 1 schedule function 1 2t# 1.mcfunction say test execute as @e[tag=MC-151270] run say found in regular ID map execute as 0-0-0-0-0 run say found in regular UUID map execute as @e[x=0, y=0, z=0, distance=..1] run say found in entity sectionExpected result
[Server] test [Armor Stand] found in regular ID map [Armor Stand] found in regular UUID map [Armor Stand] found in entity section [Server] test [Armor Stand] found in regular ID map [Armor Stand] found in regular UUID map [Armor Stand] found in entity sectionThe entity is found in all places.
Actual result
Keeping entity minecraft:armor_stand that already exists with UUID 00000000-0000-0000-0000-000000000000 [Server] test [Armor Stand] found in regular UUID map [Armor Stand] found in entity section [Server] test [Armor Stand] found in entity sectionIn the same tick, a warning about UUID collision is printed and the entity is not found in the regular ID map. After 2 ticks, the entity is not found even in the regular UUID map.
Further issue
Repeating the reproduction steps causes entity duplication with the same UUID in the entity section.
The bug
Teleporting entities back and forth between dimensions in the same tick causes data inconsistency between regular entity maps and entity sections.
How to reproduce
- Make sure that the original dimension comes after the destination dimension in the identity hash map of levels in MinecraftServer, otherwise restart the server.
- Run the following command from console.
function 0# 0.mcfunction execute in minecraft:overworld run summon minecraft:armor_stand 0 0 0 {UUIDMost: 0L, UUIDLeast: 0L, Tags: ["MC-151270"]} execute in minecraft:the_nether run teleport 0-0-0-0-0 0 0 0 execute in minecraft:overworld run teleport 0-0-0-0-0 0 0 0 execute in minecraft:overworld run function 1 schedule function 1 2t# 1.mcfunction say test execute as @e[tag=MC-151270] run say found in regular ID map execute as 0-0-0-0-0 run say found in regular UUID map execute as @e[x=0, y=0, z=0, distance=..1] run say found in entity sectionExpected result
[Server] test [Armor Stand] found in regular ID map [Armor Stand] found in regular UUID map [Armor Stand] found in entity section [Server] test [Armor Stand] found in regular ID map [Armor Stand] found in regular UUID map [Armor Stand] found in entity sectionThe entity is found in all places.
Actual result
Keeping entity minecraft:armor_stand that already exists with UUID 00000000-0000-0000-0000-000000000000 [Server] test [Armor Stand] found in regular UUID map [Armor Stand] found in entity section [Server] test [Armor Stand] found in entity sectionIn the same tick, a warning about UUID collision is printed and the entity is not found in the regular ID map. After 2 ticks, the entity is not found even in the regular UUID map.
Further issue
Repeating the reproduction steps causes entity duplication with the same UUID in the entity section.
Teleporting entity between dimensions causes data inconsistency betweenworldand entity sectionTeleporting entity between dimensions causes data inconsistency between level and entity section
The bug
Teleporting entities back and forth between dimensions in the same tick causes data inconsistency between regular entity maps and entity sections.
How to reproduce
- Make sure that the original dimension comes after the destination dimension in the identity hash map of levels in MinecraftServer, otherwise restart the server.
- Run the following command from console.
function0#0.mcfunction execute in minecraft:overworld run summon minecraft:armor_stand 0 0 0 {UUIDMost: 0L, UUIDLeast: 0L,Tags:["MC-151270"]} execute in minecraft:the_nether run teleport 0-0-0-0-0 0 0 0 execute in minecraft:overworld run teleport 0-0-0-0-0 0 0 0 execute in minecraft:overworld run function1schedule function12t#1.mcfunctionsay testexecute as @e[tag=MC-151270] run say found in regular ID map execute as 0-0-0-0-0 run say found in regular UUID map execute as @e[x=0, y=0, z=0, distance=..1] run say found in entity sectionExpected result
[Server] test[Armor Stand] found in regular ID map [Armor Stand] found in regular UUID map [Armor Stand] found in entity section [Server] test[Armor Stand] found in regular ID map [Armor Stand] found in regular UUID map [Armor Stand] found in entity sectionThe entity is found in all places.
Actual result
Keeping entity minecraft:armor_stand that already exists with UUID 00000000-0000-0000-0000-000000000000 [Server] test[Armor Stand] found in regular UUID map [Armor Stand] found in entity section [Server] test[Armor Stand] found in entity sectionIn the same tick, a warning about UUID collision is printed and the entity is not found in the regular ID map. After 2 ticks, the entity is not found even in the regular UUID map.
Further issue
Repeating the reproduction steps causes entity duplication with the same UUID in the entity section.
The bug
Teleporting entities back and forth between dimensions in the same tick causes data inconsistency between regular entity maps and entity sections.
How to reproduce
- Make sure that the original dimension comes after the destination dimension in the identity hash map of levels in MinecraftServer, otherwise restart the server.
- Run the following command from console.
function test_0-1# test_0-1.mcfunction execute in minecraft:overworld run summon minecraft:armor_stand 0 0 0 {UUIDMost: 0L, UUIDLeast: 0L, CustomName: '"MC-151270"'} execute in minecraft:the_nether run teleport 0-0-0-0-0 0 0 0 execute in minecraft:overworld run teleport 0-0-0-0-0 0 0 0 execute in minecraft:overworld run function test schedule function test 2t# test.mcfunction execute as @e[name=MC-151270] run say found in regular ID map execute as 0-0-0-0-0 run say found in regular UUID map execute as @e[x=0, y=0, z=0, distance=..1] run say found in entity sectionExpected results
[Server] test 0: [MC-151270] found in regular ID map [MC-151270] found in regular UUID map [MC-151270] found in entity section [Server] test 1: [MC-151270] found in regular ID map [MC-151270] found in regular UUID map [MC-151270] found in entity section
Test Description 0 The entity is found in the regular maps and the entity section. 1 The entity is found in the regular maps and the entity section. Actual results
Keeping entity minecraft:armor_stand that already exists with UUID 00000000-0000-0000-0000-000000000000 [Server] test 0: [MC-151270] found in regular UUID map [MC-151270] found in entity section [Server] test 1: [MC-151270] found in entity section
Test Description Result 0
- A warning about UUID collision is printed.
- The entity is not found in the regular ID map.
1 The entity is not found even in the regular UUID map. Further issue
Repeating the reproduction steps causes entity duplication with the same UUID in the entity section.
Teleporting entity between dimensions causes data inconsistencybetween level and entity section
The bug
Teleporting entities back and forth between dimensions in the same tick causes data inconsistency between regular entity maps and entity sections.
How to reproduce
- Make sure that the original dimension comes after the destination dimension in the identity hash map of levels in MinecraftServer, otherwise restart the server.
- Run the following command from console.
function test_0-1# test_0-1.mcfunction execute in minecraft:overworld run summon minecraft:armor_stand 0 0 0 {UUIDMost: 0L, UUIDLeast: 0L, CustomName: '"MC-151270"'} execute in minecraft:the_nether run teleport 0-0-0-0-0 0 0 0 execute in minecraft:overworld run teleport 0-0-0-0-0 0 0 0 say test 0: execute in minecraft:overworld run function test say test 1: schedule function test 2t# test.mcfunction execute as @e[name=MC-151270] run say found in regular ID map execute as 0-0-0-0-0 run say found in regular UUID map execute as @e[x=0, y=0, z=0, distance=..1] run say found in entity sectionExpected results
[Server] test 0: [MC-151270] found in regular ID map [MC-151270] found in regular UUID map [MC-151270] found in entity section [Server] test 1: [MC-151270] found in regular ID map [MC-151270] found in regular UUID map [MC-151270] found in entity section
Test Description 0 The entity is found in the regular maps and the entity section. 1 The entity is found in the regular maps and the entity section. Actual results
Keeping entity minecraft:armor_stand that already exists with UUID 00000000-0000-0000-0000-000000000000 [Server] test 0: [MC-151270] found in regular UUID map [MC-151270] found in entity section [Server] test 1: [MC-151270] found in entity section
Test Description Result 0
- A warning about UUID collision is printed.
- The entity is not found in the regular ID map.
1 The entity is not found even in the regular UUID map. Further issue
Repeating the reproduction steps causes entity duplication with the same UUID in the entity section.
The bug
Teleporting entities back and forth between dimensions in the same tick causes data inconsistency
between regular entitymapsand entity sections.How to reproduce
- Make sure that the original dimension comes after the destination dimension in the identity hash map of levels in MinecraftServer, otherwise restart the server.
- Run the following command from console.
function test_0-1# test_0-1.mcfunction execute in minecraft:overworld run summon minecraft:armor_stand 0 0 0 {UUIDMost: 0L, UUIDLeast: 0L,CustomName: '"MC-151270"'} execute in minecraft:the_nether run teleport 0-0-0-0-0 0 0 0 execute in minecraft:overworld run teleport 0-0-0-0-0 0 0 0 say test 0: execute in minecraft:overworld run function test say test 1: schedule function test 2t# test.mcfunction execute as @e[name=MC-151270] run say found in regular ID map execute as 0-0-0-0-0 run say found in regular UUID map execute as @e[x=0, y=0, z=0, distance=..1] run say found in entity sectionExpected results
[Server] test 0: [MC-151270] found in regular ID map [MC-151270] found in regular UUID map [MC-151270] found in entity section [Server] test 1: [MC-151270] found in regular ID map [MC-151270] found in regular UUID map [MC-151270] found in entity section
Test Description 0 The entity is found in the regular maps and the entity section. 1 The entity is found in the regular maps and the entity section. Actual results
Keeping entity minecraft:armor_stand that already exists with UUID 00000000-0000-0000-0000-000000000000[Server] test 0: [MC-151270] found in regularUUID map [MC-151270] found inentity section[Server] test 1: [MC-151270] found inentity section
Test Description Result 0
- A warning about UUID collision is printed.
- The entity is not found in the regular ID map.
1 The entity is not found evenin theregular UUID map.
Further issue
Repeating the reproduction steps causes entity duplication with the same UUID in the entity section.The bug
Teleporting entities back and forth between dimensions in the same tick causes data inconsistency among the regular ID map, the regular UUID map, and entity sections.
How to reproduce
Setup
execute in minecraft:overworld run forceload add 0 0 execute in minecraft:the_nether run forceload add 0 0Case 1
- Make sure that the original dimension ticks before the destination dimension, otherwise restart the server. (overworld -> the_nether)
- Run the following command from console.
function test_0-1Case 2
- Make sure that the original dimension ticks after the destination dimension, otherwise restart the server. (the_nether -> overworld{{}})
- Run the following command from console.
function test_0-1# test_0-1.mcfunction execute in minecraft:overworld run summon minecraft:armor_stand 0 0 0 {UUIDMost: 0L, UUIDLeast: 0L, Marker: true, CustomName: '"MC-151270"'} execute in minecraft:the_nether run teleport 0-0-0-0-0 0 0 0 execute in minecraft:overworld run teleport 0-0-0-0-0 0 0 0 say test 0: execute in minecraft:overworld run function test say test 1: schedule function test 2t# test.mcfunction execute as @e[name=MC-151270] run say found in regular ID map execute as 0-0-0-0-0 run say found in regular UUID map execute as @e[x=0, y=0, z=0, distance=..1] run say found in entity sectionExpected results
[Server] test 0: [MC-151270] found in regular ID map [MC-151270] found in regular UUID map [MC-151270] found in entity section [Server] test 1: [MC-151270] found in regular ID map [MC-151270] found in regular UUID map [MC-151270] found in entity section
Test Description 0 The entity is found in the regular maps and the entity section. 1 The entity is found in the regular maps and the entity section. Actual results
Case 1
[Server] test 0: [MC-151270] found in regular ID map [MC-151270] found in regular UUID map [Server] test 1: [MC-151270] found in regular ID map [MC-151270] found in regular UUID map
Test Description Result 0 The entity is not found in the entity section. ![]()
1 The entity is not found in the entity section.
Case 2
Keeping entity minecraft:armor_stand that already exists with UUID 00000000-0000-0000-0000-000000000000 [Server] test 0: [MC-151270] found in regular UUID map [MC-151270] found in entity section [Server] test 1: [MC-151270] found in entity section
Test Description Result 0 The entity is not found in the regular ID map. 1 The entity is not found even in the regular UUID map. In this case, repeating the reproduction steps causes entity duplication with the same UUID in the entity section.
The bug
Teleporting entities back and forth between dimensions in the same tick causes data inconsistency among the regular ID map, the regular UUID map, and entity sections.
How to reproduce
Setup
execute in minecraft:overworld run forceload add 0 0 execute in minecraft:the_nether run forceload add 0 0Case 1
- Make sure that the original dimension ticks before the destination dimension, otherwise restart the server. (overworld -> the_nether)
- Run the following command from console.
function test_0-1Case 2
- Make sure that the original dimension ticks after the destination dimension, otherwise restart the server. (the_nether -> overworld
{{}})- Run the following command from console.
function test_0-1# test_0-1.mcfunction execute in minecraft:overworld run summon minecraft:armor_stand 0 0 0 {UUIDMost: 0L, UUIDLeast: 0L, Marker: true, CustomName: '"MC-151270"'} execute in minecraft:the_nether run teleport 0-0-0-0-0 0 0 0 execute in minecraft:overworld run teleport 0-0-0-0-0 0 0 0 say test 0: execute in minecraft:overworld run function test say test 1: schedule function test 2t# test.mcfunction execute as @e[name=MC-151270] run say found in regular ID map execute as 0-0-0-0-0 run say found in regular UUID map execute as @e[x=0, y=0, z=0, distance=..1] run say found in entity sectionExpected results
[Server] test 0: [MC-151270] found in regular ID map [MC-151270] found in regular UUID map [MC-151270] found in entity section [Server] test 1: [MC-151270] found in regular ID map [MC-151270] found in regular UUID map [MC-151270] found in entity section
Test Description 0 The entity is found in the regular maps and the entity section. 1 The entity is found in the regular maps and the entity section. Actual results
Case 1
[Server] test 0: [MC-151270] found in regular ID map [MC-151270] found in regular UUID map [Server] test 1: [MC-151270] found in regular ID map [MC-151270] found in regular UUID map
Test Description Result 0 The entity is not found in the entity section. 1 The entity is not found in the entity section.
Case 2
Keeping entity minecraft:armor_stand that already exists with UUID 00000000-0000-0000-0000-000000000000 [Server] test 0: [MC-151270] found in regular UUID map [MC-151270] found in entity section [Server] test 1: [MC-151270] found in entity section
Test Description Result 0 The entity is not found in the regular ID map. 1 The entity is not found even in the regular UUID map. In this case, repeating the reproduction steps causes entity duplication with the same UUID in the entity section.
The bug
Teleporting entities back and forth between dimensions in the same tick causes data inconsistency among the regular ID map, the regular UUID map, and entity sections.
How to reproduce
Setup
execute in minecraft:overworld run forceload add 0 0 execute in minecraft:the_nether run forceload add 0 0Case 1
- Make sure that the original dimension ticks before the destination dimension, otherwise restart the server. (overworld -> the_nether)
- Run the following command from console.
function test_0-1Case 2
- Make sure that the original dimension ticks after the destination dimension, otherwise restart the server. (the_nether -> overworld)
- Run the following command from console.
function test_0-1# test_0-1.mcfunction execute in minecraft:overworld run summon minecraft:armor_stand 0 0 0 {UUIDMost: 0L, UUIDLeast: 0L, Marker: true, CustomName: '"MC-151270"'} execute in minecraft:the_nether run teleport 0-0-0-0-0 0 0 0 execute in minecraft:overworld run teleport 0-0-0-0-0 0 0 0 say test 0: execute in minecraft:overworld run function test say test 1: schedule function test 2t# test.mcfunction execute as @e[name=MC-151270] run say found in regular ID map execute as 0-0-0-0-0 run say found in regular UUID map execute as @e[x=0, y=0, z=0, distance=..1] run say found in entity sectionExpected results
[Server] test 0: [MC-151270] found in regular ID map [MC-151270] found in regular UUID map [MC-151270] found in entity section [Server] test 1: [MC-151270] found in regular ID map [MC-151270] found in regular UUID map [MC-151270] found in entity section
Test Description 0 The entity is found in the regular maps and the entity section. 1 The entity is found in the regular maps and the entity section. Actual results
Case 1
[Server] test 0: [MC-151270] found in regular ID map [MC-151270] found in regular UUID map [Server] test 1: [MC-151270] found in regular ID map [MC-151270] found in regular UUID map
Test Description Result 0 The entity is not found in the entity section. 1 The entity is not found in the entity section.
Case 2
Keeping entity minecraft:armor_stand that already exists with UUID 00000000-0000-0000-0000-000000000000 [Server] test 0: [MC-151270] found in regular UUID map [MC-151270] found in entity section [Server] test 1: [MC-151270] found in entity section
Test Description Result 0 The entity is not found in the regular ID map. 1 The entity is not found even in the regular UUID map.
In this case, repeating the reproduction steps causes entity duplication with the same UUID in the entity section.The bug
Teleporting entities back and forth between dimensions in the same tick causes data inconsistency among the regular ID map, the regular UUID map, and entity sections.
How to reproduce
Setup
execute in minecraft:overworld run forceload add 0 0 execute in minecraft:the_nether run forceload add 0 0Case 1
- Make sure that the original dimension ticks before the destination dimension, otherwise restart the server. (overworld -> the_nether)
- Run the following command from console.
function test_0-1Case 2
- Make sure that the original dimension ticks after the destination dimension, otherwise restart the server. (the_nether -> overworld)
- Run the following command from console.
function test_0-1# test_0-1.mcfunction execute in minecraft:overworld run summon minecraft:armor_stand 0 0 0 {UUIDMost: 0L, UUIDLeast: 0L, Marker: true, CustomName: '"MC-151270"'} execute in minecraft:the_nether run teleport 0-0-0-0-0 0 0 0 execute in minecraft:overworld run teleport 0-0-0-0-0 0 0 0 say test 0: execute in minecraft:overworld run function test say test 1: schedule function test 2t# test.mcfunction execute as @e[name=MC-151270] run say found in regular ID map execute as 0-0-0-0-0 run say found in regular UUID map execute as @e[x=0, y=0, z=0, distance=..1] run say found in entity sectionExpected results
[Server] test 0: [MC-151270] found in regular ID map [MC-151270] found in regular UUID map [MC-151270] found in entity section [Server] test 1: [MC-151270] found in regular ID map [MC-151270] found in regular UUID map [MC-151270] found in entity section
Test Description 0 The entity is found in the regular maps and the entity section. 1 The entity is found in the regular maps and the entity section. Actual results
Case 1
[Server] test 0: [MC-151270] found in regular ID map [MC-151270] found in regular UUID map [Server] test 1: [MC-151270] found in regular ID map [MC-151270] found in regular UUID map
Test Description Result 0 The entity is not found in the entity section. 1 The entity is not found in the entity section. Case 2
Keeping entity minecraft:armor_stand that already exists with UUID 00000000-0000-0000-0000-000000000000 [Server] test 0: [MC-151270] found in regular UUID map [MC-151270] found in entity section [Server] test 1: [MC-151270] found in entity section
Test Description Result 0 The entity is not found in the regular ID map. 1 The entity is not found even in the regular UUID map. Further issue
Repeating the reproduction steps causes entity duplication with the same UUID in the entity section.
The bug
Teleporting entities back and forth between dimensions in the same tick causes data inconsistency among the regular ID map, the regular UUID map, and entity sections.
How to reproduce
Setup
execute in minecraft:overworld run forceload add 0 0 execute in minecraft:the_nether run forceload add 0 0Case 1
- Make sure that the original dimension ticks before the destination dimension, otherwise restart the server. (overworld -> the_nether)
- Run the following command from console.
function test_0-1Case 2
- Make sure that the original dimension ticks after the destination dimension, otherwise restart the server. (the_nether -> overworld)
- Run the following command from console.
function test_0-1# test_0-1.mcfunctionexecute in minecraft:overworld runsummon minecraft:armor_stand 0 0 0 {UUIDMost: 0L, UUIDLeast: 0L, Marker: true, CustomName: '"MC-151270"'} execute in minecraft:the_nether run teleport 0-0-0-0-0 0 0 0execute in minecraft:overworld runteleport 0-0-0-0-0 0 0 0 say test 0:execute in minecraft:overworld runfunction test say test 1: schedule function test 2t# test.mcfunction execute as @e[name=MC-151270] run say found in regular ID map execute as 0-0-0-0-0 run say found in regular UUID map execute as @e[x=0, y=0, z=0, distance=..1] run say found in entity sectionExpected results
[Server] test 0: [MC-151270] found in regular ID map [MC-151270] found in regular UUID map [MC-151270] found in entity section [Server] test 1: [MC-151270] found in regular ID map [MC-151270] found in regular UUID map [MC-151270] found in entity section
Test Description 0 The entity is found in the regular maps and the entity section. 1 The entity is found in the regular maps and the entity section. Actual results
Case 1
[Server] test 0: [MC-151270] found in regular ID map [MC-151270] found in regular UUID map [Server] test 1: [MC-151270] found in regular ID map [MC-151270] found in regular UUID map
Test Description Result 0 The entity is not found in the entity section. 1 The entity is not found in the entity section. Case 2
Keeping entity minecraft:armor_stand that already exists with UUID 00000000-0000-0000-0000-000000000000 [Server] test 0: [MC-151270] found in regular UUID map [MC-151270] found in entity section [Server] test 1: [MC-151270] found in entity section
Test Description Result 0 The entity is not found in the regular ID map. 1 The entity is not found evenin the regularUUIDmap.Further issue
Repeating the reproduction steps causes entity duplication with the same UUID in the entity section.
The bug
Teleporting entities back and forth between dimensions in the same tick causes data inconsistency among the regular ID map, the regular UUID map, and entity sections.
How to reproduce
Setup
execute in minecraft:overworld run forceload add 0 0 execute in minecraft:the_nether run forceload add 0 0Case 1
- Make sure that the original dimension ticks before the destination dimension, otherwise restart the server. (overworld -> the_nether)
- Run the following command from console.
function test_0-1Case 2
- Make sure that the original dimension ticks after the destination dimension, otherwise restart the server. (the_nether -> overworld)
- Run the following command from console.
function test_0-1# test_0-1.mcfunction summon minecraft:armor_stand 0 0 0 {UUIDMost: 0L, UUIDLeast: 0L, Marker: true, CustomName: '"MC-151270"'} execute in minecraft:the_nether run teleport 0-0-0-0-0 0 0 0 teleport 0-0-0-0-0 0 0 0 say test 0: function test say test 1: schedule function test 2t# test.mcfunction execute as @e[name=MC-151270] run say found in regular ID map execute as 0-0-0-0-0 run say found in regular UUID map execute as @e[x=0, y=0, z=0, distance=..1] run say found in entity section [0, 0, 0] in minecraft:overworld execute in minecraft:the_nether as @e[x=0, y=0, z=0, distance=..1] run say found in entity section [0, 0, 0] in minecraft:the_netherExpected results
[Server] test 0: [MC-151270] found in regular ID map [MC-151270] found in regular UUID map [MC-151270] found in entity section [0, 0, 0] in minecraft:overworld [Server] test 1: [MC-151270] found in regular ID map [MC-151270] found in regular UUID map [MC-151270] found in entity section [0, 0, 0] in minecraft:overworld
Test Description 0 The entity is found in the regular maps and the entity section in overworld. 1 The entity is found in the regular maps and the entity section in overworld. Actual results
Case 1
[Server] test 0: [MC-151270] found in regular ID map [MC-151270] found in regular UUID map [MC-151270] found in entity section [0, 0, 0] in minecraft:the_nether [Server] test 1: [MC-151270] found in regular ID map [MC-151270] found in regular UUID map [MC-151270] found in entity section [0, 0, 0] in minecraft:the_nether
Test Description Result 0 The entity is found in the entity section in the_nether rather than overworld. 1 The entity is found in the entity section in the_nether rather than overworld. Case 2
Keeping entity minecraft:armor_stand that already exists with UUID 00000000-0000-0000-0000-000000000000 [Server] test 0: [MC-151270] found in regular UUID map [MC-151270] found in entity section [0, 0, 0] in minecraft:overworld [Server] test 1: [MC-151270] found in entity section [0, 0, 0] in minecraft:overworld
Test Description Result 0 The entity is not found in the regular ID map. 1 The entity is not found in the regular maps. Further issue
Repeating the reproduction steps causes entity duplication with the same UUID in the entity section.
The bug
Teleporting entities back and forth between dimensions in the same tick causes data inconsistency among the regular ID map, the regular UUID map, and entity sections.
How to reproduce
Setup
execute in minecraft:overworld run forceload add 0 0 execute in minecraft:the_nether run forceload add 0 0Case 1
- Make sure that the original dimension ticks before the destination dimension, otherwise restart the server. (overworld -> the_nether)
- Run the following command from console.
function test_0-1Case 2
- Make sure that the original dimension ticks after the destination dimension, otherwise restart the server. (the_nether -> overworld)
- Run the following command from console.
function test_0-1# test_0-1.mcfunction summon minecraft:armor_stand 0 0 0 {UUIDMost: 0L, UUIDLeast: 0L, Marker: true, CustomName: '"MC-151270"'} execute in minecraft:the_nether run teleport 0-0-0-0-0 0 0 0 teleport 0-0-0-0-0 0 0 0 say test 0: function test say test 1: schedule function test 2t# test.mcfunction execute as @e[name=MC-151270] run say found in regular ID map execute as 0-0-0-0-0 run say found in regular UUID map execute as @e[x=0, y=0, z=0, distance=..1] run say found in entity section[0, 0, 0] in minecraft:overworld execute in minecraft:the_nether as @e[x=0, y=0, z=0, distance=..1] run say found in entity section [0, 0, 0] in minecraft:the_netherExpected results
[Server] test 0: [MC-151270] found in regular ID map [MC-151270] found in regular UUID map [MC-151270] found in entity section[0, 0, 0] in minecraft:overworld[Server] test 1: [MC-151270] found in regular ID map [MC-151270] found in regular UUID map [MC-151270] found in entity section[0, 0, 0] in minecraft:overworld
Test Description 0 The entity is found in the regular maps and the entity section in overworld. 1 The entity is found in the regular maps and the entity section in overworld. Actual results
Case 1
[Server] test 0: [MC-151270] found in regular ID map [MC-151270] found in regular UUID map [MC-151270] found in entity section [0, 0, 0] in minecraft:the_nether [Server] test 1: [MC-151270] found in regular ID map [MC-151270] found in regular UUID map [MC-151270] found in entity section [0, 0, 0] in minecraft:the_nether
Test Description Result 0 The entity is found in the entity section in the_nether rather than overworld. 1 The entity is found in the entity section in the_nether rather than overworld. Case 2
Keeping entity minecraft:armor_stand that already exists with UUID 00000000-0000-0000-0000-000000000000 [Server] test 0: [MC-151270] found in regular UUID map [MC-151270] found in entity section[0, 0, 0] in minecraft:overworld[Server] test 1: [MC-151270] found in entity section[0, 0, 0] in minecraft:overworld
Test Description Result 0 The entity is not found in the regular ID map. 1 The entity is not found in the regular maps. Further issue
Repeating the reproduction steps causes entity duplication with the same UUID in the entity section.
The bug
Teleporting entities back and forth between dimensions in the same tick causes data inconsistency among the regular ID map, the regular UUID map, and entity sections.
How to reproduce
- Make sure that the original dimension ticks after the destination dimension, otherwise restart the server. (the_nether -> overworld)
- Run the following command from console.
function test_0-1# test_0-1.mcfunction summon minecraft:armor_stand 0 0 0 {UUIDMost: 0L, UUIDLeast: 0L, Marker: true, CustomName: '"MC-151270"'} execute in minecraft:the_nether run teleport 0-0-0-0-0 0 0 0 teleport 0-0-0-0-0 0 0 0 say test 0: function test say test 1: schedule function test 2t# test.mcfunction execute as @e[name=MC-151270] run say found in regular ID map execute as 0-0-0-0-0 run say found in regular UUID map execute as @e[x=0, y=0, z=0, distance=..1] run say found in entity sectionExpected results
[Server] test 0: [MC-151270] found in regular ID map [MC-151270] found in regular UUID map [MC-151270] found in entity section [Server] test 1: [MC-151270] found in regular ID map [MC-151270] found in regular UUID map [MC-151270] found in entity section
Test Description 0 The entity is found in the regular maps and the entity section. 1 The entity is found in the regular maps and the entity section. Actual results
Keeping entity minecraft:armor_stand that already exists with UUID 00000000-0000-0000-0000-000000000000 [Server] test 0: [MC-151270] found in regular UUID map [MC-151270] found in entity section [Server] test 1: [MC-151270] found in entity section
Test Description Result 0 The entity is not found in the regular ID map. 1 The entity is not found in the regular maps. Further issue
Repeating the reproduction steps causes entity duplication with the same UUID in the entity section.
The bug
Teleporting entities back and forth betweendimensions inthesame tick causes data inconsistency among the regular ID map, the regular UUID map, and entity sections.How to reproduce
- Make sure that the original dimension ticks after the destination dimension, otherwise restart the server. (the_nether -> overworld)
- Run the following command from console.
function test_0-1# test_0-1.mcfunction summon minecraft:armor_stand 0 0 0 {UUIDMost: 0L, UUIDLeast: 0L, Marker: true, CustomName: '"MC-151270"'} execute in minecraft:the_nether run teleport 0-0-0-0-0 0 0 0 teleport 0-0-0-0-0 0 0 0 say test 0: function test say test 1: schedule function test 2t# test.mcfunction execute as @e[name=MC-151270] run say found in regular ID map execute as 0-0-0-0-0 run say found in regular UUID map execute as @e[x=0, y=0, z=0, distance=..1] run say found in entity sectionExpected results
[Server] test 0: [MC-151270] found in regular ID map [MC-151270] found in regular UUID map [MC-151270] found in entity section [Server] test 1: [MC-151270] found in regular ID map [MC-151270] found in regular UUID map [MC-151270] found in entity section
Test Description 0 The entity is found in the regular maps and the entity section. 1 The entity is found in the regular maps and the entity section.
Actual resultsKeeping entity minecraft:armor_stand that already exists with UUID 00000000-0000-0000-0000-000000000000 [Server] test 0: [MC-151270] found in regular UUID map [MC-151270] found in entity section [Server] test 1: [MC-151270] found in entity section
Test Description Result 0 The entity is not found in the regular ID map. 1 The entity is not found in the regular maps. Further issue
Repeating the reproduction steps causes entity duplication with the same UUID in the entity section.
The bug
When teleporting an entity from another dimension, the entity is added to the entity sections in the destination dimension even though there are already entities with the same UUID as the teleported entity.
How to reproduce
- Mark the chunk [0, 0] in the overworld and the end to be force loaded.
/execute in minecraft:overworld run forceload add 0 0
/execute in minecraft:the_end run forceload add 0 0
- Let the overworld be the destination dimension and add an entity with the UUID 0-0-0-0-24ee6.
/execute in minecraft:overworld run summon minecraft:item_frame 0 0 0 {UUID: [I; 0, 0, 0, 151270], Fixed: true, CustomName: '"151270"'}
- Let the end be the origin dimension and add an entity with the UUID 0-0-0-0-24ee6.
/execute in minecraft:the_end run summon minecraft:item_frame 0 0 0 {UUID: [I; 0, 0, 0, 151270], Fixed: true, CustomName: '"151270"'}
- Teleport the entity in the end to the overworld.
/execute in minecraft:the_end as @e[x=0, y=0, z=0, dx=0] in minecraft:overworld run teleport @s 0 0 0→ Keeping entity minecraft:item_frame that already exists with UUID 00000000-0000-0000-0000-000000024ee6
- Check entities in the entity sections.
/execute in minecraft:overworld run say @e[x=0, y=0, z=0, dx=0]→
151270, 151270, the entity in the end is added to the entity sections in the overworld.
Code analysis
// net.minecraft.server.level.ServerLevel public void addFromAnotherDimension(Entity entity) { boolean forcedLoading = entity.forcedLoading; entity.forcedLoading = true; // Since this level already has an entity with the same UUID as `entity`, the game warns about UUID duplication and does not add `entity` to this level. this.addWithUUID(entity); entity.forcedLoading = forcedLoading; // However, `entity` is added to the entity sections in this level without UUID check. // UUID duplication in entity sections causes here. this.updateChunkPos(entity); }
Teleporting entitybetweendimensionscausesdata inconsistencyTeleporting an entity from another dimension causes UUID duplication in entity sections
The bug
When teleporting an entity from another dimension, the entity is added to the entity sections in the destination dimension even though there are already entities with the same UUID as the teleported entity.
How to reproduce
- Mark the chunk [0, 0] in the overworld and the end to be force loaded.
/execute in minecraft:overworld run forceload add 0 0
/execute in minecraft:the_end run forceload add 0 0
- Let the overworld be the destination dimension and add an entity with the UUID 0-0-0-0-24ee6.
/execute in minecraft:overworld run summon minecraft:item_frame 0 0 0 {UUID: [I; 0, 0, 0, 151270], Fixed: true, CustomName: '"151270"'}
- Let the end be the origin dimension and add an entity with the UUID 0-0-0-0-24ee6.
/execute in minecraft:the_end run summon minecraft:item_frame 0 0 0 {UUID: [I; 0, 0, 0, 151270], Fixed: true, CustomName: '"151270"'}
- Teleport the entity in the end to the overworld.
/execute in minecraft:the_end as @e[x=0, y=0, z=0, dx=0] in minecraft:overworld run teleport @s 0 0 0→ Keeping entity minecraft:item_frame that already exists with UUID 00000000-0000-0000-0000-000000024ee6
- Check entities in the entity sections.
/execute in minecraft:overworld run say @e[x=0, y=0, z=0, dx=0]→
151270, 151270, the entity in the end is added to the entity sections in the overworld.
Code analysis
// net.minecraft.server.level.ServerLevel public void addFromAnotherDimension(Entity entity) { boolean forcedLoading = entity.forcedLoading; entity.forcedLoading = true; // Since this level already has an entity with the same UUID as `entity`, the game warns about UUID duplication and does not add `entity` to this level. this.addWithUUID(entity); entity.forcedLoading = forcedLoading; // However, `entity` is added to the entity sections in this level without UUID check. // UUID duplication in entity sections causes here. this.updateChunkPos(entity); }The bug
When teleporting an entity from another dimension, the entity is added to the entity sections in the destination dimension even though there are already entities with the same UUID as the teleported entity.
How to reproduce
- Mark the chunk [0, 0] in the overworld and the end to be force loaded.
/execute in minecraft:overworld run forceload add 0 0 /execute in minecraft:the_end run forceload add 0 0- Let the overworld be the destination dimension and add an entity with the UUID 0-0-0-0-24ee6.
/execute in minecraft:overworld run summon minecraft:item_frame 0 0 0 {UUID: [I; 0, 0, 0, 151270], Fixed: true, CustomName: '"151270"'}- Let the end be the origin dimension and add an entity with the UUID 0-0-0-0-24ee6.
/execute in minecraft:the_end run summon minecraft:item_frame 0 0 0 {UUID: [I; 0, 0, 0, 151270], Fixed: true, CustomName: '"151270"'}- Teleport the entity in the end to the overworld.
/execute in minecraft:the_end as @e[x=0, y=0, z=0, dx=0] in minecraft:overworld run teleport @s 0 0 0→ Keeping entity minecraft:item_frame that already exists with UUID 00000000-0000-0000-0000-000000024ee6
- Check entities in the entity sections.
/execute in minecraft:overworld run say @e[x=0, y=0, z=0, dx=0]→
151270, 151270, the entity in the end is added to the entity sections in the overworld.
Code analysis
// net.minecraft.server.level.ServerLevel public void addFromAnotherDimension(Entity entity) { boolean forcedLoading = entity.forcedLoading; entity.forcedLoading = true; // Since this level already has an entity with the same UUID as `entity`, the game warns about UUID duplication and does not add `entity` to this level. this.addWithUUID(entity); entity.forcedLoading = forcedLoading; // However, `entity` is added to the entity sections in this level without UUID check. // UUID duplication in entity sections causes here. this.updateChunkPos(entity); }
The bug
When teleporting an entity from another dimension, the entity is added to the entity sections in the destination dimension even though there are already entities with the same UUID as the teleported entity.
How to reproduce
- Mark the chunk [0, 0] in the overworld and the end to be force loaded.
/execute in minecraft:overworld run forceload add 0 0 /execute in minecraft:the_end run forceload add 0 0- Let the overworld be the destination dimension and add an entity with the UUID 0-0-0-0-24ee6.
/execute in minecraft:overworld run summon minecraft:item_frame 0 0 0 {UUID: [I; 0, 0, 0, 151270], Fixed: true, CustomName: '"151270"'}- Let the end be the origin dimension and add an entity with the UUID 0-0-0-0-24ee6.
/execute in minecraft:the_end run summon minecraft:item_frame 0 0 0 {UUID: [I; 0, 0, 0, 151270], Fixed: true, CustomName: '"151270"'}- Teleport the entity in the end to the overworld.
/execute in minecraft:the_end as @e[x=0, y=0, z=0, dx=0] in minecraft:overworld run teleport @s 0 0 0→ Keeping entity minecraft:item_frame that already exists with UUID 00000000-0000-0000-0000-000000024ee6
- Check entities in the entity sections.
/execute in minecraft:overworld run say @e[x=0, y=0, z=0, dx=0]→
151270, 151270, the entity in the end is added to the entity sections in the overworld. The entity sections in the overworld now have two entities with the same UUID 0-0-0-0-24ee6.
Code analysis
// net.minecraft.server.level.ServerLevel public void addFromAnotherDimension(Entity entity) { boolean forcedLoading = entity.forcedLoading; entity.forcedLoading = true; // Since this level already has an entity with the same UUID as `entity`, the game warns about UUID duplication and does not add `entity` to this level. this.addWithUUID(entity); entity.forcedLoading = forcedLoading; // However, `entity` is added to the entity sections in this level without UUID check. // UUID duplication in entity sections causes here. this.updateChunkPos(entity); }
relates to
Teleporting an entity from another dimension causesUUID duplication in entity sectionsTeleporting an entity from another dimension can cause UUID duplication in entity sections
The bug
A world can have an entity with the same UUID in each dimension. This causes various issues like MC-151270, MC-153319, MC-184266, or MC-195337.
How to reproduce
- Add an entity with UUID 0-0-0-0-2cfcc in the overworld.
/execute in minecraft:overworld run forceload add 0 0 /execute in minecraft:overworld run summon minecraft:item_frame 0 0 0 {UUID: [I; 0, 0, 0, 184268], Fixed: true} - Add an entity with UUID 0-0-0-0-2cfcc in the nether.
/execute in minecraft:the_nether run forceload add 0 0 /execute in minecraft:the_nether run summon minecraft:item_frame 0 0 0 {UUID: [I; 0, 0, 0, 184268], Fixed: true}→
Summoned new Item Frame
Can you still reproduce this in the latest snapshot?
Yes, this still affects 20w18a.
However, there are a few minor changes affecting the results. Before updating affected versions, I need to rework the description and the reproduction steps focusing on more reproducibility and UUID duplication.
Fixed in 20w45a. When adding an entity, the game now checks the known UUIDs and prints the following warning message if its UUID is duplicated.