The Bug
If you place a block which needs support below (e.g. sand, gravel, anvil, dragon egg and scaffolding) at the altitude Y=1 without supporting below, let it fall just 1 block and land on the altitude Y=0, it turns into an item instead of a block.
How to Reproduce
Create a world in the current snapshot
Go to the altitude Y=0
Place such a block at Y=1
When it lands on Y=0, you will notice that it turns into a dropped item
Attachments
Comments 9
Confirmed in 21w43a (and I recall it happening in the v1.18 experimental snapshots as well).
Agreeing with Avoma's description of the intended behavior, as performing an experiment with Pistons at Y=0 and Y=-2 shows that gravity blocks falling to Y=1 and Y=-1 do not break.
Whats happens is basically, the falling block's position is set to -0.00000000000000002777 & Block position is calculated by flooring the position.
So instead of checking if it can land in air, it's checking if it can land in the block below.
Proof:
Create a superflat world
Teleport to [0,6,0]
Run `/fill 2 3 2 -2 0 -2 air`
Run `/fill -2 -1 2 2 -1 -2 bedrock`
Run `/summon minecraft:falling_block 0.4 1 0 {Time:1}` - Observer the bug happen
Run `/setblock 0 -1 0 minecraft:moving_piston `
Run `/summon minecraft:falling_block 0.4 1 0 {Time:1}` - Notice how its not despawning and never will
Falling blocks do not break when in a moving piston. Although this moving piston is 1 block below the falling block
The bug is that falling blocks at Y:0 have the incorrect position, since normal blocks that are flat on the ground stay at a perfect 0
This seems to be a Signed Zero bug + floating-point imprecision. So the solution is most likely to be deflating before reaching this point, so the deflating line is in the wrong position.
I tried this with a full durability anvil. It produces its breaking sounds when it turns into an item, but the anvil itself doesn't actually take damage.
I can confirm this. The expected behavior would be the falling blocks placed at y=1 would not get destroyed when landing at y=0.