Skip to content

Commit

Permalink
Mention how to target unregistered biomes
Browse files Browse the repository at this point in the history
  • Loading branch information
TelepathicGrunt committed Nov 2, 2024
1 parent 94bccc3 commit 4594634
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions docs/worldgen/biomemodifier.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,14 @@ Biome Modifiers are a data-driven system that allows for changing many aspects o
- [Applying Biome Modifiers](#applying-biome-modifiers)
- [Built-in Neoforge Biome Modifiers](#built-in-biome-modifiers)
- [Datagenning Biome Modifiers](#datagenning-biome-modifiers)
- [Targeting Biomes That May Not Exist](#targeting-biomes-that-may-not-exist)


- Modders who want to do custom or complex biome modifications:
- [Applying Biome Modifiers](#applying-biome-modifiers)
- [Creating Custom Biome Modifiers](#creating-custom-biome-modifiers)
- [Datagenning Biome Modifiers](#datagenning-biome-modifiers)
- [Targeting Biomes That May Not Exist](#targeting-biomes-that-may-not-exist)


## Applying Biome Modifiers
Expand Down Expand Up @@ -695,6 +697,24 @@ This will then result in the following JSON being created:
}
```

## Targeting Biomes That May Not Exist

There may be times when a biome modifier needs to target a biome that is not always present in the game. If a biome modifier targets the unregistered biome directly, it will crash on world loading. The way to work around this is to create a biome tag and add the target biome as an optional tag entry by setting required to false for the entry. An example is below:

```json5
{
"replace": false,
"values": [
{
"id": "minecraft:pale_garden",
"required": false
}
]
}
```

Using that biome tag for a biome modifier will now not crash if the biome is not registered. A use case for this is the Pale Garden biome in 1.21.3. That biome is only created when you turn on the Winter Drop datapack in-game. Otherwise, the biome does not exist in the biome registry at all. Another use case can be to target modded biomes while still functioning when the other mods not present.

[datareg]: ../concepts/registries.md#datapack-registries
[staticreg]: ../concepts/registries.md#methods-for-registering
[datapacks]: ../resources/index.md#data
Expand Down

1 comment on commit 4594634

@neoforged-pages-deployments
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deploying with Cloudflare Pages

Name Result
Last commit: 459463466db2dc674016a7396675f188b715e241
Status: ✅ Deploy successful!
Preview URL: https://ac4d7cba.neoforged-docs-previews.pages.dev
PR Preview URL: https://pr-189.neoforged-docs-previews.pages.dev

Please sign in to comment.