Skip to content

Config File

PersonTheCat edited this page Jan 15, 2021 · 8 revisions

Config Fields

The config file in Cave Generator only contains a few fields. This table shows you each field name and default value paired with a brief description of what it does.

Field Name Default Comment
enableVanillaStoneClusters true Whether to allow vanilla stone clusters to spawn as they usually would.
otherGeneratorsEnabled false Whether to store and attempt to run one other mod's cave generator before this mod.
strictPresets true Whether the game is allowed to crash when detecting invalid settings in your presets.
forceEnableCavernBiomes false Whether to enable the experimental feature of restricting caverns objects by biome.
heightMapDims < 0 > A list of dimensions in which to run HeightMapLocator.

More details

otherGeneratorsEnabled

When this setting is enabled, Cave Generator is able to retain a reference to exactly one other cave generator object, specifically, a MapGenBase object registered by a different mod. For example, the generator registered by Worley's Caves is an instance of MapGenBase and can be stored by Cave Generator. This stored instance will be executed immediately before Cave Generator places its caves underground. The reason for this limitation is that Forge does not keep a list of every other mod generator that tries to replace the caves. When Cave Generator's event listener is called by Forge, it is only aware of the most recent mod to be called before it. This setting is intended to partially circumvent that limitation and enable Cave Generator to run alongside either Worley's Caves or Yung's Better Caves.

strictPresets

When this mod is loading, it will run a series of diagnostics on your presets. These diagnostics provide information about unused fields, unusual settings, and more. Any setting that would break the game, for example, a min value being greater than a max value, will crash the game, by design. Some settings, however, are simply invalid and have no effect. When this setting is enabled, Cave Generator will crash the game to inform you that your settings will not work.

forceEnableCavernBiomes

Most preset features can be restricted to specific biomes. However, caverns cannot be restricted by default. The reason for this is that caverns generate on a per-block basis. They are not blobs which can simply stop spawning at any given point. When you disable them in some biomes, you will experience flat walls where they suddenly stop running.

There is an intended solution for stopping your caverns from generating in some biomes. Create a new clusters object which contains a noise3D and set clusters[i].state to air. Clusters do support biome restrictions and will produce smoother walls as well as improve performance when using multiple generators.

An even better solution would be to add a real blob generator to the mod. I currently do not have time to research how such a generator would be implemented. Please submit a PR or contact me on Discord if you do.

heightMapDims

This is a list of dimensions in which to run HeightMapLocator, which is used to avoid spawning caverns into surface water. You should only enable this in any dimension that spawns regular oceans and rivers.

Continue reading

Continue to Enabling Presets.

Clone this wiki locally