Fix block bug

This commit is contained in:
Ilya 2022-02-19 19:29:21 +03:00
parent 49ac50043e
commit 20864481dc

View File

@ -85,6 +85,7 @@ public class WorldListener implements Listener {
if (isMovable) { if (isMovable) {
if (!isBlocksAllowedToInteract(copyWithAdd(blocks, toBreak), piston.getFacing())) continue; if (!isBlocksAllowedToInteract(copyWithAdd(blocks, toBreak), piston.getFacing())) continue;
Collections.reverse(blocks);
for (Block block1 : toBreak) { for (Block block1 : toBreak) {
block1.breakNaturally(); block1.breakNaturally();
} }
@ -278,6 +279,7 @@ public class WorldListener implements Listener {
List<Block> toBreak = checker.getBrokenBlocksObjects(); List<Block> toBreak = checker.getBrokenBlocksObjects();
if (isMovable) { if (isMovable) {
Collections.reverse(blocks);
if (!isBlocksAllowedToInteract(copyWithAdd(blocks, toBreak), piston.getFacing())) if (!isBlocksAllowedToInteract(copyWithAdd(blocks, toBreak), piston.getFacing()))
continue; continue;
for (Block block1 : toBreak) { for (Block block1 : toBreak) {