SteamWar/BauSystem2.0
Archiviert
12
0

Fix laufbautool
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Signed-off-by: yoyosource <yoyosource@nidido.de>
Dieser Commit ist enthalten in:
yoyosource 2022-10-09 21:13:22 +02:00
Ursprung a57cd0287a
Commit fca07eba75

Datei anzeigen

@ -146,9 +146,7 @@ public class Recorder implements Listener {
{ {
Bukkit.getScheduler().runTaskTimer(BauSystem.getInstance(), () -> { Bukkit.getScheduler().runTaskTimer(BauSystem.getInstance(), () -> {
world.getEntitiesByClass(TNTPrimed.class).forEach(tntPrimed -> { tick();
get(tntPrimed).tick(tntPrimed);
});
tntTraceRecorderMap.keySet() tntTraceRecorderMap.keySet()
.stream() .stream()
.filter(e -> !e.isValid()) .filter(e -> !e.isValid())
@ -158,6 +156,12 @@ public class Recorder implements Listener {
}, 1, 1); }, 1, 1);
} }
private void tick() {
world.getEntitiesByClass(TNTPrimed.class).forEach(tntPrimed -> {
get(tntPrimed).tick(tntPrimed);
});
}
@EventHandler @EventHandler
public void onEntityExplode(EntityExplodeEvent event) { public void onEntityExplode(EntityExplodeEvent event) {
Entity entity = event.getEntity(); Entity entity = event.getEntity();
@ -168,5 +172,6 @@ public class Recorder implements Listener {
Region region = tntTraceRecorderMap.get((TNTPrimed) entity); Region region = tntTraceRecorderMap.get((TNTPrimed) entity);
traceRecorder.explode((TNTPrimed) entity, !event.blockList().isEmpty() && region.inRegion(event.getLocation(), RegionType.BUILD, RegionExtensionType.EXTENSION)); traceRecorder.explode((TNTPrimed) entity, !event.blockList().isEmpty() && region.inRegion(event.getLocation(), RegionType.BUILD, RegionExtensionType.EXTENSION));
tntTraceRecorderMap.remove(entity); tntTraceRecorderMap.remove(entity);
tick();
} }
} }