Chunks save some scheduled block updates of other chunks causing updates to be performed twice
The bug
Chunks can save some scheduled block update of other chunks in their TileTicks list which are then, once the chunk is loaded, performed too resulting in updates performed twice.
Comments on MC-711 might partwise be describing this bug.
How to reproduce
- Create a superflat world with the following preset
minecraft:sandstone;minecraft:the_void;
- Set the render distance to 6
- Run the following commands
/setworldspawn 100000 0 0 /teleport 110.5 1.0 0.5 /setblock 111 1 0 command_block{Command:"/teleport @p 0 ~ 0 -90 0"} /setblock 110 1 0 stone_button[facing=west] /setblock 110 1 1 dispenser[facing=south]{Items:[{Slot:0b,id:"stone",Count:2b}]} - Press the button
- Move in positive x-direction until you reach the blocks you placed before
→
The dispenser shot out two items
You might have to repeat the reproduction steps multiple times in case the chunk did not unload fast enough.
Code analysis
Based on 1.12.2 decompiled using MCP 9.40
The method net.minecraft.world.WorldServer.getPendingBlockUpdates(Chunk, boolean) creates a bounding box which is extended 2 blocks in the negative x- and z-directions.
It is unclear so far why this was done.
In 19w46b: (Mojang name) net.minecraft.world.level.ServerTickList.fetchTicksInChunk(ChunkPos, boolean, boolean)
Created Issue:
Chunks save some scheduled block updates of other chunks causing updates to be performed twice
The bug
Chunks can save some scheduled block update of other chunks in their TileTicks list which are then, once the chunk is loaded, performed too resulting in updates performed twice.
Comments on MC-711 might partwise be describing this bug.
How to reproduce
- Create a superflat world with the following preset in 1.12.2
3;minecraft:sandstone;127;- Set the render distance to 6
- Run the following commands
/setworldspawn 100000 0 0 /teleport 110.5 1.0 0.5 /setblock 111 1 0 command_block{Command:"/teleport @p 0 ~ 0"} /setblock 110 1 0 stone_button[facing=west] /setblock 110 1 1 dispenser[facing=south]{Items:[{Slot:0b,id:"stone",Count:2b}]}- Press the button
- Move in positive x-direction until you reach the blocks you placed before
→The dispenser shot out two items
You might have to repeat the reproduction steps multiple times in case the chunk did not unload fast enough.
Code analysis
Based on 1.12.2 decompiled using MCP 9.40
The method net.minecraft.world.WorldServer.getPendingBlockUpdates(Chunk, boolean) creates a bounding box which is extended 2 blocks in the negative x- and z-directions.
It is unclear so far why this was done.
The bug
Chunks can save some scheduled block update of other chunks in their TileTicks list which are then, once the chunk is loaded, performed too resulting in updates performed twice.
Comments on MC-711 might partwise be describing this bug.
How to reproduce
- Create a superflat world with the following preset
in1.12.23;minecraft:sandstone;127;- Set the render distance to 6
- Run the following commands
/setworldspawn 100000 0 0 /teleport 110.5 1.0 0.5 /setblock 111 1 0 command_block{Command:"/teleport @p 0 ~ 0"} /setblock 110 1 0 stone_button[facing=west] /setblock 110 1 1 dispenser[facing=south]{Items:[{Slot:0b,id:"stone",Count:2b}]}- Press the button
- Move in positive x-direction until you reach the blocks you placed before
→The dispenser shot out two items
You might have to repeat the reproduction steps multiple times in case the chunk did not unload fast enough.
Code analysis
Based on 1.12.2 decompiled using MCP 9.40
The method net.minecraft.world.WorldServer.getPendingBlockUpdates(Chunk, boolean) creates a bounding box which is extended 2 blocks in the negative x- and z-directions.
It is unclear so far why this was done.The bug
Chunks can save some scheduled block update of other chunks in their TileTicks list which are then, once the chunk is loaded, performed too resulting in updates performed twice.
Comments on MC-711 might partwise be describing this bug.
How to reproduce
- Create a superflat world with the following preset
minecraft:sandstone;minecraft:the_void;- Set the render distance to 6
- Run the following commands
/setworldspawn 100000 0 0 /teleport 110.5 1.0 0.5 /setblock 111 1 0 command_block{Command:"/teleport @p 0 ~ 0 -90 0"} /setblock 110 1 0 stone_button[facing=west] /setblock 110 1 1 dispenser[facing=south]{Items:[{Slot:0b,id:"stone",Count:2b}]}- Press the button
- Move in positive x-direction until you reach the blocks you placed before
→The dispenser shot out two items
You might have to repeat the reproduction steps multiple times in case the chunk did not unload fast enough.
Code analysis
Based on 1.12.2 decompiled using MCP 9.40
The method net.minecraft.world.WorldServer.getPendingBlockUpdates(Chunk, boolean) creates a bounding box which is extended 2 blocks in the negative x- and z-directions.
It is unclear so far why this was done.In 19w46b: (Mojang name) net.minecraft.world.level.ServerTickList.fetchTicksInChunk(ChunkPos, boolean, boolean)
The bug
While performing the reproduction steps for MC-123696 the game logged the following error multiple times:
Unknown tag: aew@1c69c647
(aew being net.minecraft.tags.SetTag, Mojang name)
Logger name: cwa (net.minecraft.world.level.levelgen.structure.PoolElementStructurePiece, Mojang name)
Logging thread: Server thread
I do not know how to reproduce this. The same error message is logged when reproducing MC-202186, therefore these bugs might be related.
@[Helper] pine1needle, I did not notice the errors right away but based on the other logged messages I assumed it had happened while reproducing MC-123696. However, the reproduction steps for MC-123696 use a the_void superflat world so there should not have been any zombie villages.
But thanks for pointing out that the same error message appeared for MC-202186. I will mark the reports as related.
I found a seed that generates a zombie village for the superflat settings in MC-123696. (I found the seed via this reddit post which uses an older version and different superflat settings, but I confirmed that it works in 20w51a with the superflat settings from MC-123696.)
Superflat Preset
minecraft:sandstone;minecraft:the_void;
Seed
63486455778136911
Coordinates
/execute in minecraft:overworld run tp @s 61.37 1.00 -118.53 -878.55 -6.45
Furthermore, the village is so close to spawn that the errors are logged immediately upon joining the world (for the first time) instead of waiting until the player pauses the game.
I can reproduce this in 1.13, but can't in 19w46b. The method ServerTickList.fetchTicksInChunk extends the bounding box by 2 blocks, however I am not familiar enough with the new chunk loading code to be able to tell if this method is actually called, or if a ChunkTickList is used to write the pending ticks in which case the reproduction steps won't work.
MC-165768also makes reproducing this slightly harder.I would like to leave the report open anyways since there is still this suspicious method.
@Marcono1234 this still happens in 20w27a or not?
I still cannot reproduce this anymore in 20w28a but as stated above, it would be good if a developer confirmed that the code behaves as intended.
Oh, okay