Mojira Archive
MC-170764

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:

  1. Create a new superflat void world.
  2. Run the command "/execute as @e[type=armor_stand,tag=Forceload] at @s run forceload ~ ~" in a looped function or repeat command block.
  3. /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.
  4. Run the command "/forceload query" to see how many chunks are forceloaded. This should equal the number of armor stands you summoned.
  5. Restart the server/world and rejoin.
  6. Run the command "/forceload query" again to see the amount of forceloaded chunks.
  7. Notice that only 1-2 chunks maximum are still forceloaded, even though the chunks were all forceloaded before.

Duplicate

MaitreDesBlocs

2020-02-04, 06:18 AM

2022-12-15, 03:38 PM

2022-12-15, 03:38 PM

10

6

Community Consensus

Commands

1.15.2 - 1.17.11.15.2, 20w16a, 20w17a, 20w18a, 20w19a, 20w22a, 1.16 Pre-release 1, 1.16 Release Candidate 1, 1.16, 20w27a, 20w28a, 1.17.1

-