mojira.dev
MC-113880

Items of replaceable blocks appear to successfully replace the same block in the world even though they do not

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

  1. Place a replaceable block, like for example grass (tallgrass)

  2. 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.

Comments 1

Appears to be fixed in 18w03b and possibly earlier

marcono1234

(Unassigned)

Confirmed

block, item, replace, use-item

Minecraft 1.11.2, Minecraft 17w06a, Minecraft 1.12, Minecraft 1.12.2

Minecraft 18w03b

Retrieved