Minecraft – Does `/forceload` generate new chunks

minecraft-commandsminecraft-java-edition

I'm not sure how to test this myself so maybe someone already knows the answer..

Does the /forceload command generate new chunks?

If so, I can then use /forceload to pre-generate the Minecraft world instead of teleporting players around..

This would be useful for pre-generating UHC maps.


Note: You cannot use this command in command blocks. You'd need to write a plugin for your server or write a script that sends commands to your server.


Edit: If anyone has come here to find a script to generate chunks, check out https://github.com/davidcallanan/mc-world-pregenerator

Best Answer

A quick way to test this:

  • Make a new world.
  • /forceload add 1000000 1000000
  • Look in the region folder of the world for the file r.1953.1953.mca.

Result: The file exists. Therefore, /forceload does generate chunks.


Some additional information: Chunk generation happens in multiple phases and there are a few rare cases where the generation can stop after one of these phases (like beyond 30M) and some even rarer ones where it can resume from there later (like when pushing blocks into ungenerated chunks and later walking there).
So I checked with NBTExplorer to see what stage of generation those chunks were in and it turned out to even include ores and structures like mineshafts. I did not find any animals, but I'm not sure if they're even supposed to generate out of player range. Villagers for example would probably generate with villages, as well as their farm animals. Also elder guardians, the Ender dragon, shulkers, woodland mansion mobs, etc.