The bug
Items of replaceable blocks like grass (tallgrass
) or snow layers act like you successfully placed them when you right click the block in the world, even though they were not placed.
Note: This does not happen with double plants because they require a block of air above.
How to reproduce
Place a replaceable block, like for example grass (
tallgrass
)Right click on the grass (
tallgrass
) block while holding grass (tallgrass
)
→ Your arms swings indicating that you successfully placed the block even though you did not
Code analysis
Based on 1.11.2 decompiled using MCP 9.35 rc1
The method net.minecraft.item.ItemBlock.onItemUse(EntityPlayer, World, BlockPos, EnumHand, EnumFacing, float, float, float)
returns that the item was successfully used even though it was not successfully placed in the world and therefor not used.
Appears to be fixed in 18w03b and possibly earlier