diff --git a/core/src/mindustry/mod/ContentParser.java b/core/src/mindustry/mod/ContentParser.java index 3e5ca141e2..1279a98ea4 100644 --- a/core/src/mindustry/mod/ContentParser.java +++ b/core/src/mindustry/mod/ContentParser.java @@ -275,15 +275,6 @@ public class ContentParser{ if(value.has("requirements")){ JsonValue rec = value.remove("requirements"); - //intermediate class for parsing - class UnitReq{ - public Block block; - public ItemStack[] requirements = {}; - @Nullable - public UnitType previous; - public float time = 60f * 10f; - } - UnitReq req = parser.readValue(UnitReq.class, rec); if(req.block instanceof Reconstructor r){ @@ -732,4 +723,13 @@ public class ContentParser{ T parse(String mod, String name, JsonValue value) throws Exception; } + //intermediate class for parsing + static class UnitReq{ + public Block block; + public ItemStack[] requirements = {}; + @Nullable + public UnitType previous; + public float time = 60f * 10f; + } + } diff --git a/core/src/mindustry/world/blocks/campaign/Accelerator.java b/core/src/mindustry/world/blocks/campaign/Accelerator.java index b5a33bc2d3..6f998ccd8f 100644 --- a/core/src/mindustry/world/blocks/campaign/Accelerator.java +++ b/core/src/mindustry/world/blocks/campaign/Accelerator.java @@ -21,7 +21,7 @@ public class Accelerator extends Block{ public @Load("launch-arrow") TextureRegion arrowRegion; public Block launching = Blocks.coreNucleus; - public int[] capacities; + public int[] capacities = {}; public Accelerator(String name){ super(name); diff --git a/core/src/mindustry/world/blocks/units/Reconstructor.java b/core/src/mindustry/world/blocks/units/Reconstructor.java index c80cb35b83..b48f4741b6 100644 --- a/core/src/mindustry/world/blocks/units/Reconstructor.java +++ b/core/src/mindustry/world/blocks/units/Reconstructor.java @@ -24,7 +24,7 @@ import static mindustry.Vars.*; public class Reconstructor extends UnitBlock{ public float constructTime = 60 * 2; public Seq upgrades = new Seq<>(); - public int[] capacities; + public int[] capacities = {}; public Reconstructor(String name){ super(name); diff --git a/core/src/mindustry/world/blocks/units/UnitFactory.java b/core/src/mindustry/world/blocks/units/UnitFactory.java index 798c6fe26e..f6555dcc2f 100644 --- a/core/src/mindustry/world/blocks/units/UnitFactory.java +++ b/core/src/mindustry/world/blocks/units/UnitFactory.java @@ -24,7 +24,7 @@ import mindustry.world.consumers.*; import mindustry.world.meta.*; public class UnitFactory extends UnitBlock{ - public int[] capacities; + public int[] capacities = {}; public Seq plans = new Seq<>(4);