The bug
When you place a block that is used to fall (sand, gravel, or anvil) up to a dual grass block or any new plant of two blocks height and break the grass the block just gets stuck when it was supposed to fall.
Code analysis
Code analysis by @unknown can be found in this comment.
Linked issues
is duplicated by 14
relates to 1
Attachments
Comments 18
Please link to this comment in the description
The following is based on a decompiled version of Minecraft 1.9 using MCP 9.24 beta.
It looks like the reason for this are missing block updates. The problem is that currently the class net.minecraft.block.BlockDoublePlant
overrides the method net.minecraft.block.Block.onBlockHarvested(World, BlockPos, IBlockState, EntityPlayer)
, which is called before the block is set to air. Because of this it cannot replace the other plant part with an update. If it would do that the update would cause the harvested part to be detected as incomplete because it was not removed yet.
To solve this the class should probably override the method net.minecraft.block.Block.onBlockDestroyedByPlayer(World, BlockPos, IBlockState)
instead which is called after the block was replaced. Then block updates can be applied without any side effects (hopefully).
Have a look at the method net.minecraft.server.management.PlayerInteractionManager.removeBlock(BlockPos)
to see the order.
Confirmed.