diff --git a/src/main/java/com/cleanroommc/groovyscript/compat/mods/botania/Apothecary.java b/src/main/java/com/cleanroommc/groovyscript/compat/mods/botania/Apothecary.java index b5ce4ccdc..921321d91 100644 --- a/src/main/java/com/cleanroommc/groovyscript/compat/mods/botania/Apothecary.java +++ b/src/main/java/com/cleanroommc/groovyscript/compat/mods/botania/Apothecary.java @@ -91,7 +91,7 @@ public String getErrorMsg() { @Override public void validate(GroovyLog.Msg msg) { - validateFluids(msg, 0, 0, 0, 0); + validateFluids(msg); validateItems(msg, 1, 20, 1, 1); } diff --git a/src/main/java/com/cleanroommc/groovyscript/compat/mods/botania/Brew.java b/src/main/java/com/cleanroommc/groovyscript/compat/mods/botania/Brew.java index 91a1273ff..739cfe836 100644 --- a/src/main/java/com/cleanroommc/groovyscript/compat/mods/botania/Brew.java +++ b/src/main/java/com/cleanroommc/groovyscript/compat/mods/botania/Brew.java @@ -162,8 +162,8 @@ public String getErrorMsg() { @Override public void validate(GroovyLog.Msg msg) { - validateItems(msg, 0, 0, 0, 0); - validateFluids(msg, 0, 0, 0, 0); + validateItems(msg); + validateFluids(msg); msg.add(key == null, "key must be defined"); msg.add(BotaniaAPI.brewMap.containsKey(key), "must have a unique key for brew, got " + key); msg.add(cost < 1, "cost must be at least 1, got " + cost); diff --git a/src/main/java/com/cleanroommc/groovyscript/compat/mods/botania/ElvenTrade.java b/src/main/java/com/cleanroommc/groovyscript/compat/mods/botania/ElvenTrade.java index 75e30631b..32f4c32c9 100644 --- a/src/main/java/com/cleanroommc/groovyscript/compat/mods/botania/ElvenTrade.java +++ b/src/main/java/com/cleanroommc/groovyscript/compat/mods/botania/ElvenTrade.java @@ -97,7 +97,7 @@ public String getErrorMsg() { @Override public void validate(GroovyLog.Msg msg) { - validateFluids(msg, 0, 0, 0, 0); + validateFluids(msg); validateItems(msg, 1, 99, 1, 99); } diff --git a/src/main/java/com/cleanroommc/groovyscript/compat/mods/botania/Lexicon.java b/src/main/java/com/cleanroommc/groovyscript/compat/mods/botania/Lexicon.java index f34fd0e09..7259f6157 100644 --- a/src/main/java/com/cleanroommc/groovyscript/compat/mods/botania/Lexicon.java +++ b/src/main/java/com/cleanroommc/groovyscript/compat/mods/botania/Lexicon.java @@ -398,8 +398,8 @@ public String getErrorMsg() { @Override public void validate(GroovyLog.Msg msg) { - validateFluids(msg, 0, 0, 0, 0); - validateItems(msg, 0, 0, 0, 0); + validateFluids(msg); + validateItems(msg); msg.add(name == null, "expected a valid name, got " + name); msg.add(pages.size() < 1, "entry must have at least 1 page, got " + pages.size()); msg.add(category == null, "expected a valid category, got " + category); diff --git a/src/main/java/com/cleanroommc/groovyscript/compat/mods/botania/ManaInfusion.java b/src/main/java/com/cleanroommc/groovyscript/compat/mods/botania/ManaInfusion.java index 9f5af25cf..6bcb6b8ec 100644 --- a/src/main/java/com/cleanroommc/groovyscript/compat/mods/botania/ManaInfusion.java +++ b/src/main/java/com/cleanroommc/groovyscript/compat/mods/botania/ManaInfusion.java @@ -119,7 +119,7 @@ public String getErrorMsg() { @Override public void validate(GroovyLog.Msg msg) { - validateFluids(msg, 0, 0, 0, 0); + validateFluids(msg); validateItems(msg, 1, 1, 1, 1); msg.add(mana < 1, "Mana amount must be at least 1, got " + mana); } diff --git a/src/main/java/com/cleanroommc/groovyscript/compat/mods/botania/PureDaisy.java b/src/main/java/com/cleanroommc/groovyscript/compat/mods/botania/PureDaisy.java index 43912b0fb..be887f12e 100644 --- a/src/main/java/com/cleanroommc/groovyscript/compat/mods/botania/PureDaisy.java +++ b/src/main/java/com/cleanroommc/groovyscript/compat/mods/botania/PureDaisy.java @@ -141,8 +141,8 @@ public String getErrorMsg() { @Override public void validate(GroovyLog.Msg msg) { - validateItems(msg, 0, 0, 0, 0); - validateFluids(msg, 0, 0, 0, 0); + validateItems(msg); + validateFluids(msg); msg.add(time < 0, "time must be at least 1, got " + time); msg.add(output == null, "output must be defined"); msg.add(input == null || !(input instanceof String || input instanceof IBlockState), "expected IBlockState or String input, got {}", input); diff --git a/src/main/java/com/cleanroommc/groovyscript/compat/mods/botania/RuneAltar.java b/src/main/java/com/cleanroommc/groovyscript/compat/mods/botania/RuneAltar.java index 0e1c209a5..b6b1fc51a 100644 --- a/src/main/java/com/cleanroommc/groovyscript/compat/mods/botania/RuneAltar.java +++ b/src/main/java/com/cleanroommc/groovyscript/compat/mods/botania/RuneAltar.java @@ -95,7 +95,7 @@ public String getErrorMsg() { @Override public void validate(GroovyLog.Msg msg) { - validateFluids(msg, 0, 0, 0, 0); + validateFluids(msg); validateItems(msg, 1, 20, 1, 1); msg.add(input.stream().anyMatch(x -> x.test(new ItemStack(Item.getItemFromBlock(ModBlocks.livingrock), 1, 0))), "input cannot contain a livingrock item"); diff --git a/src/main/java/com/cleanroommc/groovyscript/compat/mods/forestry/Centrifuge.java b/src/main/java/com/cleanroommc/groovyscript/compat/mods/forestry/Centrifuge.java index 4672133a2..4e3d0379a 100644 --- a/src/main/java/com/cleanroommc/groovyscript/compat/mods/forestry/Centrifuge.java +++ b/src/main/java/com/cleanroommc/groovyscript/compat/mods/forestry/Centrifuge.java @@ -112,7 +112,7 @@ public String getErrorMsg() { @Override public void validate(GroovyLog.Msg msg) { - validateFluids(msg, 0, 0, 0, 0); + validateFluids(msg); validateItems(msg, 1, 1, 0, 0); msg.add(outputs.isEmpty() || outputs.size() > 9, "Must have 1 - 9 outputs. got {}.", outputs.size()); } diff --git a/src/main/java/com/cleanroommc/groovyscript/compat/mods/forestry/Moistener.java b/src/main/java/com/cleanroommc/groovyscript/compat/mods/forestry/Moistener.java index 9d2ba993d..3a0f96d1a 100644 --- a/src/main/java/com/cleanroommc/groovyscript/compat/mods/forestry/Moistener.java +++ b/src/main/java/com/cleanroommc/groovyscript/compat/mods/forestry/Moistener.java @@ -94,7 +94,7 @@ public String getErrorMsg() { @Override public void validate(GroovyLog.Msg msg) { - validateFluids(msg, 0, 0, 0, 0); + validateFluids(msg); validateItems(msg, 1, 1, 1, 1); } diff --git a/src/main/java/com/cleanroommc/groovyscript/compat/mods/forestry/Still.java b/src/main/java/com/cleanroommc/groovyscript/compat/mods/forestry/Still.java index 5f38a1baf..b2456c531 100644 --- a/src/main/java/com/cleanroommc/groovyscript/compat/mods/forestry/Still.java +++ b/src/main/java/com/cleanroommc/groovyscript/compat/mods/forestry/Still.java @@ -93,7 +93,7 @@ public String getErrorMsg() { @Override public void validate(GroovyLog.Msg msg) { - validateItems(msg, 0, 0, 0, 0); + validateItems(msg); validateFluids(msg, 1, 1, 1, 1); } diff --git a/src/main/java/com/cleanroommc/groovyscript/compat/mods/mekanism/recipe/GasRecipeBuilder.java b/src/main/java/com/cleanroommc/groovyscript/compat/mods/mekanism/recipe/GasRecipeBuilder.java index 05bcc0245..9ad4f79f8 100644 --- a/src/main/java/com/cleanroommc/groovyscript/compat/mods/mekanism/recipe/GasRecipeBuilder.java +++ b/src/main/java/com/cleanroommc/groovyscript/compat/mods/mekanism/recipe/GasRecipeBuilder.java @@ -63,12 +63,12 @@ public GasRecipeBuilder gasOutput(GasStack... gases) { public void validateGases(GroovyLog.Msg msg, int minInput, int maxInput, int minOutput, int maxOutput) { gasInput.trim(); gasOutput.trim(); - msg.add(gasInput.size() < minInput || gasInput.size() > maxInput, () -> getRequiredString(minInput, maxInput, "gas input") + ", but found " + gasInput.size()); - msg.add(gasOutput.size() < minOutput || gasOutput.size() > maxOutput, () -> getRequiredString(minOutput, maxOutput, "gas output") + ", but found " + gasOutput.size()); + validateCustom(msg, gasInput, minInput, maxInput, "gas input"); + validateCustom(msg, gasOutput, minOutput, maxOutput, "gas output"); } public void validateGases(GroovyLog.Msg msg) { - validateItems(msg, 0, 0, 0, 0); + validateGases(msg, 0, 0, 0, 0); } }