forked from kaboomserver/extras
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.getBlock().setType(Material.AIR, false);
|
||||||
event.setCancelled(true);
|
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:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue