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
Browse files Browse the repository at this point in the history
  • Loading branch information
kuba6000 committed Mar 17, 2023
1 parent a3831c3 commit a438aed
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 a438aed

Please sign in to comment.