mojira.dev
MC-69876

Pistons at Y=1 do not push downwards / at Y=254 do not push upwards

The bug

A piston placed at Y=1 will not push downwards. This also happens at Y=254 with an upward facing piston.

Code analysis

Based on 1.11 decompiled using MCP 9.35 rc1

The method net.minecraft.block.BlockPistonBase.canPush(IBlockState, World, BlockPos, EnumFacing, boolean) allows piston movement only if the piston is not facing downwards or the potential block to move is not at y 0. It should allow piston movement as well if the block is air or has EnumPushReaction.DESTROY as push reaction.

Linked issues

Comments 13

WAI. This is so pistons don't push blocks into the void or the height limit (which will disappear).

No, it could still do that if you just put it at Y=2 and have it push 2 blocks in a row. If you do that, it just won't extend, and that's what should happen at Y=1.

confirmed for 1.8.7

Is this still an issue in the latest snapshot 16w44a? If so please update the affected versions.

This is an automated comment on any open or reopened issue with out-of-date affected versions.

3 more comments

Affects 20w18a, can I request ownership?

Done, as @unknown hasn't been active since 2017.

Confirmed in 1.16-pre5.

Confirmed/Reproduced in 20w28a.

Even though I obviously already had 20w28a marked as affected?

KingSupernova

muzikbike

Felix Jones

Confirmed

(Unassigned)

Minecraft 1.8-pre3, Minecraft 1.8, Minecraft 1.8.7, Minecraft 15w36d, Minecraft 16w35a, ..., 1.16.1, 20w28a, 20w29a, 20w30a, 1.16.2 Pre-release 1

1.16.2 Pre-release 2

Retrieved