SteamWar/FightSystem
Archiviert
13
1

Fix WaterRemover TNT
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Signed-off-by: Lixfel <agga-games@gmx.de>
Dieser Commit ist enthalten in:
Lixfel 2024-03-05 16:17:55 +01:00
Ursprung c17dc43678
Commit 79413434f7

Datei anzeigen

@ -73,8 +73,13 @@ public class WaterRemover implements Listener {
FightTeam spawn = tnt.remove(event.getEntity().getEntityId());
if(spawn != null && !spawn.getExtendRegion().inRegion(event.getLocation())) {
Block b = event.getLocation().getBlock();
checkBlock(b);
checkNeighbours(b);
for(int y = -1; y <= 1; y++) {
for(int z = -1; z <= 1; z++) {
for(int x = -1; x <= 1; x++) {
checkBlock(b.getRelative(x, y, z));
}
}
}
}
event.blockList().forEach(this::checkNeighbours);
@ -90,7 +95,7 @@ public class WaterRemover implements Listener {
}
private void checkBlock(Block b) {
//do not remove outside teamareasevent.getLocation().getBlock()
//do not remove outside teamareas
if(!Config.BlueExtendRegion.inRegion(b) && !Config.RedExtendRegion.inRegion(b))
return;