SteamWar/BauSystem2.0
Archiviert
12
0

Fix DesignEndStone
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Dieser Commit ist enthalten in:
yoyosource 2024-05-16 15:47:30 +02:00
Ursprung d5acfa3f5c
Commit ab6c762323

Datei anzeigen

@ -44,6 +44,7 @@ public class DesignEndStone {
private REntityServer entityServer = new REntityServer();
private List<REntity> entities = new ArrayList<>();
private Set<Location> locations = new HashSet<>();
private double maxBlastResistance;
public DesignEndStone(Region region) {
this.minX = region.getMinPointBuild().getX();
@ -52,6 +53,7 @@ public class DesignEndStone {
this.maxX = region.getMaxPointBuild().getX();
this.maxY = region.getMaxPointBuild().getY();
this.maxZ = region.getMaxPointBuild().getZ();
maxBlastResistance = region.getName().startsWith("ws") || region.getName().startsWith("as") ? 6.0 : 9.0;
}
public void calc() {
@ -76,7 +78,8 @@ public class DesignEndStone {
int cy = y + step * dirY;
int cz = z + step * dirZ;
Material material = WORLD.getBlockAt(cx, cy, cz).getType();
if (material.getBlastResistance() > 9) {
if (material.getBlastResistance() >= maxBlastResistance) {
Location location = new Location(WORLD, cx + 0.5, cy, cz + 0.5);
if (locations.contains(location)) break;
RFallingBlockEntity entity = new RFallingBlockEntity(entityServer, location, Material.RED_STAINED_GLASS);