Upgrading v2 to v3 - TerraformersMC/Biolith GitHub Wiki
Upgrading from Biolith v2 to v3
Biolith v3 includes a number of breaking changes in the code and data APIs for sub-biome placement. Generally speaking, if you do not use any sub-biomes, you will not need to modify anything.
in code
Any references to the SubBiomeMatcher class itself should be changed to CriterionBuilder. The names of the factory methods have all changed. Any references to the class in method references should be changed to Criterion.
Examples of changes:
SubBiomeMatcher.BEACHSIDE->CriterionBuilder.BEACHSIDESubBiomeMatcher.of(Criterion...)->CriterionBuilder.allOf(Criterion...)BiomePlacement.addSubOverworld(RegistryKey, RegistryKey, SubBiomeMatcher)->BiomePlacement.addSubOverworld(RegistryKey, RegistryKey, Criterion)- The
invertedfield in Criterion has been removed. Invert criteria usingCriterionBuilder.not.
as data
- The
matcherfield has been replaced withcriterion. - The
criterionfield can be a single criterion object or an array which will be wrapped with anall_ofcriterion. - All criterion
typefields must have their ids prepended withbiolith:(e.g.value->biolith:value) - The
invertedfield in criteria has been removed. Invert criteria by wrapping them in abiolith:notcriterion. - The
distancecriterion type has been renamed tobiolith:deviation.
OLD: :point_down:
{
"sub_biomes": [
{
"dimension": "minecraft:overworld",
"target": "minecraft:desert",
"biome": "minecraft:old_growth_pine_taiga",
"matcher": {
"criteria": [
{
"target": "center",
"type": "ratio",
"max": 0.2,
"invert": true
}
]
}
}
]
}
NEW: :point_down:
{
"sub_biomes": [
{
"dimension": "minecraft:overworld",
"target": "minecraft:desert",
"biome": "minecraft:old_growth_pine_taiga",
"criterion": {
"type": "biolith:not",
"criterion": {
"type": "biolith:ratio",
"target": "center",
"max": 0.2
}
}
}
]
}