Applied Energistics 2

Applied Energistics 2

137M Downloads

Spatial anchor does not respect externally forceloaded chunks when deactivating

thecolonel63 opened this issue ยท 3 comments

commented

Describe the bug

When a spatial anchor is deactivated, whether it be by a player removing it from a network or by the network losing power, the chunks that the spatial anchor was keeping loaded are removed from force loading. This is expected behavior. However, if the chunk was already forceloaded before the anchor was activated, and then the anchor becomes deactivated, the chunk will still be removed from force loading, even though it was forceloaded via something else first.

How to reproduce the bug

  1. Use the forceload command to mark a chunk for force loading.
  2. Activate a spatial anchor in the chunk.
  3. Deactivate the spatial anchor.
  4. Query the chunk with "/forceload query ~ ~" -> Chunk is no longer marked for force loading.

Expected behavior

The spatial anchor should respect chunks that were already marked for force loading, and as such should not attempt to remove that status if it was not the first thing to mark a chunk for force loading.

Additional details

I understand that this is a niche scenario. However, I still think this should be looked into. Any other mod or datapack that relies on the forceload command breaks when a player uses a spatial anchor on a network that crosses into externally force loaded chunks.

I've attached a manually triggered crash report as required by the bug report, but this issue does not actually cause any crashing.

Which minecraft version are you using?

1.20

On which mod loaders does it happen?

Fabric

Crash log

https://pastebin.com/nrxnfZvG

commented

I'm aware of potential fixes, but NeoForge 1.20.4+ is our current focus. So no plans to address this, sorry.

commented

That is an unfortunate side effect of how we implemented the anchor on Fabric. It's not really solvable without a complete redesign of the implementation.

commented

can't you just make a seperate list of chunks loaded by a spatial anchor, then when forceloaded chunks are ticked, you can append all of your anchor chunks, that way it hooks into the forceload system for the actual loading of chunks but doesn't cause this issue