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.
Linked issues
duplicates 1
Comments 2
Thank you for your report!
We're tracking this issue in MC-143952, so this ticket is being resolved and linked as a duplicate.
If you would like to add a vote and any extra information to the main ticket it would be appreciated.
If you haven't already, you might like to make use of the search feature to see if the issue has already been mentioned.
Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki
Duplicates MC-143952. This was unknown before because it was unclear that both issues were caused by the same thing.