From aaaaac92eb282687c77ab3d79b9434d579367021 Mon Sep 17 00:00:00 2001 From: Bob Date: Sat, 3 Aug 2024 13:11:14 +0200 Subject: [PATCH] fixes, recipe changes --- changelog | 7 ++- .../recipes/ElectrolyserMetalRecipes.java | 53 +++++++++++-------- .../inventory/recipes/anvil/AnvilRecipes.java | 10 ++-- 3 files changed, 43 insertions(+), 27 deletions(-) diff --git a/changelog b/changelog index 30f6f84b8..771c4585a 100644 --- a/changelog +++ b/changelog @@ -1,3 +1,8 @@ +## Changed +* The fluid burner, heat exchanging heater and cooling tower now use the single steel pipe items instead of the larger steel pipes +* Reduced the amount of condensers needed for crafting the cooling towers + ## Fixed * Fixed crash caused by decontaminating items with the radiolysis machine -* Fixed ICFs not forming correctly depending on the orientation \ No newline at end of file +* Fixed ICFs not forming correctly depending on the orientation +* Fixed electrolyzer metal recipe config not working \ No newline at end of file diff --git a/src/main/java/com/hbm/inventory/recipes/ElectrolyserMetalRecipes.java b/src/main/java/com/hbm/inventory/recipes/ElectrolyserMetalRecipes.java index 41a386a95..4c16b03be 100644 --- a/src/main/java/com/hbm/inventory/recipes/ElectrolyserMetalRecipes.java +++ b/src/main/java/com/hbm/inventory/recipes/ElectrolyserMetalRecipes.java @@ -235,15 +235,22 @@ public class ElectrolyserMetalRecipes extends SerializableRecipe { AStack input = this.readAStack(obj.get("input").getAsJsonArray()); - JsonArray out1 = obj.get("output1").getAsJsonArray(); - String name1 = out1.get(0).getAsString(); - int amount1 = out1.get(1).getAsInt(); - MaterialStack output1 = new MaterialStack(Mats.matByName.get(name1), amount1); + MaterialStack output1 = null; + MaterialStack output2 = null; - JsonArray out2 = obj.get("output2").getAsJsonArray(); - String name2 = out2.get(0).getAsString(); - int amount2 = out2.get(1).getAsInt(); - MaterialStack output2 = new MaterialStack(Mats.matByName.get(name2), amount2); + if(obj.has("output1")) { + JsonArray out1 = obj.get("output1").getAsJsonArray(); + String name1 = out1.get(0).getAsString(); + int amount1 = out1.get(1).getAsInt(); + output1 = new MaterialStack(Mats.matByName.get(name1), amount1); + } + + if(obj.has("output2")) { + JsonArray out2 = obj.get("output2").getAsJsonArray(); + String name2 = out2.get(0).getAsString(); + int amount2 = out2.get(1).getAsInt(); + output2 = new MaterialStack(Mats.matByName.get(name2), amount2); + } ItemStack[] byproducts = new ItemStack[0]; if(obj.has("byproducts")) byproducts = this.readItemStackArray(obj.get("byproducts").getAsJsonArray()); @@ -260,19 +267,23 @@ public class ElectrolyserMetalRecipes extends SerializableRecipe { writer.name("input"); this.writeAStack(rec.getKey(), writer); - writer.name("output1"); - writer.beginArray(); - writer.setIndent(""); - writer.value(rec.getValue().output1.material.names[0]).value(rec.getValue().output1.amount); - writer.endArray(); - writer.setIndent(" "); - - writer.name("output2"); - writer.beginArray(); - writer.setIndent(""); - writer.value(rec.getValue().output2.material.names[0]).value(rec.getValue().output2.amount); - writer.endArray(); - writer.setIndent(" "); + if(rec.getValue().output1 != null) { + writer.name("output1"); + writer.beginArray(); + writer.setIndent(""); + writer.value(rec.getValue().output1.material.names[0]).value(rec.getValue().output1.amount); + writer.endArray(); + writer.setIndent(" "); + } + + if(rec.getValue().output2 != null) { + writer.name("output2"); + writer.beginArray(); + writer.setIndent(""); + writer.value(rec.getValue().output2.material.names[0]).value(rec.getValue().output2.amount); + writer.endArray(); + writer.setIndent(" "); + } if(rec.getValue().byproduct != null && rec.getValue().byproduct.length > 0) { writer.name("byproducts").beginArray(); diff --git a/src/main/java/com/hbm/inventory/recipes/anvil/AnvilRecipes.java b/src/main/java/com/hbm/inventory/recipes/anvil/AnvilRecipes.java index a556e80a4..e4ce81e41 100644 --- a/src/main/java/com/hbm/inventory/recipes/anvil/AnvilRecipes.java +++ b/src/main/java/com/hbm/inventory/recipes/anvil/AnvilRecipes.java @@ -268,7 +268,7 @@ public class AnvilRecipes { constructionRecipes.add(new AnvilConstructionRecipe( new AStack[] { new ComparableStack(ModItems.tank_steel, 4), - new ComparableStack(ModItems.pipes_steel, 1), + new OreDictStack(STEEL.pipe(), 3), new OreDictStack(TI.ingot(), 12), new OreDictStack(CU.ingot(), 8) }, new AnvilOutput(new ItemStack(ModBlocks.heater_oilburner))).setTier(2)); @@ -287,7 +287,7 @@ public class AnvilRecipes { new OreDictStack(RUBBER.ingot(), 4), new OreDictStack(CU.ingot(), 16), new OreDictStack(STEEL.plate528(), 16), - new ComparableStack(ModItems.pipes_steel, 1), + new OreDictStack(STEEL.pipe(), 3), }, new AnvilOutput(new ItemStack(ModBlocks.heater_heatex))).setTier(3)); constructionRecipes.add(new AnvilConstructionRecipe( @@ -406,14 +406,14 @@ public class AnvilRecipes { new AStack[] { new ComparableStack(ModBlocks.brick_concrete, 64), new ComparableStack(Blocks.iron_bars, 128), - new ComparableStack(ModBlocks.machine_condenser, 5), + new ComparableStack(ModBlocks.machine_condenser, 4), }, new AnvilOutput(new ItemStack(ModBlocks.machine_tower_small))).setTier(3)); constructionRecipes.add(new AnvilConstructionRecipe( new AStack[] { new ComparableStack(ModBlocks.concrete_smooth, 128), new ComparableStack(ModBlocks.steel_scaffold, 32), - new ComparableStack(ModBlocks.machine_condenser, 25), - new ComparableStack(ModItems.pipes_steel, 2) + new ComparableStack(ModBlocks.machine_condenser, 16), + new OreDictStack(STEEL.pipe(), 8), }, new AnvilOutput(new ItemStack(ModBlocks.machine_tower_large))).setTier(4)); constructionRecipes.add(new AnvilConstructionRecipe(