Check if network is loaded. Cherry-pick from #2618

This commit is contained in:
raoulvdberge
2020-07-16 23:52:00 +02:00
parent f6ddf5c3d8
commit 9cbc25efe4
2 changed files with 5 additions and 1 deletions

View File

@@ -133,7 +133,7 @@ public class CrafterNetworkNode extends NetworkNode implements ICraftingPatternC
invalidate(); invalidate();
} }
if (mode == CrafterMode.PULSE_INSERTS_NEXT_SET) { if (mode == CrafterMode.PULSE_INSERTS_NEXT_SET && world.isBlockPresent(pos)) {
if (world.isBlockPowered(pos)) { if (world.isBlockPowered(pos)) {
this.wasPowered = true; this.wasPowered = true;

View File

@@ -71,6 +71,10 @@ public class StorageMonitorNetworkNode extends NetworkNode implements IComparabl
public void update() { public void update() {
super.update(); super.update();
if (!canUpdate()) {
return;
}
int newAmount = getAmount(); int newAmount = getAmount();
if (oldAmount == -1) { if (oldAmount == -1) {