mirror of
https://github.com/Anuken/Mindustry.git
synced 2026-01-27 15:02:03 -08:00
fix NPE in SpawnGroup.write (#8584)
* Update SpawnGroup.java * Update contributors * No Objects.isNull
This commit is contained in:
parent
06e63dad45
commit
0496d2108c
2 changed files with 3 additions and 2 deletions
|
|
@ -154,4 +154,5 @@ zenonet
|
|||
AyuKo-o
|
||||
JojoFR1
|
||||
Xasmedy
|
||||
xStaBUx
|
||||
xStaBUx
|
||||
WayZer
|
||||
|
|
|
|||
|
|
@ -138,7 +138,7 @@ 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.unit(s));
|
||||
if(data.has("payloads")) payloads = Seq.with(json.readValue(String[].class, data.get("payloads"))).map(content::unit).removeAll(t -> t == null);
|
||||
if(data.has("items")) items = json.readValue(ItemStack.class, data.get("items"));
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue