Player Biome Fact
Expose the player's current biome as a fact value
Fact entry that exposes player's current biome as a fact value. Supports both vanilla and custom biomes.
字段
| 字段 | 类型 | 默认值 | 描述 |
|---|---|---|---|
group | Ref<GroupEntry> | — | If left empty, every player has its own group. |
mode | Mode | BOOLEAN | Mode for determining the fact value可选值:BOOLEANCODE |
biomes | List<String> | empty | Biome identifiers for BOOLEAN mode. Returns 1 if player is in any of these biomes, 0 otherwise. |
codes | Map<String, Int> | empty | Biome to code mapping for CODE mode. Returns the code for the current biome. |
defaultCode | Int | 0 | Default code to return if current biome is not in the mapping |
ignoreMissing | Boolean | true | If true, ignore missing biome identifiers instead of throwing errors |
source | BiomeSource | PLAYER_VIEW | Whether to read what the player is shown (overlays included) or what the world contains可选值:PLAYER_VIEWREAL_WORLD |
TypeWriter 通用字段(comment)
| 字段 | 类型 | 默认值 | 描述 |
|---|---|---|---|
comment | String | — | A comment to keep track of what this fact is used for.多行 |
How to use it
BOOLEANmode returns1when the player is in one ofbiomes(any custom biome when the list is empty), otherwise0.CODEmode maps each biome incodesto a number and returnsdefaultCodefor the others. It is handy for comparing several biomes with one fact.sourcepicks what is read:PLAYER_VIEW(what the player is shown, overlays included) orREAL_WORLD.