Spatial anchor does not respect externally forceloaded chunks when deactivating
thecolonel63 opened this issue ยท 3 comments
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
- Use the forceload command to mark a chunk for force loading.
- Activate a spatial anchor in the chunk.
- Deactivate the spatial anchor.
- 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
I'm aware of potential fixes, but NeoForge 1.20.4+ is our current focus. So no plans to address this, sorry.
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.