Fixed duplication glitch with storages. Fixes #1881
This commit is contained in:
@@ -35,14 +35,6 @@ public class NetworkNodeGraph implements INetworkNodeGraph {
|
||||
|
||||
@Override
|
||||
public void rebuild() {
|
||||
if (!controller.canRun()) {
|
||||
if (!nodes.isEmpty()) {
|
||||
disconnectAll();
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
rebuilding = true;
|
||||
|
||||
Operator operator = new Operator();
|
||||
|
||||
@@ -99,7 +99,13 @@ public abstract class NetworkNode implements INetworkNode, INetworkNodeVisitor {
|
||||
|
||||
@Override
|
||||
public boolean canUpdate() {
|
||||
return redstoneMode.isEnabled(world, pos);
|
||||
if (redstoneMode.isEnabled(world, pos)) {
|
||||
if (network != null) {
|
||||
return network.canRun();
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
protected int getUpdateThrottleInactiveToActive() {
|
||||
|
||||
@@ -86,7 +86,7 @@ public class TileDiskDrive extends TileNode<NetworkNodeDiskDrive> {
|
||||
public NBTTagCompound writeUpdate(NBTTagCompound tag) {
|
||||
super.writeUpdate(tag);
|
||||
|
||||
writeDiskState(tag, 8, getNode().getNetwork() != null, getNode().getItemDisks(), getNode().getFluidDisks());
|
||||
writeDiskState(tag, 8, getNode().getNetwork() != null && getNode().canUpdate(), getNode().getItemDisks(), getNode().getFluidDisks());
|
||||
|
||||
return tag;
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ public class TileDiskManipulator extends TileNode<NetworkNodeDiskManipulator> {
|
||||
public NBTTagCompound writeUpdate(NBTTagCompound tag) {
|
||||
super.writeUpdate(tag);
|
||||
|
||||
TileDiskDrive.writeDiskState(tag, 6, getNode().getNetwork() != null, getNode().getItemDisks(), getNode().getFluidDisks());
|
||||
TileDiskDrive.writeDiskState(tag, 6, getNode().getNetwork() != null && getNode().canUpdate(), getNode().getItemDisks(), getNode().getFluidDisks());
|
||||
|
||||
return tag;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user