Class PortalInstanceRelinker
PortalDevice component: the component is attached when a player uses the device, and a
repair through a block state swap keeps the loaded entity, so a repaired state's authored block
entity never applies either.
The instance start is the trigger, not the arrival of block entities: PortalInstanceLinks
already knows every recorded device position for the instance, so the work is one section request
per recorded device instead of a check on every block entity that loads anywhere in the universe.
The request loads the device's section wherever it is, however far from any player.
It asks for a ticking section on purpose. A dormant section holds its block entities as holders rather than store entities, so no load system runs against them, and a device that another plugin repairs on load would still read as unrepaired here. A ticking section runs those systems first, so the device is in its final state by the time this re-links it, and its block entity is in the store.
One pass per copy is enough: the re-linked device is marked for saving, so it survives its chunk
unloading and loading again inside the same copy. If its destination died meanwhile,
PortalInvalidDestinationSystem closes it on that
next load, as it does for any other device.
-
Method Summary
-
Method Details
-
relinkAll
-