mojira.dev
MC-31038

Double-tall plants do not cause updates when broken

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

MC-30349 Anvil and sands floats when double tall grass is destroyed Resolved MC-37924 Sunflower can make gravel float when broken Resolved MC-40491 When placing double tall grass, setting the top block on fire, then destroying it, leaves the light and sound of the fire block. Resolved MC-50159 Floating sand still in 1.8 snapshots Resolved MC-51665 Two High Plant Bug Resolved

Attachments

Comments 18

Confirmed.

Affects 14w04a

Appears to only affect the bottom block since 14w06b.

Confirmed for 14w11b (lower part)

Confirmed for 14w26c

8 more comments

Confirmed for Minecraft Release 1.9

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 for 1.10.2

Please don't fix this bug 😞

Looks like it was 1.13-pre3 :/

Raptor341

(Unassigned)

Confirmed

block-update, falling_block, float, tall_grass

Minecraft 13w37a, Minecraft 13w38a, Minecraft 13w38b, Minecraft 13w38c, Minecraft 13w39a, ..., Minecraft 17w47b, Minecraft 17w50a, Minecraft 18w03b, Minecraft 18w11a, Minecraft 1.13-pre2

Minecraft 1.13-pre3

Retrieved