Mojira Archive
MC-112891

Falling block entity drops block with metadata of item dropped when block would be mined causing malformed drops

The bug

Dropping a falling block entity causes the generated block item to get the metadata the item, which would be dropped if the block was mined, would have. This causes incorrect or malformed items for blocks which drop a different item with different metadata when mined.

Affected blocks

This lists blocks where this behavior creates incorrect or malformed items.
Last updated for 1.11.2

Lapis ore

Drops the ore block with a metadata value of 4, the value the dye would have to be lapis lazuli.

/summon falling_block ~ ~ ~ {Block:"lapis_ore",Time:1024}
Double tallgrass

Drops a sunflower instead. This happens because when broken by hand it drops wheat seeds with metadata of 0 instead of the double plant item.

/summon falling_block ~ ~ ~ {Block:"double_plant",Time:1024,Data:2b}
Acacia and dark oak leaves

See MC-94830

/summon falling_block ~ ~ ~ {Block:"leaves2",Time:1024,Data:0b}

Code analysis

Using MCP mappings for 1.11, though the names should be same for 1.11.2

In EntityFallingBlock.func_70071_h_ (onUpdate), an ItemStack is constructed to drop. The Block of the falling tile is passed, with the meta being set via a call to Block.func_180651_a (damageDropped). In the case of Lapis Ore, the damageDropped call returns a meta value for use with the dye item, since lapis ore drops the dye item. However, here the meta value is paired with an unintended item, the actual block, instead of the dye item, thus resulting in this invalid drop.

Fixed

williewillus

2017-01-28, 01:58 AM

2017-11-24, 08:14 AM

2017-11-24, 08:14 AM

2

2

Confirmed

drop, falling_block, item, item-drops, lapis, leaves, tall_grass

Minecraft 1.11.2 - Minecraft 17w43bMinecraft 1.11.2, Minecraft 17w06a, Minecraft 1.12.1, Minecraft 1.12.2, Minecraft 17w43a, Minecraft 17w43b

Minecraft 17w47a