Skip to content

Commit b7d0966

Browse files
authored
make analysing chamber correctly remove outputs (#224)
1 parent 9e4f296 commit b7d0966

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

examples/postInit/calculator.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ mods.calculator.algorithm_separator.recipeBuilder()
2121
// Takes a non-analysed Circuit and analyses it, converting it into usable Stable or Analysed Circuit. Will produce power
2222
// and item outputs based on randomly generated NBT data.
2323

24-
mods.calculator.analysing_chamber.removeByInput(item('sonarcore:reinforceddirtblock'))
24+
mods.calculator.analysing_chamber.removeByOutput(item('sonarcore:reinforceddirtblock'))
2525
// mods.calculator.analysing_chamber.removeAll()
2626

2727
mods.calculator.analysing_chamber.recipeBuilder()

src/main/java/com/cleanroommc/groovyscript/compat/mods/calculator/AnalysingChamber.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,11 @@ public boolean remove(CalculatorRecipe recipe) {
7575
}
7676

7777
@MethodDescription(example = @Example("item('sonarcore:reinforceddirtblock')"))
78-
public boolean removeByInput(IIngredient input) {
78+
public boolean removeByOutput(IIngredient output) {
7979
return AnalysingChamberRecipes.instance().getRecipes().removeIf(r -> {
80-
for (ISonarRecipeObject recipeInput : r.recipeInputs) {
81-
for (ItemStack itemStack : recipeInput.getJEIValue()) {
82-
if (input.test(itemStack)) {
80+
for (ISonarRecipeObject recipeOutput : r.recipeOutputs) {
81+
for (ItemStack itemStack : recipeOutput.getJEIValue()) {
82+
if (output.test(itemStack)) {
8383
addBackup(r);
8484
return true;
8585
}

0 commit comments

Comments
 (0)