biome_property_variable
Returns a property of the player's current biome — variable entry.
Entry Information
| Property | Value |
|---|---|
| Entry ID | biome_property_variable |
| Type | Variable |
| Color | Green |
| Icon | mdi:thermometer |
Description
Variable that returns the player's current biome name. / @Tags("variable") @Entry( "current_biome_variable", "Returns the player's current biome name", Colors.GREEN, icon = "mdi:pine-tree" ) class CurrentBiomeVariableEntry( override val id: String = "", override val name: String = "", @Help("Format for the output: ID returns 'namespace:key', NAME returns readable name") val format: BiomeFormat = BiomeFormat.NAME, ) : VariableEntry { override fun <T : Any> get(context: VarContext<T>): T { val player = context.player val biome = player.location.block.biome val result = when (format) { BiomeFormat.ID -> biome.key.toString() BiomeFormat.NAME -> BiomeResolver.readableName(biome) BiomeFormat.KEY -> biome.key.key BiomeFormat.NAMESPACE -> biome.key.namespace } return context.cast(result) } enum class BiomeFormat { @Help("Returns the full key (e.g., 'minecraft:plains')") ID, @Help("Returns a human-readable name (e.g., 'Plains')") NAME, @Help("Returns just the key part (e.g., 'plains')") KEY, @Help("Returns just the namespace (e.g., 'minecraft' or 'typewriter')") NAMESPACE, } } /** Variable that returns information about a specific biome property. For vanilla biomes, uses Bukkit API for temperature/downfall.
Fields
| Field | Type | Description |
|---|---|---|
property | BiomeProperty | Which property to return |
Usage Example
- entry: biome_property_variable
name: "Returns a property of the player's current biome"
property: ""