SteamWar/BauSystem2.0
Archiviert
12
0

Update loading of TNTElement
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Signed-off-by: yoyosource <yoyosource@nidido.de>
Dieser Commit ist enthalten in:
yoyosource 2022-06-10 17:29:24 +02:00
Ursprung 5788ae70ef
Commit 2d9c201803

Datei anzeigen

@ -75,11 +75,7 @@ public class TNTElement implements SimulatorElement {
this.xVelocity = yapionObject.getBooleanOrDefault("xVelocity", false);
this.yVelocity = yapionObject.getBooleanOrDefault("yVelocity", false);
this.zVelocity = yapionObject.getBooleanOrDefault("zVelocity", false);
if (yapionObject.containsKey("order", Integer.class)) {
this.order = yapionObject.getIntOrDefault("order", 0) == 0 ? Material.REPEATER : Material.COMPARATOR;
} else {
this.order = Material.valueOf(yapionObject.getStringOrDefault("order", yapionObject.getBooleanOrDefault("comparator", false) ? Material.COMPARATOR.name() : Material.REPEATER.name()));
}
this.order = Material.valueOf(yapionObject.getStringOrDefault("order", yapionObject.getBooleanOrDefault("comparator", false) ? Material.COMPARATOR.name() : Material.REPEATER.name()));
this.material = Material.valueOf(yapionObject.getStringOrDefault("material", Material.TNT.name()));
}