SteamWar/BauSystem2.0
Archiviert
12
0

Fix TNTElement selection
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Signed-off-by: yoyosource <yoyosource@nidido.de>
Dieser Commit ist enthalten in:
yoyosource 2022-06-12 13:03:24 +02:00
Ursprung 35aa984d17
Commit 05f43b7486

Datei anzeigen

@ -172,7 +172,10 @@ public class TNTElement implements SimulatorElement {
public boolean locations(Map<Integer, Map<Integer, Set<Pair<Runnable, Integer>>>> result, Region region, Location radius) {
if (disabled) return false;
Location location = getPosition().toLocation(SimulatorStorage.WORLD);
if (location.distanceSquared(radius) > 10000 || !region.inRegion(location, RegionType.NORMAL, RegionExtensionType.NORMAL)) {
if (region.isGlobal() && location.distanceSquared(radius) > 10000) {
return false;
}
if (!region.inRegion(location, RegionType.NORMAL, RegionExtensionType.NORMAL)) {
return false;
}
Region thisRegion = Region.getRegion(location);