mirror of
https://github.com/kaboomserver/extras.git
synced 2024-11-27 09:55:36 -05:00
Improve TNT redstone performance
This commit is contained in:
parent
673bef2212
commit
5bea9e9dff
1 changed files with 10 additions and 0 deletions
|
@ -93,6 +93,16 @@ public final class BlockPhysics implements Listener {
|
|||
event.getBlock().setType(Material.AIR, false);
|
||||
event.setCancelled(true);
|
||||
}
|
||||
break;
|
||||
case TNT:
|
||||
for (BlockFace face : blockFaces) {
|
||||
if (event.getBlock().getRelative(face).getType() != Material.REDSTONE_BLOCK
|
||||
&& event.getBlock().getRelative(face).getType() != Material.REDSTONE_TORCH) {
|
||||
return;
|
||||
}
|
||||
event.setCancelled(true);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue