Skip to content

Presets: Features

PersonTheCat edited this page Jan 11, 2021 · 29 revisions

Getting started

Warning: this information is for version 0.18+ only.

Before you get started writing presets, you should have some awareness of what all they can do.

Features

Cave generator comes equipped with a number of world decorators that you can customize, mix, and match to create various effects underground. Here is a list of those features, what they do, and a few screenshots showing them off.

Tunnels

The tunnels feature is the main generator used by the vanilla game to generate tunnels underground. Most of the values used by the original algorithm have been named and incorporated into the presets so that you can customize them.

Tunnels on the world floor

You can change the shapes and sizes of these tunnels by messing with all sorts of angles and radii. More on that later.

Generating spirals

This algorithm works by generating a series of coordinates, each of which are several blocks apart. We call these "tunnel paths" in Cave Generator. For each chunk, the entirety of every nearby path is generated. If any path component intersects with the current chunk, a sphere is generated at that location. This chain of spheres produces the tunnels we see underground.

Caverns

The caverns generator is probably the most exciting part of Cave Generator. Each cavern generator includes a series of conditions and an array of noise3D blocks. More on those later. These noise settings give you full control over FastNoise and a few extra features.

Simplex noise

Simplex generator

Cellular noise

Cellular noise generator

Ceiling noise

Ceiling noise avoids the surface

Every caverns object is equipped with two noise2D blocks, under ceiling and floor, which are used for smoothly capping off all of your noise3D generators. For best performance, you should try to keep all of your caverns in one single preset to avoid redundant ceiling and floor controllers.

This algorithm works by checking each and every coordinate in the given height range against one of many noise generation algorithms. Take a look at this page on FastNoise for a few extra details.

Clusters

The clusters generator is nothing more than a giant sphere generator that can generate sphere segments in one chunk at a time. These spheres may be stretched or skewed on any axis to create various effects. It can be used to cover your walls with different stone types or even as a makeshift blob generator by adding an optional noise3D block to determine which blocks actually get placed. It is able to place any block, including air.

Generic stone cluster

Note that clusters are the very first feature to generate underground.

Stone Layers

The stoneLayers feature is used to place a series of noise-based layers of blocks underground. This looks great when using several similar layers across all of your biomes, but it is not very advanced and could use work. As always, if you are able to contribute, please create a PR or send me a message on Discord and let me know how you can help.

Stone layers

These layers generate immediately after clusters.

Large Stalactites

The largeStalactites and largeStalagmites features can be used to generate a series of stalactites and stalagmites out of multiple regular blocks. They can also be used to place hanging objects on the ceiling and simulate boulders on the ground.

wide on

Large stalactites (wide)

wide off

Large stalactites

Giant Pillars

The giantPillars feature can be used to generate a series of giant pillars with corner blocks (must be an instance of BlockStairs).

Large stalactites

Cave Blocks

The caveBlocks feature can be used to define which blocks get placed by carvers: tunnels, ravines, rooms, and caverns. They are most often used to place water and lava underground, but can also be used to place any other block. If this array is empty, air will be placed instead.

This is a local feature only and will not affect other presets or caves generated by other mods.

Large Stalactites

Note:

In 0.19, you will be able to place your caveBlocks arrays directly inside of these carvers. The new variable system introduced in 0.18 is intended to facilitate this transition. This not possible in 0.18.

Wall Decorators

The wallDecorators feature can be used to place blocks on or inside of cave walls.

This feature is a local decorator for tunnels, ravines, room, and caverns and will not affect other presets or caves generated by other mods.

Note:

In 0.19, you will be able to place your wallDecorators arrays directly inside of these carvers. The new variable system introduced in 0.18 is intended to facilitate this transition. This not possible in 0.18.

Structures

The structures feature is designed for spawning a handful of small structures in the world. It is ideal for things like giant mushrooms and fossils. It is not intended for spawning structures at a high frequency and there is a soft limit of 32 x 32 blocks in size.

Large Stalactites

Ravines

The ravines feature is a modified tunnels generator which spawns by default with a higher vertical scale and mutations to the sides.

Large Stalactites

Rooms

The rooms feature is a modified tunnels generator which only spawns a single tunnel segment, or sphere. It is placed at the intersection of every high density tunnel cluster, known as a cave system.

Note:

In 0.19, you will be able to place one rooms object inside of each tunnels generator to customize which rooms those tunnels will generate. This is not possible in 0.18.

Conditions

At the root level of each preset, there are a series of conditions that determine when and where each preset can spawn. Here's what they are and what you can do with them.

Key Function
biomes An object controlling which biomes this preset can spawn in.
dimensions An array controlling which dimensions this preset can spawn in.
biomeBlacklist Determines whether the biome list is a blacklist.
dimensionBlacklist Determines whether the dimension list is a blacklist.
minHeight The minimum height bounds for this object.
maxHeight The maximum height bounds for this object.

Note:

In 0.19, these settings will be available in each of the other objects, one level deep. Whatever value is placed at the root level will become the default for all of the other objects. The goal is to consolidate all of your presets into a single file, but this is not yet possible in 0.18.

Continue reading

Continue to presets: getting started

Clone this wiki locally