Skip to content

Commit

Permalink
fixed lv generators not accepting recipes that have power per mb grea…
Browse files Browse the repository at this point in the history
…ter then max voltage out
  • Loading branch information
Trinsdar committed Dec 14, 2023
1 parent d283d69 commit 98b8072
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -339,8 +339,8 @@ public boolean consumeResourceForRecipe(boolean simulate) {
}

protected boolean validateRecipe(IRecipe r) {
long voltage = this.generator ? tile.getMaxOutputVoltage() : tile.getMachineType().amps() * tile.getMaxInputVoltage();
boolean ok = voltage >= r.getPower() / r.getAmps();
long voltage = tile.getMachineType().amps() * tile.getMaxInputVoltage();
boolean ok = this.generator || voltage >= r.getPower() / r.getAmps();
List<ItemStack> consumed = this.tile.itemHandler.map(t -> t.consumeInputs(r, true)).orElse(Collections.emptyList());
for (IRecipeValidator validator : r.getValidators()) {
if (!validator.validate(r, tile)) {
Expand Down

0 comments on commit 98b8072

Please sign in to comment.