diff options
author | Alkalus <3060479+draknyte1@users.noreply.github.com> | 2018-05-29 14:58:07 +1000 |
---|---|---|
committer | Alkalus <3060479+draknyte1@users.noreply.github.com> | 2018-05-29 14:58:07 +1000 |
commit | f887c642796d77adb7a5baf559092807d8274f81 (patch) | |
tree | abb6f4b20aeeaabf924df119fed0c28b75b3c7c8 /src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations | |
parent | a2377acf4dc0dedc087fe83ca5665d142ab26ba1 (diff) | |
download | GT5-Unofficial-f887c642796d77adb7a5baf559092807d8274f81.tar.gz GT5-Unofficial-f887c642796d77adb7a5baf559092807d8274f81.tar.bz2 GT5-Unofficial-f887c642796d77adb7a5baf559092807d8274f81.zip |
$ More work on threaded super buffers.
$ Fixed the infinite item holder.
Diffstat (limited to 'src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations')
-rw-r--r-- | src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_ThreadedBuffer.java | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_ThreadedBuffer.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_ThreadedBuffer.java index 20e1d726d3..c7914331b7 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_ThreadedBuffer.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_ThreadedBuffer.java @@ -16,7 +16,7 @@ import gregtech.api.enums.Textures; import gregtech.api.interfaces.ITexture; public abstract class GT_MetaTileEntity_ThreadedBuffer extends GT_MetaTileEntity_Buffer { - + protected GregtechBufferThread mLogicThread; public final ItemStack[] mInventorySynchro; @@ -63,7 +63,7 @@ public abstract class GT_MetaTileEntity_ThreadedBuffer extends GT_MetaTileEntity this.mTargetStackSize = 0; this.mInventorySynchro = new ItemStack[aInvSlotCount]; } - + public synchronized final GregtechBufferThread getLogicThread() { if (mLogicThread != null) { return mLogicThread; @@ -297,7 +297,8 @@ public abstract class GT_MetaTileEntity_ThreadedBuffer extends GT_MetaTileEntity } public synchronized void onPostTick(final IGregTechTileEntity aBaseMetaTileEntity, final long aTimer) { - getLogicThread().onPostTick(aBaseMetaTileEntity, aTimer, this); + if (aBaseMetaTileEntity.isServerSide()) + getLogicThread().onPostTick(aBaseMetaTileEntity, aTimer, this); } public void onFirstTick(final IGregTechTileEntity aBaseMetaTileEntity) { @@ -307,7 +308,8 @@ public abstract class GT_MetaTileEntity_ThreadedBuffer extends GT_MetaTileEntity } protected synchronized void moveItems(final IGregTechTileEntity aBaseMetaTileEntity, final long aTimer) { - getLogicThread().moveItems(aBaseMetaTileEntity, aTimer, this); + if (aBaseMetaTileEntity.isServerSide()) + getLogicThread().moveItems(aBaseMetaTileEntity, aTimer, this); } public boolean allowPullStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, @@ -323,9 +325,9 @@ public abstract class GT_MetaTileEntity_ThreadedBuffer extends GT_MetaTileEntity public boolean allowGeneralRedstoneOutput() { return true; } - + //Custom inventory handler - + @Override public synchronized ItemStack[] getRealInventory() { return this.mInventorySynchro; |