forked from SteamWar/SteamWar
+23
@@ -222,6 +222,29 @@ public class PistonCalculator implements Listener {
|
|||||||
Block block = current.getRelative(face);
|
Block block = current.getRelative(face);
|
||||||
if (block.getType().isAir()) continue;
|
if (block.getType().isAir()) continue;
|
||||||
if (isImmovable(block) || block.getPistonMoveReaction() == PistonMoveReaction.BREAK) continue;
|
if (isImmovable(block) || block.getPistonMoveReaction() == PistonMoveReaction.BREAK) continue;
|
||||||
|
if (face != direction || face == direction.getOppositeFace()) {
|
||||||
|
switch (block.getType()) {
|
||||||
|
case BLACK_GLAZED_TERRACOTTA:
|
||||||
|
case GRAY_GLAZED_TERRACOTTA:
|
||||||
|
case BLUE_GLAZED_TERRACOTTA:
|
||||||
|
case BROWN_GLAZED_TERRACOTTA:
|
||||||
|
case CYAN_GLAZED_TERRACOTTA:
|
||||||
|
case GREEN_GLAZED_TERRACOTTA:
|
||||||
|
case LIGHT_BLUE_GLAZED_TERRACOTTA:
|
||||||
|
case LIGHT_GRAY_GLAZED_TERRACOTTA:
|
||||||
|
case LIME_GLAZED_TERRACOTTA:
|
||||||
|
case MAGENTA_GLAZED_TERRACOTTA:
|
||||||
|
case ORANGE_GLAZED_TERRACOTTA:
|
||||||
|
case PINK_GLAZED_TERRACOTTA:
|
||||||
|
case PURPLE_GLAZED_TERRACOTTA:
|
||||||
|
case RED_GLAZED_TERRACOTTA:
|
||||||
|
case WHITE_GLAZED_TERRACOTTA:
|
||||||
|
case YELLOW_GLAZED_TERRACOTTA:
|
||||||
|
continue;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
if (block.getType() != oppositeType) {
|
if (block.getType() != oppositeType) {
|
||||||
if (!movedBlocks.contains(block.getLocation())) toCalc.add(block);
|
if (!movedBlocks.contains(block.getLocation())) toCalc.add(block);
|
||||||
calcDirection(null, origin, block, null, facing, direction, toCalc);
|
calcDirection(null, origin, block, null, facing, direction, toCalc);
|
||||||
|
|||||||
Reference in New Issue
Block a user