mojira.dev
MC-312597

Rails and corals on honey blocks break when moved by a piston

The bug

When rails and coral placed on top of slime blocks are moved by a piston, they are not destroyed. However, when placed on top of honey blocks, they are destroyed upon movement. This behavior lacks consistency (see attached images).

Related Issues

MC-251040

Linked issues

Attachments

Comments 5

Thank you for helping us improve Minecraft! We saved your files:

[media][media]

Problem verified and confirmed

Following the fix for issue MC-251040 (which now allows for proper positioning on honey blocks), there remains an issue with certain blocks that do not move along with honey blocks; listed below are the blocks that has different behaviors between slime and honey.

- All rail and coral blocks

All other blocks behave the same way when comparing slime to honey.

Code analysis: The reason this happens is because a block’s default “block support shape” is the block’s collision shape. For honey blocks these are not the same shape. MovingPistonBlock inherits the default block support shape definition logic instead of using the moved block’s logic, so it instead uses the honey block’s collision shape as its block support shape. (It never mattered before, because the only two blocks that could push or pull other blocks were (sticky) pistons and slime blocks, where the collision shape matches the support shape.)

Proposed solution: Override getBlockSupportShape in MovingPistonBlock to match the logic of its getCollisionShape method.

Can confirm in 26.4-rc-1.

Robot_005

FiskFille

Community Consensus

Platform EC

Normal

Block states, Redstone

26.4 Snapshot 4, 26.4 Snapshot 5, 26.4 Snapshot 6, 26.4 Snapshot 7, 26.4 Snapshot 8, 26.4 Snapshot 10, 26.4 Pre-Release 1, 26.4 Pre-Release 2, 26.4 Pre-Release 3

Retrieved