Redstone Control

Redstone Control

51k Downloads

Server duplicate ID

Gazdea opened this issue ยท 2 comments

commented

image
When loading chunks, a duplicate id occurs every other time
because of this, the schemes stop working
unknown
We cannot understand why this error appears, there was an idea that the scheme was simply copied, but after deleting all the schemes and restoring it (without copying), this error still appears.
Our team would be very happy if you could answer what the problem is

commented

Whenever you connect two ports, the connection is given a unique ID so they can disconnect and reconnect as their chunks get unloaded and loaded without having to check on blocks every time. These ID are assigned using a simple counter that increments every time a new ID is requested.

Normally if the world is shut down the state of this counter is saved to a file to make is persist. But is case of hard server crashes it might not get the chance to save and after restart it might give new connections IDs that are already used by existing connections in the world. This would result in ID conflicts like the ones the log complained about.
Another thing that will cause ID conflicts is if you copy circuits using world editing tools.

One way to fix this is to go to the sub folder data/ in your world save and open the file signalLinkIDs.dat with a program like NBTExplorer and change the value of the nextID variable to a sufficiently large number that has not been assigned yet. The IDs in your log are around 5.000 so setting it to 10.000 or so should be save (the counter can up to 2 billion so wasting a few thousand IDs is not a big deal). After that restart the game and reconnect all wires on devices that are not working properly.