diff options
author | Jakub <53441451+kuba6000@users.noreply.github.com> | 2022-07-29 13:45:36 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-29 12:45:36 +0100 |
commit | a57b5621c6304421f232a8b6c399a434004e1a92 (patch) | |
tree | 56e092015b6bc5cd2c8298f685d60b15a18a6d01 /src/main/java/gregtech/common/tileentities/machines/basic | |
parent | 3a797945f5802e1cbfbc66ed153acaad55935e16 (diff) | |
download | GT5-Unofficial-a57b5621c6304421f232a8b6c399a434004e1a92.tar.gz GT5-Unofficial-a57b5621c6304421f232a8b6c399a434004e1a92.tar.bz2 GT5-Unofficial-a57b5621c6304421f232a8b6c399a434004e1a92.zip |
A few GT Apiary Upgrade changes (#1164)
* Upgrade changes
* 6
* Handle some crazy bee outputs
Diffstat (limited to 'src/main/java/gregtech/common/tileentities/machines/basic')
-rw-r--r-- | src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_IndustrialApiary.java | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_IndustrialApiary.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_IndustrialApiary.java index f442b6812c..7562946e51 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_IndustrialApiary.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_IndustrialApiary.java @@ -207,8 +207,16 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM { ItemStack s = dropstacks.get(entry.getKey()).copy(); s.stackSize = entry.getValue().intValue() + (getWorld().rand.nextFloat() < (entry.getValue() - (float) entry.getValue().intValue()) ? 1 : 0); - if(s.stackSize > 0) - this.mOutputItems[i++] = s; + if(s.stackSize > 0 && i < 7) + while(true) { + if (s.stackSize <= s.getMaxStackSize()) { + this.mOutputItems[i++] = s; + break; + } else + this.mOutputItems[i++] = s.splitStack(s.getMaxStackSize()); + if(i >= 7) + break; + } } IApiaristTracker breedingTracker = beeRoot.getBreedingTracker(getWorld(), getOwner()); |