aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/java/gregtech/api/gui/GT_ContainerMetaTile_Machine.java4
-rw-r--r--src/main/java/gregtech/api/gui/GT_Container_BasicTank.java9
2 files changed, 9 insertions, 4 deletions
diff --git a/src/main/java/gregtech/api/gui/GT_ContainerMetaTile_Machine.java b/src/main/java/gregtech/api/gui/GT_ContainerMetaTile_Machine.java
index 5903550a91..c2f2c96b80 100644
--- a/src/main/java/gregtech/api/gui/GT_ContainerMetaTile_Machine.java
+++ b/src/main/java/gregtech/api/gui/GT_ContainerMetaTile_Machine.java
@@ -36,8 +36,8 @@ public class GT_ContainerMetaTile_Machine extends GT_Container {
oOutput = 0,
oInput = 0,
oID = 0,
- oDisplayErrorCode = 0,
- mTimer = 0;
+ oDisplayErrorCode = 0;
+ protected int mTimer = 0;
public GT_ContainerMetaTile_Machine(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) {
diff --git a/src/main/java/gregtech/api/gui/GT_Container_BasicTank.java b/src/main/java/gregtech/api/gui/GT_Container_BasicTank.java
index 5a0f13051a..e8810c14c0 100644
--- a/src/main/java/gregtech/api/gui/GT_Container_BasicTank.java
+++ b/src/main/java/gregtech/api/gui/GT_Container_BasicTank.java
@@ -22,6 +22,7 @@ import net.minecraftforge.fluids.IFluidContainerItem;
public class GT_Container_BasicTank extends GT_ContainerMetaTile_Machine {
public int mContent = 0;
+ private int oContent = 0;
public GT_Container_BasicTank(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) {
super(aInventoryPlayer, aTileEntity);
@@ -212,9 +213,13 @@ public class GT_Container_BasicTank extends GT_ContainerMetaTile_Machine {
mContent = 0;
for (Object crafter : this.crafters) {
ICrafting var1 = (ICrafting) crafter;
- var1.sendProgressBarUpdate(this, 100, mContent & 65535);
- var1.sendProgressBarUpdate(this, 101, mContent >>> 16);
+ if (mTimer % 500 == 0 || oContent != mContent) {
+ var1.sendProgressBarUpdate(this, 100, mContent & 65535);
+ var1.sendProgressBarUpdate(this, 101, mContent >>> 16);
+ }
}
+
+ oContent = mContent;
}
@Override