Skip to content

Commit

Permalink
forgot to commit this in the previous commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Trinsdar committed Aug 31, 2024
1 parent d4f828b commit 2977d40
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -243,12 +243,10 @@ protected void activateRecipe(boolean reset) {
protected void addOutputs() {
if (activeRecipe.hasOutputItems()) {
tile.itemHandler.ifPresent(h -> {
//Roll the chances here. If they don't fit add flat (no chances).
//Roll the chances here..
ItemStack[] out = activeRecipe.getOutputItems(true);
if (h.canOutputsFit(out)) {
h.addOutputs(out);
} else {
h.addOutputs(activeRecipe.getFlatOutputItems());
}
tile.onMachineEvent(MachineEvent.ITEMS_OUTPUTTED);
});
Expand Down Expand Up @@ -435,7 +433,7 @@ public boolean consumeInputs() {

public boolean canOutput() {
//ignore chance for canOutput.
if (tile.itemHandler.isPresent() && activeRecipe.hasOutputItems() && !tile.itemHandler.map(t -> t.canOutputsFit(activeRecipe.getFlatOutputItems())).orElse(false))
if (tile.itemHandler.isPresent() && activeRecipe.hasOutputItems() && !tile.itemHandler.map(t -> t.canOutputsFit(activeRecipe.getOutputItems(false))).orElse(false))
return false;
return !tile.fluidHandler.isPresent() || !activeRecipe.hasOutputFluids() || tile.fluidHandler.map(t -> t.canOutputsFit(activeRecipe.getOutputFluids())).orElse(false);
}
Expand Down

0 comments on commit 2977d40

Please sign in to comment.