Chunk Generator - ShaneBeee/SkBee GitHub Wiki
So you wanna generate a world with Skript?
Well you came to the right place.
[!NOTE]
- You will need to enable
 chunk-generatorin the SkBee config. Because this is a complex system, it is disabled in the config by default.- This will not work for the main/default world. This will only work for worlds created with SkBee's world creator.
 - This will not work if your world is auto-loaded by SkBee, so either disable auto loading in the SkBee config, or make sure to disable auto-load for this specific world in the SkBee Worlds config.
 
[!WARNING]
- This system is still considered highly experimental. I've done a lot of testing but small moves can crash your server.
 
[!TIP] I recommend using SkNoise to generate noise for your biomes/chunks (if you need that)
CHUNK GENERATOR REGISTRATION:
Ok let's talk about registration. We register our chunk generator so we can later pass it over to our world creator to create a world with our new generator.
This structure has a few entires which are optional as well as a few sections which are optional.
Let's start with the structure:
register chunk generator with id %string%
Pretty straight forward here, pick an ID and register your generator, we will later use this with our world creator.
ENTRIES:
(these are all optional, and are false by default)
vanilla decor = By enabling this, Minecraft will decorate the surface and caves based on what the biome tells it to use.
vanilla structures = By enabling this, Minecraft will generate vanilla structures (vanilla decor needs to be enabled for this to work).
vanilla caves = By enabling this, Minecraft will carve caves for you.
vanilla mobs = By enabling this, Minecraft will spawn mobs in new chunks based on biome specifics.
SECTIONS:
(These are all optional, but some do rely on others. height gen and block pop require chunk gen)
biome gen = Generate the biomes to be placed in the world. Further Reading
chunk gen = Generate your surface layer of your world. Further Reading
height gen = Tell Minecraft where the highest block in a chunk is for generating structures. Further Reading
block pop = Used to decorate after initial surface is generated (Structures can be placed during this stage). Further Reading
WORLD CREATOR WITH GENERATOR:
Now that we have registered our chunk generator, let's apply it to our world creator.
Syntax:
set chunk generator of %worldcreator% to chunk generator with id %string%
Example:
on load:
	if world "mars" is not loaded:
		set {_w} to world creator named "mars"
		set chunk generator of {_w} to chunk generator with id "mars"
		load world from creator {_w}
register chunk generator with id "mars":
	chunk gen:
		loop 16 times:
			loop 16 times:
				set {_x} to (loop-number-1) - 1
				set {_z} to (loop-number-2) - 1
				# This is a custom expression I have created in my own script, this is not from SkBee
				# This is just meant to give you an idea of how noise works
				set {_n} to biome noise at vector({_x} + (chunkdata chunk x * 16), 1, {_z} + (chunkdata chunk z * 16))
				# Now we set the blocks from 0 to our noise level filling in our world
				set chunkdata blocks within vector({_x}, 0, {_z}) and vector({_x}, {_n}, {_z}) to red_concrete[]
				# Now we set our surface layer
				set chunkdata block at vector({_x}, {_n}, {_z}) to red_concrete_powder[]
	biome gen:
		# Let's give our world a lil mars lookin biome
		set chunkdata biome to crimson forest