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.
- Create a superflat world with the following preset
- Set the render distance to 6
- Run the following commands
- 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.
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)