diff options
author | miozune <miozune@gmail.com> | 2022-04-24 15:41:59 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-24 08:41:59 +0200 |
commit | 706976e60669b523a5734722a47f4dd52b2ecd26 (patch) | |
tree | c42821b204daecae1ea8912abc21673d58834a4d /src/main/java/gregtech/api/metatileentity/implementations | |
parent | 16d6c66b59edcb01d3d1505848a7fc5c28b77892 (diff) | |
download | GT5-Unofficial-706976e60669b523a5734722a47f4dd52b2ecd26.tar.gz GT5-Unofficial-706976e60669b523a5734722a47f4dd52b2ecd26.tar.bz2 GT5-Unofficial-706976e60669b523a5734722a47f4dd52b2ecd26.zip |
Use proper method for emptying container item (#1034)
* Use proper method for emptying container item
* Add javadoc
Diffstat (limited to 'src/main/java/gregtech/api/metatileentity/implementations')
-rw-r--r-- | src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicTank.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicTank.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicTank.java index 552d3d6587..bc031e0e6f 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicTank.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicTank.java @@ -38,7 +38,7 @@ public abstract class GT_MetaTileEntity_BasicTank extends GT_MetaTileEntity_Tier public GT_MetaTileEntity_BasicTank(String aName, int aTier, int aInvSlotCount, String aDescription, ITexture[][][] aTextures) { super(aName, aTier, aInvSlotCount, aDescription, aTextures); } - + public GT_MetaTileEntity_BasicTank(String aName, int aTier, int aInvSlotCount, String[] aDescription, ITexture[][][] aTextures) { super(aName, aTier, aInvSlotCount, aDescription, aTextures); } @@ -162,7 +162,7 @@ public abstract class GT_MetaTileEntity_BasicTank extends GT_MetaTileEntity_Tier if (tFluid != null && isFluidInputAllowed(tFluid)) { if (getFillableStack() == null) { if (isFluidInputAllowed(tFluid) && tFluid.amount <= getCapacity()) { - if (aBaseMetaTileEntity.addStackToSlot(getOutputSlot(), GT_Utility.getContainerItem(mInventory[getInputSlot()], true), 1)) { + if (aBaseMetaTileEntity.addStackToSlot(getOutputSlot(), GT_Utility.getContainerForFilledItem(mInventory[getInputSlot()], true), 1)) { setFillableStack(tFluid.copy()); this.onEmptyingContainerWhenEmpty(); aBaseMetaTileEntity.decrStackSize(getInputSlot(), 1); @@ -170,7 +170,7 @@ public abstract class GT_MetaTileEntity_BasicTank extends GT_MetaTileEntity_Tier } } else { if (tFluid.isFluidEqual(getFillableStack()) && ((long)tFluid.amount + getFillableStack().amount) <= (long)getCapacity()) { - if (aBaseMetaTileEntity.addStackToSlot(getOutputSlot(), GT_Utility.getContainerItem(mInventory[getInputSlot()], true), 1)) { + if (aBaseMetaTileEntity.addStackToSlot(getOutputSlot(), GT_Utility.getContainerForFilledItem(mInventory[getInputSlot()], true), 1)) { getFillableStack().amount += tFluid.amount; aBaseMetaTileEntity.decrStackSize(getInputSlot(), 1); } @@ -301,7 +301,7 @@ public abstract class GT_MetaTileEntity_BasicTank extends GT_MetaTileEntity_Tier public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { return aIndex == getInputSlot(); } - + protected void onEmptyingContainerWhenEmpty(){ //Do nothing } |