mirror of
https://github.com/GTNewHorizons/EnderIO.git
synced 2026-11-18 19:39:14 +00:00
Internalize block updates to TileCapacitorBank
This commit is contained in:
1 parent
4d649aa97c
commit
3be94281dd
3 files changed
+8
-4
No files matched your search
@@ -53,7 +53,6 @@ public class PacketIoMode implements IMessage, IMessageHandler<PacketIoMode, IMe
|
||||
if(te instanceof IIoConfigurable) {
|
||||
IIoConfigurable me = (IIoConfigurable) te;
|
||||
me.setIoMode(message.face, message.mode);
|
||||
player.worldObj.markBlockForUpdate(message.x, message.y, message.z);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -69,7 +69,6 @@ public class PacketClientState implements IMessage, IMessageHandler<PacketClient
|
||||
cb.setOutputControlMode(message.outputMode);
|
||||
cb.setMaxInput(message.maxInput);
|
||||
cb.setMaxOutput(message.maxOutput);
|
||||
player.worldObj.markBlockForUpdate(x, y, z);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -154,6 +154,8 @@ public class TileCapacitorBank extends TileEntityEio implements IInternalPowerRe
|
||||
notifyNeighbours = true;
|
||||
}
|
||||
render = true;
|
||||
|
||||
updateBlock();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -425,7 +427,6 @@ public class TileCapacitorBank extends TileEntityEio implements IInternalPowerRe
|
||||
if(mode == IoMode.NONE && !(ph.getDelegate() instanceof IInternalPowerReceptor)) {
|
||||
setIoMode(dir, IoMode.PULL, false);
|
||||
r.mode = IoMode.PULL;
|
||||
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
|
||||
render = true;
|
||||
}
|
||||
}
|
||||
@@ -448,6 +449,7 @@ public class TileCapacitorBank extends TileEntityEio implements IInternalPowerRe
|
||||
|
||||
public void setMaxInput(int maxInput) {
|
||||
getController().doSetMaxInput(maxInput);
|
||||
updateBlock();
|
||||
}
|
||||
|
||||
public int getMaxOutput() {
|
||||
@@ -456,6 +458,7 @@ public class TileCapacitorBank extends TileEntityEio implements IInternalPowerRe
|
||||
|
||||
public void setMaxOutput(int maxOutput) {
|
||||
getController().doSetMaxOutput(maxOutput);
|
||||
updateBlock();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -1128,5 +1131,8 @@ public class TileCapacitorBank extends TileEntityEio implements IInternalPowerRe
|
||||
public boolean isMaxSize() {
|
||||
return isMultiblock() && multiblock.length >= MAX_SIZE;
|
||||
}
|
||||
|
||||
|
||||
private void updateBlock() {
|
||||
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user