Skip to main content

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.

Fields

FieldTypeDefaultDescription
groupRef<GroupEntry>—If left empty, every player has its own group.
modeModeBOOLEANMode for determining the fact valueValues:BOOLEANCODE
biomesList<String>emptyBiome identifiers for BOOLEAN mode. Returns 1 if player is in any of these biomes, 0 otherwise.
codesMap<String, Int>emptyBiome to code mapping for CODE mode. Returns the code for the current biome.
defaultCodeInt0Default code to return if current biome is not in the mapping
ignoreMissingBooleantrueIf true, ignore missing biome identifiers instead of throwing errors
sourceBiomeSourcePLAYER_VIEWWhether to read what the player is shown (overlays included) or what the world containsValues:PLAYER_VIEWREAL_WORLD
Common TypeWriter fields (comment)
FieldTypeDefaultDescription
commentString—A comment to keep track of what this fact is used for.Multi-line

How to use it​

  • BOOLEAN mode returns 1 when the player is in one of biomes (any custom biome when the list is empty), otherwise 0.
  • CODE mode maps each biome in codes to a number and returns defaultCode for the others. It is handy for comparing several biomes with one fact.
  • source picks what is read: PLAYER_VIEW (what the player is shown, overlays included) or REAL_WORLD.