From 398f066b0dcc2ad7f65a704cd690837606a34d29 Mon Sep 17 00:00:00 2001 From: mathiascode Date: Thu, 20 Feb 2020 16:58:07 +0200 Subject: [PATCH] Bring back old physics checks --- .../extras/modules/block/BlockPhysics.java | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/main/java/pw/kaboom/extras/modules/block/BlockPhysics.java b/src/main/java/pw/kaboom/extras/modules/block/BlockPhysics.java index 890893e..7b10db5 100644 --- a/src/main/java/pw/kaboom/extras/modules/block/BlockPhysics.java +++ b/src/main/java/pw/kaboom/extras/modules/block/BlockPhysics.java @@ -109,6 +109,25 @@ public final class BlockPhysics implements Listener { }*/ event.setCancelled(true); return; + case ACTIVATOR_RAIL: + case DETECTOR_RAIL: + case POWERED_RAIL: + case RAIL: + for (BlockFace face : blockFaces) { + if (event.getBlock().getRelative(face).getType() != event.getChangedType()) { + return; + } + event.getBlock().setType(Material.AIR, false); + } + return; + case TNT: + for (BlockFace face : blockFaces) { + if (event.getBlock().getRelative(face).getType() != Material.REDSTONE_BLOCK + && event.getBlock().getRelative(face).getType() != Material.REDSTONE_TORCH) { + return; + } + } + return; default: break; }