Bring back old physics checks

This commit is contained in:
mathiascode 2020-02-20 16:58:07 +02:00
parent 8ff92bb4d4
commit 398f066b0d

View file

@ -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;
}