Fixed bug where disks have to be re-inserted in the Disk Drive in order to work again after rejoining a chunk, fixes #1259
This commit is contained in:
@@ -1,10 +1,13 @@
|
||||
# Refined Storage Changelog
|
||||
|
||||
### 1.5.8
|
||||
- Fixed bug where disks have to be re-inserted in the Disk Drive in order to work again after rejoining a chunk (raoulvdberge)
|
||||
- Autocrafting can now fill water bottles with water from the fluid storage - regular bottles or pattern for regular bottles are required (raoulvdberge)
|
||||
|
||||
### 1.5.7
|
||||
- Exposed pattern inventory for Pattern Grid (raoulvdberge)
|
||||
- Fixed crashes relating to scrollbar in GUIs (raoulvdberge)
|
||||
- Added advancements (raoulvdberge)
|
||||
- Autocrafting can now fill water bottles with water from the fluid storage - regular bottles or pattern for regular bottles are required (raoulvdberge)
|
||||
|
||||
### 1.5.6
|
||||
- Updated Forge to stable 2387 (raoulvdberge)
|
||||
|
||||
@@ -56,15 +56,17 @@ public class NetworkNodeGraph implements INetworkNodeGraph {
|
||||
currentVisitor.visit(operator);
|
||||
}
|
||||
|
||||
this.nodes = operator.newNodes;
|
||||
this.nodes = operator.foundNodes;
|
||||
|
||||
for (INetworkNode node : operator.newNodes) {
|
||||
node.onConnected(controller);
|
||||
}
|
||||
|
||||
for (INetworkNode node : operator.previousNodes) {
|
||||
node.onDisconnected(controller);
|
||||
|
||||
operator.changed = true;
|
||||
}
|
||||
|
||||
if (operator.changed) {
|
||||
if (!operator.newNodes.isEmpty() || !operator.previousNodes.isEmpty()) {
|
||||
controller.getDataManager().sendParameterToWatchers(TileController.NODES);
|
||||
}
|
||||
}
|
||||
@@ -105,10 +107,10 @@ public class NetworkNodeGraph implements INetworkNodeGraph {
|
||||
}
|
||||
|
||||
private class Operator implements INetworkNodeVisitor.Operator {
|
||||
private Set<INetworkNode> newNodes = Sets.newConcurrentHashSet();
|
||||
private Set<INetworkNode> previousNodes = Sets.newConcurrentHashSet(nodes);
|
||||
private Set<INetworkNode> foundNodes = Sets.newConcurrentHashSet(); // All scanned nodes
|
||||
|
||||
private boolean changed;
|
||||
private Set<INetworkNode> newNodes = Sets.newConcurrentHashSet(); // All scanned new nodes, that didn't appear in the list before
|
||||
private Set<INetworkNode> previousNodes = Sets.newConcurrentHashSet(nodes); // All unscanned nodes (nodes that were in the previous list, but not in the new list)
|
||||
|
||||
private Queue<Visitor> toCheck = new ArrayDeque<>();
|
||||
|
||||
@@ -123,11 +125,12 @@ public class NetworkNodeGraph implements INetworkNodeGraph {
|
||||
INetworkNodeProxy otherNodeProxy = NETWORK_NODE_PROXY_CAPABILITY.cast(tile.getCapability(NETWORK_NODE_PROXY_CAPABILITY, side));
|
||||
INetworkNode otherNode = otherNodeProxy.getNode();
|
||||
|
||||
if (newNodes.add(otherNode)) {
|
||||
if (foundNodes.add(otherNode)) {
|
||||
if (!nodes.contains(otherNode)) {
|
||||
otherNode.onConnected(controller);
|
||||
|
||||
changed = true;
|
||||
// We can't let the node connect immediately
|
||||
// We can only let the node connect AFTER the nodes list has changed in the graph
|
||||
// This is so that storage nodes can refresh the item/fluid cache, and the item/fluid cache will notice it then (otherwise not)
|
||||
newNodes.add(otherNode);
|
||||
}
|
||||
|
||||
previousNodes.remove(otherNode);
|
||||
|
||||
@@ -10,7 +10,6 @@ import net.minecraftforge.fml.common.network.simpleimpl.MessageContext;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
|
||||
|
||||
public class MessageReaderWriterUpdate implements IMessage, IMessageHandler<MessageReaderWriterUpdate, IMessage> {
|
||||
private Collection<String> channels;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user