Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v6.0 - BREAKING] Config Format v2.0 #53

Open
null2264 opened this issue Nov 22, 2023 · 0 comments
Open

[v6.0 - BREAKING] Config Format v2.0 #53

null2264 opened this issue Nov 22, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@null2264
Copy link
Owner

null2264 commented Nov 22, 2023

CobbleGen v6.0 will use TOML formatting with support for JSON5 to load config format v1.x.

JSON5

This new format could potentially reduce confusion when trying to define custom gen while keeping it very similar to the old one.

customGen will be removed and merged with "normal gens" (cobbleGen, stoneGen, basaltGen). Users will only need to set "modifier" to whatever block ID they want the modifier to be and set it to empty or * for wildcard (any block).

y level will no longer defined with maxY and minY, it'll be merged into range string instead. The old maxY and minY will still work, but will soon be removed in the future. REF: https://maven.apache.org/enforcer/enforcer-rules/versionRanges.html

{
  <...Gen>: [
    {
      "id": "minecraft:stone",
      "weight": 1.0,
      "modifier": "minecraft:bedrock",  // empty will be default (cobble/stone gen use wildcard, basalt use soul soil) or '*' will be seen as "wildcard"
      "yLevel": "[0,)",  // range is defined from max to min, in this example y level is defined as y level 0 until bedrock.
    },
    {
      "id": "minecraft:basalt",
      "weight": 1.0,
      "modifier": "",  // you can either explicitly set it to empty or remove this line entirely to use default.
    },
    {
      "id": "minecraft:cobblestone",
      "weight": 1.0,
      "modifier": "*",
    },
  ],
}

Meta:

{
  "formatVersion": "2.0",  // Tell CobbleGen which format version to use, letting modpack maker some time to migrate to format 2.0.
}

TOML

Completely change the config formatting. Could be transformed into JSON in the backend to support both TOML and JSON.

[[cobblegen]]  # same as JSON, you can use 'cobblegen', 'basaltgen' and 'stonegen', except they should be written in lowercase.
id = "minecraft:cobblestone"
weight = 1.0
modifier = "*"  # empty will be default (cobble/stone gen use wildcard, basalt use soul soil) or '*' will be seen as "wildcard"

[[cobblegen]]
id = "minecraft:cobbled_deepslate"
weight = 1.0
modifier = "*"
yLevel = "[0,)"  # range is defined from max to min, in this example y level is defined as y level 0 until bedrock.

[[basaltgen]]
id = "minecraft:basalt"
weight = 1.0
modifier = ""  # you can either explicitly set it to empty or remove this line entirely to use default.

# a bit of mouthful, but this is basically means "if lava touch water" (aka cobblegen behaviour).
# [[advancedgen.<source>.<target>]]
[[advancedgen."minecraft:lava"."minecraft:water"]]
id = "minecraft:basalt"
weight = 1.0
modifier = "*"
# Types:
# - cobble: lava touches water (cobblegen)
# - stone: lava touches water from above or water source touched by lava (stonegen)
# - obsidian: lava source touched by water (failed cobblegen)
#
# Will be ignored if target is started with b:, this will cause the generator to turn into basalt type by default. See next example.
type = "stone"

[[advancedgen."minecraft:lava"."b:minecraft:blue_ice"]]
id = "minecraft:basalt"
weight = 1.0
modifier = ""
type = "stone"  # this is ignored, become basalt by default under the hood.
@null2264 null2264 added the enhancement New feature or request label Nov 22, 2023
@null2264 null2264 self-assigned this Nov 22, 2023
@null2264 null2264 changed the title [v6.0 - BREAKING] Format change [v6.0 - BREAKING] Config format v2.0 Dec 3, 2023
@null2264 null2264 pinned this issue Dec 3, 2023
@null2264 null2264 changed the title [v6.0 - BREAKING] Config format v2.0 [v6.0 - BREAKING] Config Format v2.0 Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant