mirror of
https://github.com/kaboomserver/extras.git
synced 2024-11-27 09:55:36 -05:00
Bring back old physics checks
This commit is contained in:
parent
8ff92bb4d4
commit
398f066b0d
1 changed files with 19 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue