Skip to content
This repository has been archived by the owner on May 25, 2024. It is now read-only.

Commit

Permalink
Fix EIG voiding 100% crops instead of 1% when no weed-ex (#61)
Browse files Browse the repository at this point in the history
  • Loading branch information
kuba6000 authored Mar 18, 2023
1 parent a3831c3 commit 58d7c14
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -436,10 +436,10 @@ public boolean checkRecipe(ItemStack itemStack) {
// weedex
if (weedexusage > 0 && !this.depleteInput(new FluidStack(weedex, isIC2Mode ? weedexusage * 5 : weedexusage))) {
IGregTechTileEntity baseMTE = this.getBaseMetaTileEntity();
int tokill = baseMTE.getRandomNumber((int) ((double) weedexusage * 0.02d) + 1);
for (int i = 0; i < tokill;) {
int toKill = baseMTE.getRandomNumber((int) ((double) weedexusage * 0.02d) + 1);
while (toKill > 0) {
GreenHouseSlot removed = mStorage.remove(baseMTE.getRandomNumber(mStorage.size()));
i -= removed.input.stackSize;
toKill -= removed.input.stackSize;
}
}

Expand Down

0 comments on commit 58d7c14

Please sign in to comment.