Chunks forceloaded relatively by non-player entities lose their state on server restart
The /forceload command only seems to really work relatively when a player runs it in their chat. /execute commands ran by functions, to run the command as non-player entities, like armor stands, seem to work until the server is restarted.
What I expected to happen was...:
When I ran the /forceload command as armor stands with a specific tag, through a function, they would keep loading their respective chunks even after a server restart.
What actually happened was...:
Almost all chunks loaded relatively from those entities in this way are unloaded after a server restart.
Steps to Reproduce:
- Create a new superflat void world.
- Run the command "/execute as @e[type=armor_stand,tag=Forceload] at @s run forceload ~ ~" in a looped function or repeat command block.
- /tp yourself to various coordinate points in far away locations distant from each other (like 0,500; 0,1000; 0,-500; etc.) and run the command "/summon armor_stand ~ ~ ~ {NoGravity:1,Tags:["Forceload"]}" at those points. In my case I tried with about 9-11.
- Run the command "/forceload query" to see how many chunks are forceloaded. This should equal the number of armor stands you summoned.
- Restart the server/world and rejoin.
- Run the command "/forceload query" again to see the amount of forceloaded chunks.
- Notice that only 1-2 chunks maximum are still forceloaded, even though the chunks were all forceloaded before.
2020-02-04, 06:18 AM
2022-12-15, 03:38 PM
2022-12-15, 03:38 PM
10
6
-