|
|
World gen templates are used to make your custom blocks spawn in a newly generated world. Custom blocks spawn in veins of a random amount of blocks. They may only spawn in a set list of biomes of worlds. Gen templates do also have more specific options that this wiki page will be overviewing.
|
|
|
|
|
|
## Basic gen template example
|
|
|
```
|
|
|
basic-template:
|
|
|
replace: [STONE]
|
|
|
chunk-chance: 0.7
|
|
|
depth: 10=24
|
|
|
vein-size: 5
|
|
|
vein-count: 2
|
|
|
```
|
|
|
When a world is being generated, every chunk has a set chance to be selected in order to spawn a block (`chunk-chance`). You may also configure the depth at which your block will be placed. The `replace` option defines what vanilla blocks your custom block will replace. That means custom blocks cannot spawn midair so that custom ores can spawn inside stone walls just like vanilla ores.
|
|
|
|
|
|
`vein-count` is the amount of veins that will be generated inside a selected chunk, `vein-size` is the amount of custom blocks that will be generated in every block vein.
|
|
|
|
|
|
## Specific options
|
|
|
Use the `slime-chunk` option so that your block may only spawn in slime chunks.
|
|
|
```
|
|
|
template-id:
|
|
|
slime-chunk: true
|
|
|
```
|
|
|
|
|
|
## Biome/World black/whitelist
|
|
|
By adding an entry to the `worlds` list, you can restrict any custom block to a specific set of worlds. If you use `!` before the world name, the world whitelist will turn into a blacklist, and the custom block will spawn anywhere but in the specified worlds.
|
|
|
```
|
|
|
template-id:
|
|
|
worlds:
|
|
|
- world_nether # Just like nether quartz
|
|
|
```
|
|
|
|
|
|
The format is the same for biomes, just use `biomes` instead of `worlds` and input the biomes names ([[spigot docs|https://hub.spigotmc.org/javadocs/spigot/org/bukkit/block/Biome.html]]).
|
|
|
```
|
|
|
template-id:
|
|
|
biomes:
|
|
|
- moutains # Just like emerald
|
|
|
``` |
|
|
\ No newline at end of file |