Generation quick copy & paste (#7520)
* several UI changes * block ID bad
This commit is contained in:
@@ -118,9 +118,9 @@ public class SpawnGroup implements JsonSerializable, Cloneable{
|
||||
if(unitAmount != 1) json.writeValue("amount", unitAmount);
|
||||
if(effect != null) json.writeValue("effect", effect.name);
|
||||
if(spawn != -1) json.writeValue("spawn", spawn);
|
||||
if(payloads != null && payloads.size > 0){
|
||||
json.writeValue("payloads", payloads.map(u -> u.name).toArray(String.class));
|
||||
}
|
||||
if(payloads != null && payloads.size > 0) json.writeValue("payloads", payloads.map(u -> u.name).toArray(String.class));
|
||||
if(items != null && items.amount > 0) json.writeValue("items", items);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -138,9 +138,9 @@ public class SpawnGroup implements JsonSerializable, Cloneable{
|
||||
shieldScaling = data.getFloat("shieldScaling", 0);
|
||||
unitAmount = data.getInt("amount", 1);
|
||||
spawn = data.getInt("spawn", -1);
|
||||
if(data.has("payloads")){
|
||||
payloads = Seq.with(json.readValue(String[].class, data.get("payloads"))).map(s -> content.getByName(ContentType.unit, s));
|
||||
}
|
||||
if(data.has("payloads")) payloads = Seq.with(json.readValue(String[].class, data.get("payloads"))).map(s -> content.getByName(ContentType.unit, s));
|
||||
if(data.has("items")) items = json.readValue(ItemStack.class, data.get("items"));
|
||||
|
||||
|
||||
//old boss effect ID
|
||||
if(data.has("effect") && data.get("effect").isNumber() && data.getInt("effect", -1) == 8){
|
||||
|
||||
Reference in New Issue
Block a user