-
Notifications
You must be signed in to change notification settings - Fork 2
Upgrading v2 to v3
gniftygnome edited this page Jun 24, 2024
·
1 revision
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.
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.BEACHSIDE
-
SubBiomeMatcher.of(Criterion...)
->CriterionBuilder.allOf(Criterion...)
-
BiomePlacement.addSubOverworld(RegistryKey, RegistryKey, SubBiomeMatcher)
->BiomePlacement.addSubOverworld(RegistryKey, RegistryKey, Criterion)
- The
inverted
field in Criterion has been removed. Invert criteria usingCriterionBuilder.not
.
- The
matcher
field has been replaced withcriterion
. - The
criterion
field can be a single criterion object or an array which will be wrapped with anall_of
criterion. - All criterion
type
fields must have their ids prepended withbiolith:
(e.g.value
->biolith:value
) - The
inverted
field in criteria has been removed. Invert criteria by wrapping them in abiolith:not
criterion. - The
distance
criterion type has been renamed tobiolith:deviation
.
OLD: 👇
{
"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: 👇
{
"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
}
}
}
]
}