Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ------------------------------------- File Structure --------------------------------------
- /config/cavegenerator/imports/biomes.cave
- /config/cavegenerator/imports/tunnels.cave
- /config/cavegenerator/imports/common.cave
- /config/cavegenerator/presets/example.cave
- --------------------------------------- biomes.cave ----------------------------------------
- # In this structure, variables are imported only from the imports folder.
- # In my opinion, this will take more effort to learn, but ultimately be
- # the safer choice. And it is my preferred choice.
- # No other fields are allowed in this file except `imports`.
- variables: {
- definitions: {
- # Here we're defining a reusable `biomes` object for forest biomes.
- FOREST_BIOMES: {
- types: ["FOREST"]
- }
- }
- }
- -------------------------------------- tunnels.cave ----------------------------------------
- variables: {
- # Here, we're defining a couple of reusable tunnels objects.
- definitions: {
- # Copied from spirals.cave
- SPIRALS: {
- systemChance: 0.001
- noiseYReduction: false
- dYaw: {
- factor: 1
- randFactor: 0
- startVal: 5
- }
- dPitch: {
- factor: 1
- randFactor: 0
- }
- pitch: {
- startVal: 1
- startValRandFactor: 0
- }
- }
- # I'm leaving a description here to explain this and add some space
- # for readability.
- LARGE_TUNNELS: {
- resizeBranches: false
- scale: {
- startVal: 2.5
- startValRandFactor: 0.9
- }
- scaleY: {
- randFactor: 0.05
- startVal: 0.7
- }
- }
- }
- }
- -------------------------------------- common.cave ----------------------------------------
- # This preset demonstrates how one import file can import from another.
- # Imports *do not* cascade. Therefore, two import files can import from
- # each other with no infinite recursion.
- variables: {
- imports: [
- biomes.cave
- tunnels.cave
- ]
- }
- -------------------------------------- example.cave ---------------------------------------
- enabled: true
- # Inside of our preset, we can import definitions from any preset in the
- # imports folder. We do not lose out on local definitions, but we cannot
- # import from other regular cave presets.
- variables: {
- imports: [
- # Common already imports from biomes and tunnels, so we inherit everything.
- common.cave
- ]
- definitions: {
- # We're also defining a new cave block object to use in-house.
- LAVA: {
- states: [ "lava" ]
- maxHeight: 10
- }
- }
- }
- caveBlocks: [ "$LAVA" ]
- biomes: $FOREST_BIOMES
- blankSlate: false
- tunnels: [
- $SPIRALS
- $LARGE_TUNNELS
- ]
Add Comment
Please, Sign In to add comment