biome Namespace

These functions apply to biomes, and can be used in two different contexts:

  • In game, these functions can be used to query information about the biome where the player is currently located.

  • During configuration, these functions can be used in a biome condition filter to determine if a rule applies to a given biome.

For a list of possible biome traits refer to Biome Traits.

String biome.getName()

Returns the localized name of the biome.

Returns:

The name of the biome

Return type:

String

String biome.getModId()

Returns the mod ID that the biome is associated with.

Returns:

The biomes mod ID

Return type:

String

String biome.getId()

Returns the resource location ID of the biome.

Returns:

The biome’s resource location ID

Return type:

String

Float biome.getRainfall()

Returns the average rainfall of the biome.

Returns:

Biome’s average rainfall

Return type:

Float

Float biome.getTemperature()

Returns the average temperature of the biome.

Returns:

Biome’s average temperature

Return type:

Float

String biome.getPrecipitationType()

Returns the precipitation that occurs within the biome.

Returns:

The type of precipitation the biome usually has

Return type:

String

String biome.getTraits()

Gets the list of biome trats, as a string.

Returns:

Traits of the biome in a comma separated string

Return type:

String

Boolean biome.is(String trait)

Checks to see if the biome has the specified trait.

Arguments:
  • trait (String()) – The trait to check for

Returns:

Returns true if the biome has the specified trait, false otherwise.

Return type:

Boolean

Boolean biome.isAllOf(String... traits)

Checks to see if the biome has all the specified traits.

Arguments:
  • traits (String[]()) – Array of traits to check for

Returns:

Returns true if the biome has all the specified traits, false otherwise.

Return type:

Boolean

Boolean biome.isOneOf(String... traits)

Checks to see if the biome has at least one of the specified traits.

Arguments:
  • traits (String[]()) – Array of traits to check for

Returns:

Returns true if the biome has one of the specified traits, false otherwise.

Return type:

Boolean