Don't pillar from carpet/lilypad on water

This commit is contained in:
ZacSharp 2022-09-30 22:38:21 +02:00
parent c14be17e53
commit 3da5bbd267
No known key found for this signature in database
GPG Key ID: 9453647B005083A3

View File

@ -101,6 +101,10 @@ public class MovementPillar extends Movement {
// if we're standing on water and assumeWalkOnWater is false, we must have ascended to here, or sneak backplaced, so it is possible to pillar again
return COST_INF;
}
if (fromDown.getBlock() instanceof BlockLiquid && (from == Blocks.WATERLILY || from == Blocks.CARPET)) {
// to ascend here we'd have to break the block we are standing on
return COST_INF;
}
double hardness = MovementHelper.getMiningDurationTicks(context, x, y + 2, z, toBreak, true);
if (hardness >= COST_INF) {
return COST_INF;