8000 Fix wrong piston world border check (#12007) · PaperMC/Paper@81bb82f · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Commit 81bb82f

Browse files
authored
Fix wrong piston world border check (#12007)
1 parent 939bb78 commit 81bb82f

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

paper-server/patches/sources/net/minecraft/world/level/block/piston/PistonBaseBlock.java.patch

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,15 @@
6161
}
6262

6363
level.playSound(null, pos, SoundEvents.PISTON_CONTRACT, SoundSource.BLOCKS, 0.5F, level.random.nextFloat() * 0.15F + 0.6F);
64+
@@ -249,7 +_,7 @@
65+
}
66+
67+
public static boolean isPushable(BlockState state, Level level, BlockPos pos, Direction movementDirection, boolean allowDestroy, Direction pistonFacing) {
68+
- if (pos.getY() < level.getMinY() || pos.getY() > level.getMaxY() || !level.getWorldBorder().isWithinBounds(pos)) {
69+
+ if (pos.getY() < level.getMinY() || pos.getY() > level.getMaxY() || !level.getWorldBorder().isWithinBounds(pos) || !level.getWorldBorder().isWithinBounds(pos.relative(movementDirection))) { // Paper - Fix piston world border check
70+
return false;
71+
} else if (state.isAir()) {
72+
return true;
6473
@@ -305,12 +_,54 @@
6574
BlockState[] blockStates = new BlockState[toPush.size() + toDestroy.size()];
6675
Direction direction = extending ? facing : facing.getOpposite();

0 commit comments

Comments
 (0)
0