diff options
| author | Glease <4586901+Glease@users.noreply.github.com> | 2021-04-10 04:40:15 +0800 |
|---|---|---|
| committer | Glease <4586901+Glease@users.noreply.github.com> | 2021-04-10 04:40:15 +0800 |
| commit | 3c5e8ae8274dbafc5a464437f1e910984e4e03f2 (patch) | |
| tree | 0c691c47d6fc74a1c3b6091ea615d12e980dd83a /src/main/java/gregtech/common | |
| parent | 4fb771c07cefad013da8588db27a46ed0311e367 (diff) | |
| download | GT5-Unofficial-3c5e8ae8274dbafc5a464437f1e910984e4e03f2.tar.gz GT5-Unofficial-3c5e8ae8274dbafc5a464437f1e910984e4e03f2.tar.bz2 GT5-Unofficial-3c5e8ae8274dbafc5a464437f1e910984e4e03f2.zip | |
Optimize addOutput
Signed-off-by: Glease <4586901+Glease@users.noreply.github.com>
Diffstat (limited to 'src/main/java/gregtech/common')
| -rw-r--r-- | src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_Hatch_OutputBus_ME.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_Hatch_OutputBus_ME.java b/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_Hatch_OutputBus_ME.java index 910ad73d65..4d70dd0bdf 100644 --- a/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_Hatch_OutputBus_ME.java +++ b/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_Hatch_OutputBus_ME.java @@ -18,6 +18,7 @@ import appeng.me.helpers.AENetworkProxy; import appeng.me.helpers.IGridProxyable; import appeng.util.Platform; import cpw.mods.fml.common.Optional; +import gregtech.api.GregTech_API; import gregtech.api.enums.ItemList; import gregtech.api.enums.Textures; import gregtech.api.interfaces.ITexture; @@ -60,6 +61,16 @@ public class GT_MetaTileEntity_Hatch_OutputBus_ME extends GT_MetaTileEntity_Hatc getProxy(); } + @Override + public boolean storeAll(ItemStack aStack) { + if (!GregTech_API.mAE2) + return false; + int tTotal = aStack.stackSize; + int tStored = store(aStack); + aStack.stackSize -= tStored; + return tTotal < tStored; + } + @Optional.Method(modid = "appliedenergistics2") public int store(final ItemStack stack) { if (stack == null) |
