Only issue a network update on TickPhase START
This commit is contained in:
@@ -172,6 +172,7 @@ public class NetworkMaster implements INetworkMaster {
|
||||
INetworkSlave slave = slaves.next();
|
||||
|
||||
if (slave.canUpdate()) {
|
||||
System.out.println("Updating slave " + slave);
|
||||
slave.updateSlave();
|
||||
}
|
||||
|
||||
@@ -185,6 +186,7 @@ public class NetworkMaster implements INetworkMaster {
|
||||
}
|
||||
}
|
||||
}
|
||||
System.out.println("===Done===");
|
||||
|
||||
for (ICraftingTask taskToCancel : craftingTasksToCancel) {
|
||||
taskToCancel.onCancelled(this);
|
||||
|
@@ -11,6 +11,7 @@ import java.util.Map;
|
||||
public class NetworkMasterEventHandler {
|
||||
@SubscribeEvent
|
||||
public void onWorldTick(TickEvent.WorldTickEvent e) {
|
||||
if (e.phase == TickEvent.Phase.START) {
|
||||
Map<BlockPos, INetworkMaster> networks = NetworkMasterRegistry.get(e.world);
|
||||
|
||||
if (networks != null) {
|
||||
@@ -23,11 +24,14 @@ public class NetworkMasterEventHandler {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onWorldLoad(WorldEvent.Load e) {
|
||||
if (!e.getWorld().isRemote) {
|
||||
NetworkMasterSavedData.getOrLoad(e.getWorld());
|
||||
}
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onWorldUnload(WorldEvent.Unload e) {
|
||||
|
@@ -243,7 +243,7 @@ public class GuiGrid extends GuiBase {
|
||||
|
||||
@Override
|
||||
public void drawForeground(int mouseX, int mouseY) {
|
||||
drawString(7, 8, t(grid instanceof WirelessGrid ? "gui.refinedstorage:wireless_grid" : "gui.refinedstorage:grid"));
|
||||
drawString(7, 7, t(grid instanceof WirelessGrid ? "gui.refinedstorage:wireless_grid" : "gui.refinedstorage:grid"));
|
||||
|
||||
if (grid.getType() == EnumGridType.CRAFTING) {
|
||||
drawString(7, 95, t("container.crafting"));
|
||||
|
Reference in New Issue
Block a user