use of crazypants.enderio.powertools.machine.capbank.packet.PacketNetworkStateRequest in project EnderIO by SleepyTrousers.
the class GuiCapBank method updateState.
private boolean updateState() {
if (!initState) {
return false;
}
if (capBank.getNetwork() == null) {
network = NULL_NETWORK;
return true;
}
if (network == NULL_NETWORK) {
network = NullHelper.first((CapBankClientNetwork) capBank.getNetwork(), NULL_NETWORK);
initialStateCount = network.getStateUpdateCount();
PacketHandler.INSTANCE.sendToServer(new PacketNetworkStateRequest(capBank));
return true;
}
if (network.getStateUpdateCount() == initialStateCount) {
PacketHandler.INSTANCE.sendToServer(new PacketNetworkStateRequest(capBank));
return true;
}
if (network.getStateUpdateCount() > initialStateCount) {
updateFieldsFromState();
initState = false;
return true;
}
return false;
}
Aggregations