Skip to content

Biomes - Components Module

anvil.api.biomes.components

BiomeClientAmbientSounds

Bases: BiomeClientComponent

Sets the ambient sounds of the biome. The sounds must be individual named sounds in sounds.json; BiomeClient.ambient_sounds adds the component and registers them.

Parameters:

Name Type Description Default
addition str

Named sound that occasionally plays at the listener position.

required
loop str

Named sound that loops while the listener is inside the biome.

required
mood str

Named sound that rarely plays at a nearby air block when the light level is low. Without it, the biome uses ambient.cave.

required
Documentation reference

__required__ = () class-attribute

JSON keys the schema marks required although their field is optional, because __validate__ requires them.

__from_json__(data) classmethod

Builds the object from its parsed JSON, the inverse of __json__(). Each key goes to the field written under it, read through the field's annotation.

Parameters:

Name Type Description Default
data Any

The parsed JSON object.

required

Raises:

Type Description
TypeError

The data is not an object, or a value does not match its field.

ValueError

The data has a key the class does not write, or a constant field holds another value.

__json__()

The component as {identifier: payload}.

__json_fields__() classmethod

The compiled fields of this class, compiled on first use.

__payload_schema__(definitions) classmethod

The schema of the payload under the identifier.

__post_init__()

Side effects after construction.

__prepare_export__(owner, *, root=True)

Finishes the object for export, where its owner calls it. Components with a localized name override it. root is False for a permutation's components.

__schema__() classmethod

The JSON Schema (draft 2020-12) of this object's JSON, its parts under $defs.

__schema_body__(definitions) classmethod

The schema of {identifier: payload}.

__validate__()

Cross-field checks, run on export after the fields are checked.

BiomeClientAtmosphereIdentifier

Bases: BiomeClientComponent

Sets the atmospherics used in Vibrant Visuals mode.

Parameters:

Name Type Description Default
atmosphere_identifier AtmosphericSettings | str

The atmospherics definition.

required
Documentation reference

__required__ = () class-attribute

JSON keys the schema marks required although their field is optional, because __validate__ requires them.

__from_json__(data) classmethod

Builds the object from its parsed JSON, the inverse of __json__(). Each key goes to the field written under it, read through the field's annotation.

Parameters:

Name Type Description Default
data Any

The parsed JSON object.

required

Raises:

Type Description
TypeError

The data is not an object, or a value does not match its field.

ValueError

The data has a key the class does not write, or a constant field holds another value.

__json__()

The component as {identifier: payload}.

__json_fields__() classmethod

The compiled fields of this class, compiled on first use.

__payload_schema__(definitions) classmethod

The schema of the payload under the identifier.

__post_init__()

Side effects after construction.

__prepare_export__(owner, *, root=True)

Finishes the object for export, where its owner calls it. Components with a localized name override it. root is False for a permutation's components.

__schema__() classmethod

The JSON Schema (draft 2020-12) of this object's JSON, its parts under $defs.

__schema_body__(definitions) classmethod

The schema of {identifier: payload}.

__validate__()

Cross-field checks, run on export after the fields are checked.

BiomeClientColorGradingIdentifier

Bases: BiomeClientComponent

Sets the color grading used in Vibrant Visuals mode.

Parameters:

Name Type Description Default
color_grading_identifier ColorGradingSettings | str

The color grading definition.

required
Documentation reference

__required__ = () class-attribute

JSON keys the schema marks required although their field is optional, because __validate__ requires them.

__from_json__(data) classmethod

Builds the object from its parsed JSON, the inverse of __json__(). Each key goes to the field written under it, read through the field's annotation.

Parameters:

Name Type Description Default
data Any

The parsed JSON object.

required

Raises:

Type Description
TypeError

The data is not an object, or a value does not match its field.

ValueError

The data has a key the class does not write, or a constant field holds another value.

__json__()

The component as {identifier: payload}.

__json_fields__() classmethod

The compiled fields of this class, compiled on first use.

__payload_schema__(definitions) classmethod

The schema of the payload under the identifier.

__post_init__()

Side effects after construction.

__prepare_export__(owner, *, root=True)

Finishes the object for export, where its owner calls it. Components with a localized name override it. root is False for a permutation's components.

__schema__() classmethod

The JSON Schema (draft 2020-12) of this object's JSON, its parts under $defs.

__schema_body__(definitions) classmethod

The schema of {identifier: payload}.

__validate__()

Cross-field checks, run on export after the fields are checked.

BiomeClientComponent

Bases: JsonComponent

Base class of the client biome components, written to the client biome file. BiomeClient takes only these and BiomeServer refuses them.

__required__ = () class-attribute

JSON keys the schema marks required although their field is optional, because __validate__ requires them.

__from_json__(data) classmethod

Builds the object from its parsed JSON, the inverse of __json__(). Each key goes to the field written under it, read through the field's annotation.

Parameters:

Name Type Description Default
data Any

The parsed JSON object.

required

Raises:

Type Description
TypeError

The data is not an object, or a value does not match its field.

ValueError

The data has a key the class does not write, or a constant field holds another value.

__json__()

The component as {identifier: payload}.

__json_fields__() classmethod

The compiled fields of this class, compiled on first use.

__payload_schema__(definitions) classmethod

The schema of the payload under the identifier.

__post_init__()

Side effects after construction.

__prepare_export__(owner, *, root=True)

Finishes the object for export, where its owner calls it. Components with a localized name override it. root is False for a permutation's components.

__schema__() classmethod

The JSON Schema (draft 2020-12) of this object's JSON, its parts under $defs.

__schema_body__(definitions) classmethod

The schema of {identifier: payload}.

__validate__()

Cross-field checks, run on export after the fields are checked.

BiomeClientCubemapIdentifier

Bases: BiomeClientComponent

Sets the cubemap used for the Vibrant Visuals skybox lighting.

Parameters:

Name Type Description Default
cubemap_identifier CubeMapSettings | str

The cubemap definition.

required
Documentation reference

__required__ = () class-attribute

JSON keys the schema marks required although their field is optional, because __validate__ requires them.

__from_json__(data) classmethod

Builds the object from its parsed JSON, the inverse of __json__(). Each key goes to the field written under it, read through the field's annotation.

Parameters:

Name Type Description Default
data Any

The parsed JSON object.

required

Raises:

Type Description
TypeError

The data is not an object, or a value does not match its field.

ValueError

The data has a key the class does not write, or a constant field holds another value.

__json__()

The component as {identifier: payload}.

__json_fields__() classmethod

The compiled fields of this class, compiled on first use.

__payload_schema__(definitions) classmethod

The schema of the payload under the identifier.

__post_init__()

Side effects after construction.

__prepare_export__(owner, *, root=True)

Finishes the object for export, where its owner calls it. Components with a localized name override it. root is False for a permutation's components.

__schema__() classmethod

The JSON Schema (draft 2020-12) of this object's JSON, its parts under $defs.

__schema_body__(definitions) classmethod

The schema of {identifier: payload}.

__validate__()

Cross-field checks, run on export after the fields are checked.

BiomeClientDryFoliageColor

Bases: BiomeClientComponent

Sets the dry foliage color.

Parameters:

Name Type Description Default
color HexRGB | HexRGBA | RGB | RGBA | RGB255 | RGBA255

The dry foliage color. Written as a hex color.

required
Documentation reference

__required__ = () class-attribute

JSON keys the schema marks required although their field is optional, because __validate__ requires them.

__from_json__(data) classmethod

Builds the object from its parsed JSON, the inverse of __json__(). Each key goes to the field written under it, read through the field's annotation.

Parameters:

Name Type Description Default
data Any

The parsed JSON object.

required

Raises:

Type Description
TypeError

The data is not an object, or a value does not match its field.

ValueError

The data has a key the class does not write, or a constant field holds another value.

__json__()

The component as {identifier: payload}.

__json_fields__() classmethod

The compiled fields of this class, compiled on first use.

__payload_schema__(definitions) classmethod

The schema of the payload under the identifier.

__post_init__()

Side effects after construction.

__prepare_export__(owner, *, root=True)

Finishes the object for export, where its owner calls it. Components with a localized name override it. root is False for a permutation's components.

__schema__() classmethod

The JSON Schema (draft 2020-12) of this object's JSON, its parts under $defs.

__schema_body__(definitions) classmethod

The schema of {identifier: payload}.

__validate__()

Cross-field checks, run on export after the fields are checked.

BiomeClientFogAppearance

Bases: BiomeClientComponent

Sets the fog used during rendering.

Parameters:

Name Type Description Default
fog_identifier FogSettings | str

The fog definition.

required
Documentation reference

__required__ = () class-attribute

JSON keys the schema marks required although their field is optional, because __validate__ requires them.

__from_json__(data) classmethod

Builds the object from its parsed JSON, the inverse of __json__(). Each key goes to the field written under it, read through the field's annotation.

Parameters:

Name Type Description Default
data Any

The parsed JSON object.

required

Raises:

Type Description
TypeError

The data is not an object, or a value does not match its field.

ValueError

The data has a key the class does not write, or a constant field holds another value.

__json__()

The component as {identifier: payload}.

__json_fields__() classmethod

The compiled fields of this class, compiled on first use.

__payload_schema__(definitions) classmethod

The schema of the payload under the identifier.

__post_init__()

Side effects after construction.

__prepare_export__(owner, *, root=True)

Finishes the object for export, where its owner calls it. Components with a localized name override it. root is False for a permutation's components.

__schema__() classmethod

The JSON Schema (draft 2020-12) of this object's JSON, its parts under $defs.

__schema_body__(definitions) classmethod

The schema of {identifier: payload}.

__validate__()

Cross-field checks, run on export after the fields are checked.

BiomeClientFoliageAppearance

Bases: BiomeClientComponent

Sets the foliage color or color map.

Parameters:

Name Type Description Default
color HexRGB | HexRGBA | RGB | RGBA | RGB255 | RGBA255 | FoliageColorMap

A color, written as hex, or a color map name, written as {"color_map": name}.

required
Documentation reference

__required__ = () class-attribute

JSON keys the schema marks required although their field is optional, because __validate__ requires them.

__from_json__(data) classmethod

Builds the object from its parsed JSON, the inverse of __json__(). Each key goes to the field written under it, read through the field's annotation.

Parameters:

Name Type Description Default
data Any

The parsed JSON object.

required

Raises:

Type Description
TypeError

The data is not an object, or a value does not match its field.

ValueError

The data has a key the class does not write, or a constant field holds another value.

__json__()

The component as {identifier: payload}.

__json_fields__() classmethod

The compiled fields of this class, compiled on first use.

__payload_schema__(definitions) classmethod

The schema of the payload under the identifier.

__post_init__()

Side effects after construction.

__prepare_export__(owner, *, root=True)

Finishes the object for export, where its owner calls it. Components with a localized name override it. root is False for a permutation's components.

__schema__() classmethod

The JSON Schema (draft 2020-12) of this object's JSON, its parts under $defs.

__schema_body__(definitions) classmethod

The schema of {identifier: payload}.

__validate__()

Cross-field checks, run on export after the fields are checked.

BiomeClientGrassAppearance

Bases: BiomeClientComponent

Sets the grass color or color map.

Parameters:

Name Type Description Default
color HexRGB | HexRGBA | RGB | RGBA | RGB255 | RGBA255 | GrassColorMap

A color, written as hex, or a color map name, written as {"color_map": name}.

required
Documentation reference

__required__ = () class-attribute

JSON keys the schema marks required although their field is optional, because __validate__ requires them.

__from_json__(data) classmethod

Builds the object from its parsed JSON, the inverse of __json__(). Each key goes to the field written under it, read through the field's annotation.

Parameters:

Name Type Description Default
data Any

The parsed JSON object.

required

Raises:

Type Description
TypeError

The data is not an object, or a value does not match its field.

ValueError

The data has a key the class does not write, or a constant field holds another value.

__json__()

The component as {identifier: payload}.

__json_fields__() classmethod

The compiled fields of this class, compiled on first use.

__payload_schema__(definitions) classmethod

The schema of the payload under the identifier.

__post_init__()

Side effects after construction.

__prepare_export__(owner, *, root=True)

Finishes the object for export, where its owner calls it. Components with a localized name override it. root is False for a permutation's components.

__schema__() classmethod

The JSON Schema (draft 2020-12) of this object's JSON, its parts under $defs.

__schema_body__(definitions) classmethod

The schema of {identifier: payload}.

__validate__()

Cross-field checks, run on export after the fields are checked.

BiomeClientLightingIdentifier

Bases: BiomeClientComponent

Sets the lighting used in Vibrant Visuals mode.

Parameters:

Name Type Description Default
lighting_identifier LightingSettings | str

The lighting definition.

required
Documentation reference

__required__ = () class-attribute

JSON keys the schema marks required although their field is optional, because __validate__ requires them.

__from_json__(data) classmethod

Builds the object from its parsed JSON, the inverse of __json__(). Each key goes to the field written under it, read through the field's annotation.

Parameters:

Name Type Description Default
data Any

The parsed JSON object.

required

Raises:

Type Description
TypeError

The data is not an object, or a value does not match its field.

ValueError

The data has a key the class does not write, or a constant field holds another value.

__json__()

The component as {identifier: payload}.

__json_fields__() classmethod

The compiled fields of this class, compiled on first use.

__payload_schema__(definitions) classmethod

The schema of the payload under the identifier.

__post_init__()

Side effects after construction.

__prepare_export__(owner, *, root=True)

Finishes the object for export, where its owner calls it. Components with a localized name override it. root is False for a permutation's components.

__schema__() classmethod

The JSON Schema (draft 2020-12) of this object's JSON, its parts under $defs.

__schema_body__(definitions) classmethod

The schema of {identifier: payload}.

__validate__()

Cross-field checks, run on export after the fields are checked.

BiomeClientMusic

Bases: BiomeClientComponent

Sets the music played in the biome. BiomeClient.biome_music adds the component and registers the music definitions.

Parameters:

Name Type Description Default
music_definition MusicCategory | str

Music played in the biome. Without it the dimension decides; an empty string plays no music.

required
underwater_music MusicCategory | str

Music played underwater in the biome.

required
volume_multiplier float

Applied gradually to the music volume, from 0 to 1.

required
Documentation reference

__required__ = () class-attribute

JSON keys the schema marks required although their field is optional, because __validate__ requires them.

__from_json__(data) classmethod

Builds the object from its parsed JSON, the inverse of __json__(). Each key goes to the field written under it, read through the field's annotation.

Parameters:

Name Type Description Default
data Any

The parsed JSON object.

required

Raises:

Type Description
TypeError

The data is not an object, or a value does not match its field.

ValueError

The data has a key the class does not write, or a constant field holds another value.

__json__()

The component as {identifier: payload}.

__json_fields__() classmethod

The compiled fields of this class, compiled on first use.

__payload_schema__(definitions) classmethod

The schema of the payload under the identifier.

__post_init__()

Side effects after construction.

__prepare_export__(owner, *, root=True)

Finishes the object for export, where its owner calls it. Components with a localized name override it. root is False for a permutation's components.

__schema__() classmethod

The JSON Schema (draft 2020-12) of this object's JSON, its parts under $defs.

__schema_body__(definitions) classmethod

The schema of {identifier: payload}.

__validate__()

Cross-field checks, run on export after the fields are checked.

BiomeClientPrecipitation

Bases: BiomeClientComponent

Sets the precipitation visuals. Set at most one of them.

Parameters:

Name Type Description Default
ash float

Density of ash, as in the soul sand valley.

required
blue_spores float

Density of blue spores, as in the warped forest.

required
red_spores float

Density of red spores, as in the crimson forest.

required
white_ash float

Density of white ash, as in the basalt deltas.

required
Documentation reference

__required__ = () class-attribute

JSON keys the schema marks required although their field is optional, because __validate__ requires them.

__from_json__(data) classmethod

Builds the object from its parsed JSON, the inverse of __json__(). Each key goes to the field written under it, read through the field's annotation.

Parameters:

Name Type Description Default
data Any

The parsed JSON object.

required

Raises:

Type Description
TypeError

The data is not an object, or a value does not match its field.

ValueError

The data has a key the class does not write, or a constant field holds another value.

__json__()

The component as {identifier: payload}.

__json_fields__() classmethod

The compiled fields of this class, compiled on first use.

__payload_schema__(definitions) classmethod

The schema of the payload under the identifier.

__post_init__()

Side effects after construction.

__prepare_export__(owner, *, root=True)

Finishes the object for export, where its owner calls it. Components with a localized name override it. root is False for a permutation's components.

__schema__() classmethod

The JSON Schema (draft 2020-12) of this object's JSON, its parts under $defs.

__schema_body__(definitions) classmethod

The schema of {identifier: payload}.

BiomeClientSkyColor

Bases: BiomeClientComponent

Sets the sky color.

Parameters:

Name Type Description Default
sky_color HexRGB | HexRGBA | RGB | RGBA | RGB255 | RGBA255

The sky color. Written as a hex color.

required
Documentation reference

__required__ = () class-attribute

JSON keys the schema marks required although their field is optional, because __validate__ requires them.

__from_json__(data) classmethod

Builds the object from its parsed JSON, the inverse of __json__(). Each key goes to the field written under it, read through the field's annotation.

Parameters:

Name Type Description Default
data Any

The parsed JSON object.

required

Raises:

Type Description
TypeError

The data is not an object, or a value does not match its field.

ValueError

The data has a key the class does not write, or a constant field holds another value.

__json__()

The component as {identifier: payload}.

__json_fields__() classmethod

The compiled fields of this class, compiled on first use.

__payload_schema__(definitions) classmethod

The schema of the payload under the identifier.

__post_init__()

Side effects after construction.

__prepare_export__(owner, *, root=True)

Finishes the object for export, where its owner calls it. Components with a localized name override it. root is False for a permutation's components.

__schema__() classmethod

The JSON Schema (draft 2020-12) of this object's JSON, its parts under $defs.

__schema_body__(definitions) classmethod

The schema of {identifier: payload}.

__validate__()

Cross-field checks, run on export after the fields are checked.

BiomeClientWaterAppearance

Bases: BiomeClientComponent

Sets the water surface color.

Parameters:

Name Type Description Default
surface_color HexRGB | HexRGBA | RGB | RGBA | RGB255 | RGBA255

The water surface color. Written as a hex color.

required
surface_opacity float

From 0, invisible, to 1, opaque.

required
Documentation reference

__required__ = () class-attribute

JSON keys the schema marks required although their field is optional, because __validate__ requires them.

__from_json__(data) classmethod

Builds the object from its parsed JSON, the inverse of __json__(). Each key goes to the field written under it, read through the field's annotation.

Parameters:

Name Type Description Default
data Any

The parsed JSON object.

required

Raises:

Type Description
TypeError

The data is not an object, or a value does not match its field.

ValueError

The data has a key the class does not write, or a constant field holds another value.

__json__()

The component as {identifier: payload}.

__json_fields__() classmethod

The compiled fields of this class, compiled on first use.

__payload_schema__(definitions) classmethod

The schema of the payload under the identifier.

__post_init__()

Side effects after construction.

__prepare_export__(owner, *, root=True)

Finishes the object for export, where its owner calls it. Components with a localized name override it. root is False for a permutation's components.

__schema__() classmethod

The JSON Schema (draft 2020-12) of this object's JSON, its parts under $defs.

__schema_body__(definitions) classmethod

The schema of {identifier: payload}.

__validate__()

Cross-field checks, run on export after the fields are checked.

BiomeClientWaterIdentifier

Bases: BiomeClientComponent

Sets the water rendering used in Vibrant Visuals mode.

Parameters:

Name Type Description Default
water_identifier WaterSettings | str

The water definition.

required
Documentation reference

__required__ = () class-attribute

JSON keys the schema marks required although their field is optional, because __validate__ requires them.

__from_json__(data) classmethod

Builds the object from its parsed JSON, the inverse of __json__(). Each key goes to the field written under it, read through the field's annotation.

Parameters:

Name Type Description Default
data Any

The parsed JSON object.

required

Raises:

Type Description
TypeError

The data is not an object, or a value does not match its field.

ValueError

The data has a key the class does not write, or a constant field holds another value.

__json__()

The component as {identifier: payload}.

__json_fields__() classmethod

The compiled fields of this class, compiled on first use.

__payload_schema__(definitions) classmethod

The schema of the payload under the identifier.

__post_init__()

Side effects after construction.

__prepare_export__(owner, *, root=True)

Finishes the object for export, where its owner calls it. Components with a localized name override it. root is False for a permutation's components.

__schema__() classmethod

The JSON Schema (draft 2020-12) of this object's JSON, its parts under $defs.

__schema_body__(definitions) classmethod

The schema of {identifier: payload}.

__validate__()

Cross-field checks, run on export after the fields are checked.

BiomeClimate

Bases: JsonComponent

Sets the climate properties of the biome.

Parameters:

Name Type Description Default
temperature float

Temperature affects a variety of visual and behavioral things, including snow and ice placement, sponge drying, and sky color. Between -50.0 and 50.0. Defaults to None.

required
downfall float

Amount that precipitation affects colors and block changes. Setting to 0 will stop rain from falling in the biome. Between 0.0 and 1.0. Defaults to None.

required
snow_accumulation list[float]

Minimum and maximum snow level, each multiple of 0.125 is another snow layer. Exactly 2 values between 0.0 and 1.0. Defaults to None.

required
Documentation reference

__required__ = () class-attribute

JSON keys the schema marks required although their field is optional, because __validate__ requires them.

__from_json__(data) classmethod

Builds the object from its parsed JSON, the inverse of __json__(). Each key goes to the field written under it, read through the field's annotation.

Parameters:

Name Type Description Default
data Any

The parsed JSON object.

required

Raises:

Type Description
TypeError

The data is not an object, or a value does not match its field.

ValueError

The data has a key the class does not write, or a constant field holds another value.

__json__()

The component as {identifier: payload}.

__json_fields__() classmethod

The compiled fields of this class, compiled on first use.

__payload_schema__(definitions) classmethod

The schema of the payload under the identifier.

__post_init__()

Side effects after construction.

__prepare_export__(owner, *, root=True)

Finishes the object for export, where its owner calls it. Components with a localized name override it. root is False for a permutation's components.

__schema__() classmethod

The JSON Schema (draft 2020-12) of this object's JSON, its parts under $defs.

__schema_body__(definitions) classmethod

The schema of {identifier: payload}.

__validate__()

Cross-field checks, run on export after the fields are checked.

BiomeCreatureSpawnProbability

Bases: JsonComponent

Sets the probability that creatures will spawn within the biome when a chunk is generated.

Parameters:

Name Type Description Default
probability float

Probability between 0.0 and 0.75 of creatures spawning within the biome on chunk generation. Defaults to None.

required
Documentation reference

__required__ = () class-attribute

JSON keys the schema marks required although their field is optional, because __validate__ requires them.

__from_json__(data) classmethod

Builds the object from its parsed JSON, the inverse of __json__(). Each key goes to the field written under it, read through the field's annotation.

Parameters:

Name Type Description Default
data Any

The parsed JSON object.

required

Raises:

Type Description
TypeError

The data is not an object, or a value does not match its field.

ValueError

The data has a key the class does not write, or a constant field holds another value.

__json__()

The component as {identifier: payload}.

__json_fields__() classmethod

The compiled fields of this class, compiled on first use.

__payload_schema__(definitions) classmethod

The schema of the payload under the identifier.

__post_init__()

Side effects after construction.

__prepare_export__(owner, *, root=True)

Finishes the object for export, where its owner calls it. Components with a localized name override it. root is False for a permutation's components.

__schema__() classmethod

The JSON Schema (draft 2020-12) of this object's JSON, its parts under $defs.

__schema_body__(definitions) classmethod

The schema of {identifier: payload}.

__validate__()

Cross-field checks, run on export after the fields are checked.

BiomeHumidity

Bases: JsonComponent

Forces a biome to either always be humid or never humid. Humidity affects the spread chance and spread rate of fire in the biome.

Parameters:

Name Type Description Default
is_humid bool

Whether the biome is humid or not. Affects fire spread mechanics. Defaults to None.

required
Documentation reference

__required__ = () class-attribute

JSON keys the schema marks required although their field is optional, because __validate__ requires them.

__from_json__(data) classmethod

Builds the object from its parsed JSON, the inverse of __json__(). Each key goes to the field written under it, read through the field's annotation.

Parameters:

Name Type Description Default
data Any

The parsed JSON object.

required

Raises:

Type Description
TypeError

The data is not an object, or a value does not match its field.

ValueError

The data has a key the class does not write, or a constant field holds another value.

__json__()

The component as {identifier: payload}.

__json_fields__() classmethod

The compiled fields of this class, compiled on first use.

__payload_schema__(definitions) classmethod

The schema of the payload under the identifier.

__post_init__()

Side effects after construction.

__prepare_export__(owner, *, root=True)

Finishes the object for export, where its owner calls it. Components with a localized name override it. root is False for a permutation's components.

__schema__() classmethod

The JSON Schema (draft 2020-12) of this object's JSON, its parts under $defs.

__schema_body__(definitions) classmethod

The schema of {identifier: payload}.

__validate__()

Cross-field checks, run on export after the fields are checked.

BiomeMapTints

Bases: JsonComponent

Sets the color grass and foliage will be tinted by in this biome on the map.

Parameters:

Name Type Description Default
foliage HexRGB | HexRGBA | RGB | RGBA | RGB255 | RGBA255

Sets the color foliage will be tinted by in this biome on the map. Written as a hex color. Defaults to None.

required
grass GrassTint

The color grass is tinted by in this biome on the map. Defaults to None. Set it with set_grass.

required
Documentation reference

__required__ = () class-attribute

JSON keys the schema marks required although their field is optional, because __validate__ requires them.

__from_json__(data) classmethod

Builds the object from its parsed JSON, the inverse of __json__(). Each key goes to the field written under it, read through the field's annotation.

Parameters:

Name Type Description Default
data Any

The parsed JSON object.

required

Raises:

Type Description
TypeError

The data is not an object, or a value does not match its field.

ValueError

The data has a key the class does not write, or a constant field holds another value.

__json__()

The component as {identifier: payload}.

__json_fields__() classmethod

The compiled fields of this class, compiled on first use.

__payload_schema__(definitions) classmethod

The schema of the payload under the identifier.

__post_init__()

Side effects after construction.

__prepare_export__(owner, *, root=True)

Finishes the object for export, where its owner calls it. Components with a localized name override it. root is False for a permutation's components.

__schema__() classmethod

The JSON Schema (draft 2020-12) of this object's JSON, its parts under $defs.

__schema_body__(definitions) classmethod

The schema of {identifier: payload}.

__validate__()

Cross-field checks, run on export after the fields are checked.

set_grass(*, tint)

Sets the color grass is tinted by on the map. See GrassTint for the parameters.

BiomeMountainParameters

Bases: JsonComponent

Noise parameters used to drive mountain terrain generation in Overworld.

Parameters:

Name Type Description Default
steep_material_adjustment SteepMaterialAdjustment

Surface material for steep slopes. Defaults to None.

required
top_slide TopSlide

Top slide settings. Defaults to None.

required
Documentation reference

__required__ = () class-attribute

JSON keys the schema marks required although their field is optional, because __validate__ requires them.

__from_json__(data) classmethod

Builds the object from its parsed JSON, the inverse of __json__(). Each key goes to the field written under it, read through the field's annotation.

Parameters:

Name Type Description Default
data Any

The parsed JSON object.

required

Raises:

Type Description
TypeError

The data is not an object, or a value does not match its field.

ValueError

The data has a key the class does not write, or a constant field holds another value.

__json__()

The component as {identifier: payload}.

__json_fields__() classmethod

The compiled fields of this class, compiled on first use.

__payload_schema__(definitions) classmethod

The schema of the payload under the identifier.

__post_init__()

Side effects after construction.

__prepare_export__(owner, *, root=True)

Finishes the object for export, where its owner calls it. Components with a localized name override it. root is False for a permutation's components.

__schema__() classmethod

The JSON Schema (draft 2020-12) of this object's JSON, its parts under $defs.

__schema_body__(definitions) classmethod

The schema of {identifier: payload}.

__validate__()

Cross-field checks, run on export after the fields are checked.

set_steep_material_adjustment(*, material, north_slopes=None, south_slopes=None, east_slopes=None, west_slopes=None)

Defines surface material for steep slopes.

set_top_slide(*, enabled)

Enable or disable top slide generation.

BiomeMultiNoiseGenerationRules

Bases: JsonComponent

Controls how this biome is instantiated (and then potentially modified) during world generation of the nether.

Parameters:

Name Type Description Default
target_altitude float

Altitude with which this biome should be generated, relative to other biomes. Defaults to None.

required
target_humidity float

Humidity with which this biome should be generated, relative to other biomes. Defaults to None.

required
target_temperature float

Temperature with which this biome should be generated, relative to other biomes. Defaults to None.

required
target_weirdness float

Weirdness with which this biome should be generated, relative to other biomes. Defaults to None.

required
weight float

Weight with which this biome should be generated, relative to other biomes. Defaults to None.

required
Documentation reference

__required__ = () class-attribute

JSON keys the schema marks required although their field is optional, because __validate__ requires them.

__from_json__(data) classmethod

Builds the object from its parsed JSON, the inverse of __json__(). Each key goes to the field written under it, read through the field's annotation.

Parameters:

Name Type Description Default
data Any

The parsed JSON object.

required

Raises:

Type Description
TypeError

The data is not an object, or a value does not match its field.

ValueError

The data has a key the class does not write, or a constant field holds another value.

__json__()

The component as {identifier: payload}.

__json_fields__() classmethod

The compiled fields of this class, compiled on first use.

__payload_schema__(definitions) classmethod

The schema of the payload under the identifier.

__post_init__()

Side effects after construction.

__prepare_export__(owner, *, root=True)

Finishes the object for export, where its owner calls it. Components with a localized name override it. root is False for a permutation's components.

__schema__() classmethod

The JSON Schema (draft 2020-12) of this object's JSON, its parts under $defs.

__schema_body__(definitions) classmethod

The schema of {identifier: payload}.

__validate__()

Cross-field checks, run on export after the fields are checked.

BiomeNoiseGradient

Bases: JsonComponent

Places continuous bands of blocks according to a noise distribution. This surface builder's processing has been implemented with sub-terrain height ranges in mind.

Parameters:

Name Type Description Default
type BiomeNoiseGradientBuilderType

The builder type. Defaults to None.

required
noise_descriptor NoiseDescriptor

The specification for the noise used by the surface builder. Defaults to None.

required
noise_block_specifiers list[NoiseBlockSpecifier]

Which ranges of noise are associated with which blocks.

required
non_replaceable_blocks list[str | Block | BlockDescriptor]

Blocks the surface builder may not replace. Defaults to None.

required
Documentation reference

__required__ = () class-attribute

JSON keys the schema marks required although their field is optional, because __validate__ requires them.

__from_json__(data) classmethod

Builds the object from its parsed JSON, the inverse of __json__(). Each key goes to the field written under it, read through the field's annotation.

Parameters:

Name Type Description Default
data Any

The parsed JSON object.

required

Raises:

Type Description
TypeError

The data is not an object, or a value does not match its field.

ValueError

The data has a key the class does not write, or a constant field holds another value.

__json__()

The component as {identifier: payload}.

__json_fields__() classmethod

The compiled fields of this class, compiled on first use.

__payload_schema__(definitions) classmethod

The schema of the payload under the identifier.

__post_init__()

Side effects after construction.

__prepare_export__(owner, *, root=True)

Finishes the object for export, where its owner calls it. Components with a localized name override it. root is False for a permutation's components.

__schema__() classmethod

The JSON Schema (draft 2020-12) of this object's JSON, its parts under $defs.

__schema_body__(definitions) classmethod

The schema of {identifier: payload}.

__validate__()

Cross-field checks, run on export after the fields are checked.

add_noise_block_specifier(*, specifier)

Adds a noise block specifier associating a noise range or threshold with a block.

set_noise_block_specifiers(*, specifiers)

Sets the noise block specifiers, replacing any already added. At least 1.

set_noise_descriptor(*, noise_descriptor)

Sets the noise descriptor specification for the surface builder.

set_non_replaceable_blocks(*, blocks)

Sets the list of blocks that the surface builder is not allowed to replace.

set_type(*, builder_type)

Sets the builder type for this noise gradient component.

BiomeOverworldGenerationRules

Bases: JsonComponent

Controls how this biome is instantiated (and then potentially modified) during world generation of the overworld.

Parameters:

Name Type Description Default
generate_for_climates list[tuple[BiomeClimateCategory, int]]

The climate categories this biome can spawn for, as [climate, weight] pairs. Defaults to None.

required
hills_transformation str | list[tuple[str, int]]

What biome to switch to when converting to a hilly biome. Defaults to None.

required
mutate_transformation str | list[tuple[str, int]]

What biome to switch to when converting to a mutated biome. Defaults to None.

required
river_transformation str | list[tuple[str, int]]

What biome to switch to when converting to a river biome (if not the Vanilla 'river' biome). Defaults to None.

required
shore_transformation str | list[tuple[str, int]]

What biome to switch to when adjacent to an ocean biome. Defaults to None.

required
Documentation reference

__required__ = () class-attribute

JSON keys the schema marks required although their field is optional, because __validate__ requires them.

__from_json__(data) classmethod

Builds the object from its parsed JSON, the inverse of __json__(). Each key goes to the field written under it, read through the field's annotation.

Parameters:

Name Type Description Default
data Any

The parsed JSON object.

required

Raises:

Type Description
TypeError

The data is not an object, or a value does not match its field.

ValueError

The data has a key the class does not write, or a constant field holds another value.

__json__()

The component as {identifier: payload}.

__json_fields__() classmethod

The compiled fields of this class, compiled on first use.

__payload_schema__(definitions) classmethod

The schema of the payload under the identifier.

__post_init__()

Side effects after construction.

__prepare_export__(owner, *, root=True)

Finishes the object for export, where its owner calls it. Components with a localized name override it. root is False for a permutation's components.

__schema__() classmethod

The JSON Schema (draft 2020-12) of this object's JSON, its parts under $defs.

__schema_body__(definitions) classmethod

The schema of {identifier: payload}.

__validate__()

Cross-field checks, run on export after the fields are checked.

BiomeOverworldHeight

Bases: JsonComponent

Noise parameters used to drive terrain height in the Overworld. Set either noise_params or noise_type.

Parameters:

Name Type Description Default
noise_params tuple[float, float]

First value is depth - more negative means deeper underwater, while more positive means higher. Second value is scale, which affects how much noise changes as it moves from the surface. Defaults to None.

required
noise_type BiomeNoiseType

Specifies a preset based on a built-in setting rather than manually using noise_params. Defaults to None.

required
Documentation reference

__required__ = () class-attribute

JSON keys the schema marks required although their field is optional, because __validate__ requires them.

__from_json__(data) classmethod

Builds the object from its parsed JSON, the inverse of __json__(). Each key goes to the field written under it, read through the field's annotation.

Parameters:

Name Type Description Default
data Any

The parsed JSON object.

required

Raises:

Type Description
TypeError

The data is not an object, or a value does not match its field.

ValueError

The data has a key the class does not write, or a constant field holds another value.

__json__()

The component as {identifier: payload}.

__json_fields__() classmethod

The compiled fields of this class, compiled on first use.

__payload_schema__(definitions) classmethod

The schema of the payload under the identifier.

__post_init__()

Side effects after construction.

__prepare_export__(owner, *, root=True)

Finishes the object for export, where its owner calls it. Components with a localized name override it. root is False for a permutation's components.

__schema__() classmethod

The JSON Schema (draft 2020-12) of this object's JSON, its parts under $defs.

__schema_body__(definitions) classmethod

The schema of {identifier: payload}.

BiomePartiallyFrozen

Bases: JsonComponent

Impacts the temperature in a frozen biome, causing some areas to not be frozen. For example patchy ice or patchy snow.

Documentation reference

__required__ = () class-attribute

JSON keys the schema marks required although their field is optional, because __validate__ requires them.

__from_json__(data) classmethod

Builds the object from its parsed JSON, the inverse of __json__(). Each key goes to the field written under it, read through the field's annotation.

Parameters:

Name Type Description Default
data Any

The parsed JSON object.

required

Raises:

Type Description
TypeError

The data is not an object, or a value does not match its field.

ValueError

The data has a key the class does not write, or a constant field holds another value.

__json__()

The component as {identifier: payload}.

__json_fields__() classmethod

The compiled fields of this class, compiled on first use.

__payload_schema__(definitions) classmethod

The schema of the payload under the identifier.

__post_init__()

Side effects after construction.

__prepare_export__(owner, *, root=True)

Finishes the object for export, where its owner calls it. Components with a localized name override it. root is False for a permutation's components.

__schema__() classmethod

The JSON Schema (draft 2020-12) of this object's JSON, its parts under $defs.

__schema_body__(definitions) classmethod

The schema of {identifier: payload}.

__validate__()

Cross-field checks, run on export after the fields are checked.

BiomeReplaceBiomes

Bases: JsonComponent

Replaces a specified portion of one or more Minecraft biomes.

Parameters:

Name Type Description Default
replacements list[BiomeReplacement]

The replacements. Set them directly or add them with add_replacement.

required
Documentation reference

__required__ = () class-attribute

JSON keys the schema marks required although their field is optional, because __validate__ requires them.

__from_json__(data) classmethod

Builds the object from its parsed JSON, the inverse of __json__(). Each key goes to the field written under it, read through the field's annotation.

Parameters:

Name Type Description Default
data Any

The parsed JSON object.

required

Raises:

Type Description
TypeError

The data is not an object, or a value does not match its field.

ValueError

The data has a key the class does not write, or a constant field holds another value.

__json__()

The component as {identifier: payload}.

__json_fields__() classmethod

The compiled fields of this class, compiled on first use.

__payload_schema__(definitions) classmethod

The schema of the payload under the identifier.

__post_init__()

Side effects after construction.

__prepare_export__(owner, *, root=True)

Finishes the object for export, where its owner calls it. Components with a localized name override it. root is False for a permutation's components.

__schema__() classmethod

The JSON Schema (draft 2020-12) of this object's JSON, its parts under $defs.

__schema_body__(definitions) classmethod

The schema of {identifier: payload}.

__validate__()

Cross-field checks, run on export after the fields are checked.

add_replacement(*, targets, amount, noise_frequency_scale, dimension=Dimension.Overworld)

Add a biome replacement configuration. See BiomeReplacement for the parameters.

Returns:

Name Type Description
BiomeReplaceBiomes

Self for method chaining.

BiomeReplacement

Bases: JsonObject

One biome replacement.

Parameters:

Name Type Description Default
targets list[MinecraftBiomeTypes | str]

Biomes that are going to be replaced by the overriding biome. Target biomes must not contain namespaces.

required
amount float

Noise value used to determine whether or not the replacement is attempted, similar to a percentage. Must be in the range (0.0, 1.0].

required
noise_frequency_scale float

Scaling value used to alter the frequency of replacement attempts. A lower frequency will mean a bigger contiguous biome area that occurs less often. A higher frequency will mean smaller contiguous biome areas that occur more often. Must be in the range (0.0, 100.0].

required
dimension Dimension

Dimension in which this replacement can happen: 'minecraft:overworld' or 'minecraft:nether'. Defaults to "minecraft:overworld".

required

__required__ = () class-attribute

JSON keys the schema marks required although their field is optional, because __validate__ requires them.

__from_json__(data) classmethod

Builds the object from its parsed JSON, the inverse of __json__(). Each key goes to the field written under it, read through the field's annotation.

Parameters:

Name Type Description Default
data Any

The parsed JSON object.

required

Raises:

Type Description
TypeError

The data is not an object, or a value does not match its field.

ValueError

The data has a key the class does not write, or a constant field holds another value.

__json__()

The JSON payload of this object, built from its fields after checking them.

__json_fields__() classmethod

The compiled fields of this class, compiled on first use.

__post_init__()

Side effects after construction.

__prepare_export__(owner, *, root=True)

Finishes the object for export, where its owner calls it. Components with a localized name override it. root is False for a permutation's components.

__schema__() classmethod

The JSON Schema (draft 2020-12) of this object's JSON, its parts under $defs.

__schema_body__(definitions) classmethod

The schema of this object's JSON, adding the parts it uses to definitions.

Parameters:

Name Type Description Default
definitions dict[str, JsonSchema]

The $defs of the schema being built.

required

__validate__()

Cross-field checks, run on export after the fields are checked.

BiomeSubSurfaceBuilder

Bases: _BaseBiomeSurfaceBuilder

Allow specifying a minecraft:surface_builder to be applied to biomes located underneath regular terrain surface.

Documentation reference

__required__ = () class-attribute

JSON keys the schema marks required although their field is optional, because __validate__ requires them.

__from_json__(data) classmethod

Builds the object from its parsed JSON, the inverse of __json__(). Each key goes to the field written under it, read through the field's annotation.

Parameters:

Name Type Description Default
data Any

The parsed JSON object.

required

Raises:

Type Description
TypeError

The data is not an object, or a value does not match its field.

ValueError

The data has a key the class does not write, or a constant field holds another value.

__json__()

The component as {identifier: payload}.

__json_fields__() classmethod

The compiled fields of this class, compiled on first use.

__payload_schema__(definitions) classmethod

The schema of the payload under the identifier.

__post_init__()

Side effects after construction.

__prepare_export__(owner, *, root=True)

Finishes the object for export, where its owner calls it. Components with a localized name override it. root is False for a permutation's components.

__schema__() classmethod

The JSON Schema (draft 2020-12) of this object's JSON, its parts under $defs.

__schema_body__(definitions) classmethod

The schema of {identifier: payload}.

__validate__()

Cross-field checks, run on export after the fields are checked.

set_capped_builder(*, beach_material, ceiling_materials, floor_materials, foundation_material, sea_material)

Generates surface on blocks with non-solid blocks above or below.

set_end_builder()

Use default Minecraft End terrain generation.

set_frozen_ocean_builder(*, foundation_material, mid_material, sea_floor_material, sea_material, top_material, sea_floor_depth=None)

Similar to overworld_surface. Adds icebergs.

set_mesa_builder(*, clay_material, foundation_material, hard_clay_material, mid_material, sea_floor_material, sea_material, top_material, bryce_pillars=None, has_forest=None, sea_floor_depth=None)

Similar to overworld_surface. Adds colored strata and optional pillars.

set_noise_gradient_builder(*, noise_descriptor, noise_block_specifiers, non_replaceable_blocks=None)

Places continuous bands of blocks according to a noise distribution.

Parameters:

Name Type Description Default
noise_descriptor NoiseDescriptor

The NoiseDescriptor used by the surface builder.

required
noise_block_specifiers list[NoiseBlockSpecifier]

The noise block specifiers defining which ranges of noise are associated with which blocks.

required
non_replaceable_blocks list[str | Block | BlockDescriptor]

Blocks that the surface builder is not allowed to replace. Defaults to None.

None

set_overworld_builder(*, foundation_material, mid_material, sea_floor_material, sea_material, top_material, sea_floor_depth=None)

Controls the blocks used for the default Minecraft Overworld terrain generation.

set_swamp_builder(*, foundation_material, mid_material, sea_floor_material, sea_material, top_material, sea_floor_depth=None, max_puddle_depth_below_sea_level=None)

Used to add decoration to the surface of swamp biomes such as water lilies.

BiomeSurfaceBuilder

Bases: _BaseBiomeSurfaceBuilder

Controls the materials used for terrain generation.

Documentation reference

__required__ = () class-attribute

JSON keys the schema marks required although their field is optional, because __validate__ requires them.

__from_json__(data) classmethod

Builds the object from its parsed JSON, the inverse of __json__(). Each key goes to the field written under it, read through the field's annotation.

Parameters:

Name Type Description Default
data Any

The parsed JSON object.

required

Raises:

Type Description
TypeError

The data is not an object, or a value does not match its field.

ValueError

The data has a key the class does not write, or a constant field holds another value.

__json__()

The component as {identifier: payload}.

__json_fields__() classmethod

The compiled fields of this class, compiled on first use.

__payload_schema__(definitions) classmethod

The schema of the payload under the identifier.

__post_init__()

Side effects after construction.

__prepare_export__(owner, *, root=True)

Finishes the object for export, where its owner calls it. Components with a localized name override it. root is False for a permutation's components.

__schema__() classmethod

The JSON Schema (draft 2020-12) of this object's JSON, its parts under $defs.

__schema_body__(definitions) classmethod

The schema of {identifier: payload}.

__validate__()

Cross-field checks, run on export after the fields are checked.

set_capped_builder(*, beach_material, ceiling_materials, floor_materials, foundation_material, sea_material)

Generates surface on blocks with non-solid blocks above or below.

set_end_builder()

Use default Minecraft End terrain generation.

set_frozen_ocean_builder(*, foundation_material, mid_material, sea_floor_material, sea_material, top_material, sea_floor_depth=None)

Similar to overworld_surface. Adds icebergs.

set_mesa_builder(*, clay_material, foundation_material, hard_clay_material, mid_material, sea_floor_material, sea_material, top_material, bryce_pillars=None, has_forest=None, sea_floor_depth=None)

Similar to overworld_surface. Adds colored strata and optional pillars.

set_noise_gradient_builder(*, noise_descriptor, noise_block_specifiers, non_replaceable_blocks=None)

Places continuous bands of blocks according to a noise distribution.

Parameters:

Name Type Description Default
noise_descriptor NoiseDescriptor

The NoiseDescriptor used by the surface builder.

required
noise_block_specifiers list[NoiseBlockSpecifier]

The noise block specifiers defining which ranges of noise are associated with which blocks.

required
non_replaceable_blocks list[str | Block | BlockDescriptor]

Blocks that the surface builder is not allowed to replace. Defaults to None.

None

set_overworld_builder(*, foundation_material, mid_material, sea_floor_material, sea_material, top_material, sea_floor_depth=None)

Controls the blocks used for the default Minecraft Overworld terrain generation.

set_swamp_builder(*, foundation_material, mid_material, sea_floor_material, sea_material, top_material, sea_floor_depth=None, max_puddle_depth_below_sea_level=None)

Used to add decoration to the surface of swamp biomes such as water lilies.

BiomeSurfaceMaterialAdjustments

Bases: JsonComponent

Specify fine-detail changes to blocks used in terrain generation (based on a noise function).

Parameters:

Name Type Description Default
adjustments list[SurfaceMaterialAdjustment]

The adjustments. Set them directly or add them with add_adjustment.

required
Documentation reference

__required__ = () class-attribute

JSON keys the schema marks required although their field is optional, because __validate__ requires them.

__from_json__(data) classmethod

Builds the object from its parsed JSON, the inverse of __json__(). Each key goes to the field written under it, read through the field's annotation.

Parameters:

Name Type Description Default
data Any

The parsed JSON object.

required

Raises:

Type Description
TypeError

The data is not an object, or a value does not match its field.

ValueError

The data has a key the class does not write, or a constant field holds another value.

__json__()

The component as {identifier: payload}.

__json_fields__() classmethod

The compiled fields of this class, compiled on first use.

__payload_schema__(definitions) classmethod

The schema of the payload under the identifier.

__post_init__()

Side effects after construction.

__prepare_export__(owner, *, root=True)

Finishes the object for export, where its owner calls it. Components with a localized name override it. root is False for a permutation's components.

__schema__() classmethod

The JSON Schema (draft 2020-12) of this object's JSON, its parts under $defs.

__schema_body__(definitions) classmethod

The schema of {identifier: payload}.

__validate__()

Cross-field checks, run on export after the fields are checked.

add_adjustment(*, height_range=None, noise_frequency_scale=None, noise_range=None, foundation_material=None, mid_material=None, sea_floor_material=None, sea_material=None, top_material=None)

Adds an adjustment. See SurfaceMaterialAdjustment and SurfaceAdjustmentMaterials for the parameters.

BiomeTags

Bases: JsonComponent

Attach arbitrary string tags to this biome. Most biome tags are referenced by JSON settings, but some meanings of tags are directly implemented in the game's code.

Parameters:

Name Type Description Default
tags list[str | MinecraftBiomeTags]

Array of string tags used by other systems such as entity spawning. Common tags include: birch, cold, deep, desert, extreme_hills, flower_forest, forest, forest_generation, frozen, ice, ice_plains, jungle, hills, meadow, mesa, mountain, mutated, no_legacy_worldgen, ocean, pale_garden, plains, rare, swamp, taiga. Defaults to None.

required
Documentation reference

__required__ = () class-attribute

JSON keys the schema marks required although their field is optional, because __validate__ requires them.

__from_json__(data) classmethod

Builds the object from its parsed JSON, the inverse of __json__(). Each key goes to the field written under it, read through the field's annotation.

Parameters:

Name Type Description Default
data Any

The parsed JSON object.

required

Raises:

Type Description
TypeError

The data is not an object, or a value does not match its field.

ValueError

The data has a key the class does not write, or a constant field holds another value.

__json__()

The component as {identifier: payload}.

__json_fields__() classmethod

The compiled fields of this class, compiled on first use.

__payload_schema__(definitions) classmethod

The schema of the payload under the identifier.

__post_init__()

Side effects after construction.

__prepare_export__(owner, *, root=True)

Finishes the object for export, where its owner calls it. Components with a localized name override it. root is False for a permutation's components.

__schema__() classmethod

The JSON Schema (draft 2020-12) of this object's JSON, its parts under $defs.

__schema_body__(definitions) classmethod

The schema of {identifier: payload}.

__validate__()

Cross-field checks, run on export after the fields are checked.

BiomeVillageType

Bases: JsonComponent

Determines the type of village for the Biome.

Parameters:

Name Type Description Default
type BiomeVillageTypes

The village type for this biome. Must be one of: "default", "desert", "ice", "savanna", "taiga".

required
Documentation reference

__required__ = () class-attribute

JSON keys the schema marks required although their field is optional, because __validate__ requires them.

__from_json__(data) classmethod

Builds the object from its parsed JSON, the inverse of __json__(). Each key goes to the field written under it, read through the field's annotation.

Parameters:

Name Type Description Default
data Any

The parsed JSON object.

required

Raises:

Type Description
TypeError

The data is not an object, or a value does not match its field.

ValueError

The data has a key the class does not write, or a constant field holds another value.

__json__()

The component as {identifier: payload}.

__json_fields__() classmethod

The compiled fields of this class, compiled on first use.

__payload_schema__(definitions) classmethod

The schema of the payload under the identifier.

__post_init__()

Side effects after construction.

__prepare_export__(owner, *, root=True)

Finishes the object for export, where its owner calls it. Components with a localized name override it. root is False for a permutation's components.

__schema__() classmethod

The JSON Schema (draft 2020-12) of this object's JSON, its parts under $defs.

__schema_body__(definitions) classmethod

The schema of {identifier: payload}.

__validate__()

Cross-field checks, run on export after the fields are checked.

CappedSurface

Bases: Surface

Generates surface on blocks with non-solid blocks above or below.

Parameters:

Name Type Description Default
beach_material str | Block | BlockDescriptor

The block used for beaches.

required
ceiling_materials list[str | Block | BlockDescriptor]

Blocks used for ceilings, at least 1.

required
floor_materials list[str | Block | BlockDescriptor]

Blocks used for floors, at least 1.

required
foundation_material str | Block | BlockDescriptor

The block used deep underground.

required
sea_material str | Block | BlockDescriptor

The block used in bodies of water.

required

__required__ = () class-attribute

JSON keys the schema marks required although their field is optional, because __validate__ requires them.

__from_json__(data) classmethod

Builds the object from its parsed JSON, the inverse of __json__(). Each key goes to the field written under it, read through the field's annotation.

Parameters:

Name Type Description Default
data Any

The parsed JSON object.

required

Raises:

Type Description
TypeError

The data is not an object, or a value does not match its field.

ValueError

The data has a key the class does not write, or a constant field holds another value.

__json__()

The JSON payload of this object, built from its fields after checking them.

__json_fields__() classmethod

The compiled fields of this class, compiled on first use.

__post_init__()

Side effects after construction.

__prepare_export__(owner, *, root=True)

Finishes the object for export, where its owner calls it. Components with a localized name override it. root is False for a permutation's components.

__schema__() classmethod

The JSON Schema (draft 2020-12) of this object's JSON, its parts under $defs.

__schema_body__(definitions) classmethod

The schema of this object's JSON, adding the parts it uses to definitions.

Parameters:

Name Type Description Default
definitions dict[str, JsonSchema]

The $defs of the schema being built.

required

__validate__()

Cross-field checks, run on export after the fields are checked.

FrozenOceanSurface

Bases: OverworldSurface

Similar to the overworld surface. Adds icebergs.

__required__ = () class-attribute

JSON keys the schema marks required although their field is optional, because __validate__ requires them.

__from_json__(data) classmethod

Builds the object from its parsed JSON, the inverse of __json__(). Each key goes to the field written under it, read through the field's annotation.

Parameters:

Name Type Description Default
data Any

The parsed JSON object.

required

Raises:

Type Description
TypeError

The data is not an object, or a value does not match its field.

ValueError

The data has a key the class does not write, or a constant field holds another value.

__json__()

The JSON payload of this object, built from its fields after checking them.

__json_fields__() classmethod

The compiled fields of this class, compiled on first use.

__post_init__()

Side effects after construction.

__prepare_export__(owner, *, root=True)

Finishes the object for export, where its owner calls it. Components with a localized name override it. root is False for a permutation's components.

__schema__() classmethod

The JSON Schema (draft 2020-12) of this object's JSON, its parts under $defs.

__schema_body__(definitions) classmethod

The schema of this object's JSON, adding the parts it uses to definitions.

Parameters:

Name Type Description Default
definitions dict[str, JsonSchema]

The $defs of the schema being built.

required

__validate__()

Cross-field checks, run on export after the fields are checked.

GrassTint

Bases: JsonObject

The color grass is tinted by on the map, for BiomeMapTints.

Parameters:

Name Type Description Default
tint HexRGB | HexRGBA | RGB | RGBA | RGB255 | RGBA255

The tint color. Written as a hex color.

required

__required__ = () class-attribute

JSON keys the schema marks required although their field is optional, because __validate__ requires them.

__from_json__(data) classmethod

Builds the object from its parsed JSON, the inverse of __json__(). Each key goes to the field written under it, read through the field's annotation.

Parameters:

Name Type Description Default
data Any

The parsed JSON object.

required

Raises:

Type Description
TypeError

The data is not an object, or a value does not match its field.

ValueError

The data has a key the class does not write, or a constant field holds another value.

__json__()

The JSON payload of this object, built from its fields after checking them.

__json_fields__() classmethod

The compiled fields of this class, compiled on first use.

__post_init__()

Side effects after construction.

__prepare_export__(owner, *, root=True)

Finishes the object for export, where its owner calls it. Components with a localized name override it. root is False for a permutation's components.

__schema__() classmethod

The JSON Schema (draft 2020-12) of this object's JSON, its parts under $defs.

__schema_body__(definitions) classmethod

The schema of this object's JSON, adding the parts it uses to definitions.

Parameters:

Name Type Description Default
definitions dict[str, JsonSchema]

The $defs of the schema being built.

required

__validate__()

Cross-field checks, run on export after the fields are checked.

MesaSurface

Bases: OverworldSurface

Similar to the overworld surface. Adds colored strata and optional pillars.

Parameters:

Name Type Description Default
clay_material str | Block | BlockDescriptor

The base clay block.

required
hard_clay_material str | Block | BlockDescriptor

The hardened clay block.

required
bryce_pillars bool

Whether to add Bryce pillars.

required
has_forest bool

Whether to add a forest on top.

required

__required__ = () class-attribute

JSON keys the schema marks required although their field is optional, because __validate__ requires them.

__from_json__(data) classmethod

Builds the object from its parsed JSON, the inverse of __json__(). Each key goes to the field written under it, read through the field's annotation.

Parameters:

Name Type Description Default
data Any

The parsed JSON object.

required

Raises:

Type Description
TypeError

The data is not an object, or a value does not match its field.

ValueError

The data has a key the class does not write, or a constant field holds another value.

__json__()

The JSON payload of this object, built from its fields after checking them.

__json_fields__() classmethod

The compiled fields of this class, compiled on first use.

__post_init__()

Side effects after construction.

__prepare_export__(owner, *, root=True)

Finishes the object for export, where its owner calls it. Components with a localized name override it. root is False for a permutation's components.

__schema__() classmethod

The JSON Schema (draft 2020-12) of this object's JSON, its parts under $defs.

__schema_body__(definitions) classmethod

The schema of this object's JSON, adding the parts it uses to definitions.

Parameters:

Name Type Description Default
definitions dict[str, JsonSchema]

The $defs of the schema being built.

required

__validate__()

Cross-field checks, run on export after the fields are checked.

NoiseBlockSpecifier

Bases: JsonObject

A block placed where the noise is above a threshold, or inside a range.

Parameters:

Name Type Description Default
block str | Block | BlockDescriptor

The block placed.

required
noise str

The noise sampled. Defaults to the builder's noise.

required
threshold float

The block is placed where the noise is above this value. Set this or range.

required
range tuple[float, float]

The block is placed where the noise is inside this (min, max) range, each in [-1, 1]. Set this or threshold.

required

__required__ = () class-attribute

JSON keys the schema marks required although their field is optional, because __validate__ requires them.

__from_json__(data) classmethod

Builds the object from its parsed JSON, the inverse of __json__(). Each key goes to the field written under it, read through the field's annotation.

Parameters:

Name Type Description Default
data Any

The parsed JSON object.

required

Raises:

Type Description
TypeError

The data is not an object, or a value does not match its field.

ValueError

The data has a key the class does not write, or a constant field holds another value.

__json__()

The JSON payload of this object, built from its fields after checking them.

__json_fields__() classmethod

The compiled fields of this class, compiled on first use.

__post_init__()

Side effects after construction.

__prepare_export__(owner, *, root=True)

Finishes the object for export, where its owner calls it. Components with a localized name override it. root is False for a permutation's components.

__schema__() classmethod

The JSON Schema (draft 2020-12) of this object's JSON, its parts under $defs.

__schema_body__(definitions) classmethod

The schema of this object's JSON, adding the parts it uses to definitions.

Parameters:

Name Type Description Default
definitions dict[str, JsonSchema]

The $defs of the schema being built.

required

NoiseDescriptor

Bases: JsonObject

The noise a noise gradient surface builder samples.

Parameters:

Name Type Description Default
name str

The name of the noise.

required
first_octave int

The first octave of the noise.

required
amplitudes list[float]

The amplitude of each octave, at least 1.

required

__required__ = () class-attribute

JSON keys the schema marks required although their field is optional, because __validate__ requires them.

__from_json__(data) classmethod

Builds the object from its parsed JSON, the inverse of __json__(). Each key goes to the field written under it, read through the field's annotation.

Parameters:

Name Type Description Default
data Any

The parsed JSON object.

required

Raises:

Type Description
TypeError

The data is not an object, or a value does not match its field.

ValueError

The data has a key the class does not write, or a constant field holds another value.

__json__()

The JSON payload of this object, built from its fields after checking them.

__json_fields__() classmethod

The compiled fields of this class, compiled on first use.

__post_init__()

Side effects after construction.

__prepare_export__(owner, *, root=True)

Finishes the object for export, where its owner calls it. Components with a localized name override it. root is False for a permutation's components.

__schema__() classmethod

The JSON Schema (draft 2020-12) of this object's JSON, its parts under $defs.

__schema_body__(definitions) classmethod

The schema of this object's JSON, adding the parts it uses to definitions.

Parameters:

Name Type Description Default
definitions dict[str, JsonSchema]

The $defs of the schema being built.

required

__validate__()

Cross-field checks, run on export after the fields are checked.

NoiseGradientSurface

Bases: Surface

Places continuous bands of blocks according to a noise distribution.

Parameters:

Name Type Description Default
noise_descriptor NoiseDescriptor

The noise used by the surface builder.

required
noise_block_specifiers list[NoiseBlockSpecifier]

Which noise ranges map to which blocks, at least 1.

required
non_replaceable_blocks list[str | Block | BlockDescriptor]

Blocks the builder may not replace.

required

__required__ = () class-attribute

JSON keys the schema marks required although their field is optional, because __validate__ requires them.

__from_json__(data) classmethod

Builds the object from its parsed JSON, the inverse of __json__(). Each key goes to the field written under it, read through the field's annotation.

Parameters:

Name Type Description Default
data Any

The parsed JSON object.

required

Raises:

Type Description
TypeError

The data is not an object, or a value does not match its field.

ValueError

The data has a key the class does not write, or a constant field holds another value.

__json__()

The JSON payload of this object, built from its fields after checking them.

__json_fields__() classmethod

The compiled fields of this class, compiled on first use.

__post_init__()

Side effects after construction.

__prepare_export__(owner, *, root=True)

Finishes the object for export, where its owner calls it. Components with a localized name override it. root is False for a permutation's components.

__schema__() classmethod

The JSON Schema (draft 2020-12) of this object's JSON, its parts under $defs.

__schema_body__(definitions) classmethod

The schema of this object's JSON, adding the parts it uses to definitions.

Parameters:

Name Type Description Default
definitions dict[str, JsonSchema]

The $defs of the schema being built.

required

__validate__()

Cross-field checks, run on export after the fields are checked.

OverworldSurface

Bases: Surface

Controls the blocks used for the default Minecraft Overworld terrain generation.

Parameters:

Name Type Description Default
foundation_material str | Block | BlockDescriptor

The block used deep underground.

required
mid_material str | Block | BlockDescriptor

The block used in a layer below the surface.

required
sea_floor_material str | Block | BlockDescriptor

The block used as the floor of bodies of water.

required
sea_material str | Block | BlockDescriptor

The block used in bodies of water.

required
top_material str | Block | BlockDescriptor

The block used for the surface.

required
sea_floor_depth int

How deep the sea floor material goes, up to 127.

required

__required__ = () class-attribute

JSON keys the schema marks required although their field is optional, because __validate__ requires them.

__from_json__(data) classmethod

Builds the object from its parsed JSON, the inverse of __json__(). Each key goes to the field written under it, read through the field's annotation.

Parameters:

Name Type Description Default
data Any

The parsed JSON object.

required

Raises:

Type Description
TypeError

The data is not an object, or a value does not match its field.

ValueError

The data has a key the class does not write, or a constant field holds another value.

__json__()

The JSON payload of this object, built from its fields after checking them.

__json_fields__() classmethod

The compiled fields of this class, compiled on first use.

__post_init__()

Side effects after construction.

__prepare_export__(owner, *, root=True)

Finishes the object for export, where its owner calls it. Components with a localized name override it. root is False for a permutation's components.

__schema__() classmethod

The JSON Schema (draft 2020-12) of this object's JSON, its parts under $defs.

__schema_body__(definitions) classmethod

The schema of this object's JSON, adding the parts it uses to definitions.

Parameters:

Name Type Description Default
definitions dict[str, JsonSchema]

The $defs of the schema being built.

required

__validate__()

Cross-field checks, run on export after the fields are checked.

SteepMaterialAdjustment

Bases: JsonObject

Surface material for steep slopes.

Parameters:

Name Type Description Default
material str | Block | BlockDescriptor

The block used on steep slopes.

required
north_slopes bool

Enable for north-facing slopes. Defaults to None.

required
south_slopes bool

Enable for south-facing slopes. Defaults to None.

required
east_slopes bool

Enable for east-facing slopes. Defaults to None.

required
west_slopes bool

Enable for west-facing slopes. Defaults to None.

required

__required__ = () class-attribute

JSON keys the schema marks required although their field is optional, because __validate__ requires them.

__from_json__(data) classmethod

Builds the object from its parsed JSON, the inverse of __json__(). Each key goes to the field written under it, read through the field's annotation.

Parameters:

Name Type Description Default
data Any

The parsed JSON object.

required

Raises:

Type Description
TypeError

The data is not an object, or a value does not match its field.

ValueError

The data has a key the class does not write, or a constant field holds another value.

__json__()

The JSON payload of this object, built from its fields after checking them.

__json_fields__() classmethod

The compiled fields of this class, compiled on first use.

__post_init__()

Side effects after construction.

__prepare_export__(owner, *, root=True)

Finishes the object for export, where its owner calls it. Components with a localized name override it. root is False for a permutation's components.

__schema__() classmethod

The JSON Schema (draft 2020-12) of this object's JSON, its parts under $defs.

__schema_body__(definitions) classmethod

The schema of this object's JSON, adding the parts it uses to definitions.

Parameters:

Name Type Description Default
definitions dict[str, JsonSchema]

The $defs of the schema being built.

required

__validate__()

Cross-field checks, run on export after the fields are checked.

Surface

Bases: JsonObject

Base of the surface builder variants. Each variant fixes its own type.

__required__ = () class-attribute

JSON keys the schema marks required although their field is optional, because __validate__ requires them.

__from_json__(data) classmethod

Builds the object from its parsed JSON, the inverse of __json__(). Each key goes to the field written under it, read through the field's annotation.

Parameters:

Name Type Description Default
data Any

The parsed JSON object.

required

Raises:

Type Description
TypeError

The data is not an object, or a value does not match its field.

ValueError

The data has a key the class does not write, or a constant field holds another value.

__json__()

The JSON payload of this object, built from its fields after checking them.

__json_fields__() classmethod

The compiled fields of this class, compiled on first use.

__post_init__()

Side effects after construction.

__prepare_export__(owner, *, root=True)

Finishes the object for export, where its owner calls it. Components with a localized name override it. root is False for a permutation's components.

__schema__() classmethod

The JSON Schema (draft 2020-12) of this object's JSON, its parts under $defs.

__schema_body__(definitions) classmethod

The schema of this object's JSON, adding the parts it uses to definitions.

Parameters:

Name Type Description Default
definitions dict[str, JsonSchema]

The $defs of the schema being built.

required

__validate__()

Cross-field checks, run on export after the fields are checked.

SurfaceAdjustmentMaterials

Bases: JsonObject

The blocks a surface material adjustment uses while it is active.

Parameters:

Name Type Description Default
foundation_material str | Block | BlockDescriptor

The block used deep underground.

required
mid_material str | Block | BlockDescriptor

The block used in a layer below the surface.

required
sea_floor_material str | Block | BlockDescriptor

The block used as the floor of bodies of water.

required
sea_material str | Block | BlockDescriptor

The block used in bodies of water.

required
top_material str | Block | BlockDescriptor

The block used for the surface.

required

__required__ = () class-attribute

JSON keys the schema marks required although their field is optional, because __validate__ requires them.

__from_json__(data) classmethod

Builds the object from its parsed JSON, the inverse of __json__(). Each key goes to the field written under it, read through the field's annotation.

Parameters:

Name Type Description Default
data Any

The parsed JSON object.

required

Raises:

Type Description
TypeError

The data is not an object, or a value does not match its field.

ValueError

The data has a key the class does not write, or a constant field holds another value.

__json__()

The JSON payload of this object, built from its fields after checking them.

__json_fields__() classmethod

The compiled fields of this class, compiled on first use.

__post_init__()

Side effects after construction.

__prepare_export__(owner, *, root=True)

Finishes the object for export, where its owner calls it. Components with a localized name override it. root is False for a permutation's components.

__schema__() classmethod

The JSON Schema (draft 2020-12) of this object's JSON, its parts under $defs.

__schema_body__(definitions) classmethod

The schema of this object's JSON, adding the parts it uses to definitions.

Parameters:

Name Type Description Default
definitions dict[str, JsonSchema]

The $defs of the schema being built.

required

__validate__()

Cross-field checks, run on export after the fields are checked.

SurfaceMaterialAdjustment

Bases: JsonObject

An adjustment to generated terrain, replacing blocks based on the specified settings.

Parameters:

Name Type Description Default
height_range tuple[float | str, float | str]

The range of heights [min, max] for which this adjustment applies. Each bound is a number or a Molang expression.

required
noise_frequency_scale float

The scale to multiply by the position when accessing the noise value for the material adjustments.

required
noise_range tuple[float, float]

The range of noise values [min, max] for which this adjustment applies.

required
materials SurfaceAdjustmentMaterials

The blocks used while this adjustment is active.

required

__required__ = () class-attribute

JSON keys the schema marks required although their field is optional, because __validate__ requires them.

__from_json__(data) classmethod

Builds the object from its parsed JSON, the inverse of __json__(). Each key goes to the field written under it, read through the field's annotation.

Parameters:

Name Type Description Default
data Any

The parsed JSON object.

required

Raises:

Type Description
TypeError

The data is not an object, or a value does not match its field.

ValueError

The data has a key the class does not write, or a constant field holds another value.

__json__()

The JSON payload of this object, built from its fields after checking them.

__json_fields__() classmethod

The compiled fields of this class, compiled on first use.

__post_init__()

Side effects after construction.

__prepare_export__(owner, *, root=True)

Finishes the object for export, where its owner calls it. Components with a localized name override it. root is False for a permutation's components.

__schema__() classmethod

The JSON Schema (draft 2020-12) of this object's JSON, its parts under $defs.

__schema_body__(definitions) classmethod

The schema of this object's JSON, adding the parts it uses to definitions.

Parameters:

Name Type Description Default
definitions dict[str, JsonSchema]

The $defs of the schema being built.

required

__validate__()

Cross-field checks, run on export after the fields are checked.

SwampSurface

Bases: OverworldSurface

Used to add decoration to the surface of swamp biomes such as water lilies.

Parameters:

Name Type Description Default
max_puddle_depth_below_sea_level int

How deep puddles may go, up to 127.

required

__required__ = () class-attribute

JSON keys the schema marks required although their field is optional, because __validate__ requires them.

__from_json__(data) classmethod

Builds the object from its parsed JSON, the inverse of __json__(). Each key goes to the field written under it, read through the field's annotation.

Parameters:

Name Type Description Default
data Any

The parsed JSON object.

required

Raises:

Type Description
TypeError

The data is not an object, or a value does not match its field.

ValueError

The data has a key the class does not write, or a constant field holds another value.

__json__()

The JSON payload of this object, built from its fields after checking them.

__json_fields__() classmethod

The compiled fields of this class, compiled on first use.

__post_init__()

Side effects after construction.

__prepare_export__(owner, *, root=True)

Finishes the object for export, where its owner calls it. Components with a localized name override it. root is False for a permutation's components.

__schema__() classmethod

The JSON Schema (draft 2020-12) of this object's JSON, its parts under $defs.

__schema_body__(definitions) classmethod

The schema of this object's JSON, adding the parts it uses to definitions.

Parameters:

Name Type Description Default
definitions dict[str, JsonSchema]

The $defs of the schema being built.

required

__validate__()

Cross-field checks, run on export after the fields are checked.

TheEndSurface

Bases: Surface

Use default Minecraft End terrain generation.

__required__ = () class-attribute

JSON keys the schema marks required although their field is optional, because __validate__ requires them.

__from_json__(data) classmethod

Builds the object from its parsed JSON, the inverse of __json__(). Each key goes to the field written under it, read through the field's annotation.

Parameters:

Name Type Description Default
data Any

The parsed JSON object.

required

Raises:

Type Description
TypeError

The data is not an object, or a value does not match its field.

ValueError

The data has a key the class does not write, or a constant field holds another value.

__json__()

The JSON payload of this object, built from its fields after checking them.

__json_fields__() classmethod

The compiled fields of this class, compiled on first use.

__post_init__()

Side effects after construction.

__prepare_export__(owner, *, root=True)

Finishes the object for export, where its owner calls it. Components with a localized name override it. root is False for a permutation's components.

__schema__() classmethod

The JSON Schema (draft 2020-12) of this object's JSON, its parts under $defs.

__schema_body__(definitions) classmethod

The schema of this object's JSON, adding the parts it uses to definitions.

Parameters:

Name Type Description Default
definitions dict[str, JsonSchema]

The $defs of the schema being built.

required

__validate__()

Cross-field checks, run on export after the fields are checked.

TopSlide

Bases: JsonObject

Controls the top slide of mountain terrain.

Parameters:

Name Type Description Default
enabled bool

Whether top slide generation is enabled.

required

__required__ = () class-attribute

JSON keys the schema marks required although their field is optional, because __validate__ requires them.

__from_json__(data) classmethod

Builds the object from its parsed JSON, the inverse of __json__(). Each key goes to the field written under it, read through the field's annotation.

Parameters:

Name Type Description Default
data Any

The parsed JSON object.

required

Raises:

Type Description
TypeError

The data is not an object, or a value does not match its field.

ValueError

The data has a key the class does not write, or a constant field holds another value.

__json__()

The JSON payload of this object, built from its fields after checking them.

__json_fields__() classmethod

The compiled fields of this class, compiled on first use.

__post_init__()

Side effects after construction.

__prepare_export__(owner, *, root=True)

Finishes the object for export, where its owner calls it. Components with a localized name override it. root is False for a permutation's components.

__schema__() classmethod

The JSON Schema (draft 2020-12) of this object's JSON, its parts under $defs.

__schema_body__(definitions) classmethod

The schema of this object's JSON, adding the parts it uses to definitions.

Parameters:

Name Type Description Default
definitions dict[str, JsonSchema]

The $defs of the schema being built.

required

__validate__()

Cross-field checks, run on export after the fields are checked.