PersonTheCat

Cave Generator Variable Structure A

Jan 2nd, 2021
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.60 KB | None | 0 0
  1. ------------------------------------- File Structure --------------------------------------
  2. /config/cavegenerator/presets/variables.cave
  3. /config/cavegenerator/presets/example.cave
  4.  
  5. ------------------------------------- variables.cave --------------------------------------
  6. # In this structure, variables are imported from any other regular preset.
  7. # Because presets will spawn unwanted caves underground, they would need to
  8. # be disabled if you just want to use them for definitions. In my opinion,
  9. # this structure is easier to understand, but potentially more problematic.
  10. enabled: false
  11. variables: {
  12. definitions: {
  13. # Here we're defining a reusable `biomes` object for forest biomes.
  14. FOREST_BIOMES: {
  15. types: ["FOREST"]
  16. }
  17. }
  18. }
  19.  
  20. -------------------------------------- example.cave ---------------------------------------
  21. enabled: true
  22. # Inside of our preset, we can import definitions from other presets *and*
  23. # define new variables.
  24. variables: {
  25. imports: [
  26. # This import will provide the `FOREST_BIOMES` variable from above.
  27. variables.cave
  28. ]
  29. definitions: {
  30. # We're also defining a new cave block object to use in-house.
  31. LAVA: {
  32. states: [ "lava" ]
  33. maxHeight: 10
  34. }
  35. }
  36. }
  37. # This needs to be put in quotes because, after all, it is just a regular
  38. # string. In this case, because it is on the same line as the array brackets,
  39. # the parser will not be expecting a raw string token. We need to clarify
  40. # that we are just putting a raw string here. Or else, you can use a new line.
  41. caveBlocks: [ "$LAVA" ]
  42. biomes: $FOREST_BIOMES
  43. blankSlate: false
Advertisement
Add Comment
Please, Sign In to add comment