Skip to content

Commit

Permalink
make analysing chamber correctly remove outputs (#224)
Browse files Browse the repository at this point in the history
  • Loading branch information
WaitingIdly committed Aug 30, 2024
1 parent 9e4f296 commit b7d0966
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion examples/postInit/calculator.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ mods.calculator.algorithm_separator.recipeBuilder()
// Takes a non-analysed Circuit and analyses it, converting it into usable Stable or Analysed Circuit. Will produce power
// and item outputs based on randomly generated NBT data.

mods.calculator.analysing_chamber.removeByInput(item('sonarcore:reinforceddirtblock'))
mods.calculator.analysing_chamber.removeByOutput(item('sonarcore:reinforceddirtblock'))
// mods.calculator.analysing_chamber.removeAll()

mods.calculator.analysing_chamber.recipeBuilder()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,11 @@ public boolean remove(CalculatorRecipe recipe) {
}

@MethodDescription(example = @Example("item('sonarcore:reinforceddirtblock')"))
public boolean removeByInput(IIngredient input) {
public boolean removeByOutput(IIngredient output) {
return AnalysingChamberRecipes.instance().getRecipes().removeIf(r -> {
for (ISonarRecipeObject recipeInput : r.recipeInputs) {
for (ItemStack itemStack : recipeInput.getJEIValue()) {
if (input.test(itemStack)) {
for (ISonarRecipeObject recipeOutput : r.recipeOutputs) {
for (ItemStack itemStack : recipeOutput.getJEIValue()) {
if (output.test(itemStack)) {
addBackup(r);
return true;
}
Expand Down

0 comments on commit b7d0966

Please sign in to comment.