amulet.api.chunk.biomes
module¶
- class amulet.api.chunk.biomes.Biomes(array=None)[source]¶
Bases:
object
Biomes is a class used to store a 2D biome array and/or 3D biome array and facilitate switching between them.
There are three states biomes can be in.
The first is a blank state where no biomes are defined. This is used when a chunk is partially generated and the biomes array has not be created.
The second is a 2D array of size (16, 16) used for old Java worlds and Bedrock worlds.
The last is the 3D state used since Java 1.15. See
Biomes3D
for more information.- classmethod from_raw(dimension, d2, d3)[source]¶
Don’t use this method. Use to unpickle data.
- Return type
- property dimension: BiomesShape[source]¶
The number of dimensions the data has
BiomesShape.ShapeNull
when there is no data. Will error if you try accessing data from it without converting to one of the other formats.BiomesShape.Shape2D
when the data is a 2D (16, 16) numpy array.BiomesShape.Shape3D
when the data is a 3D (4, inf, 4)Biome3D
array made of sections of size (4, 4, 4).
- convert_to_2d()[source]¶
Convert the data to the 2D 16x16 format from whatever format it was in.
If it was in the Null state it will be initialised with the first entry in the
BiomeManager
.In this mode this class will behave like a numpy array.
- convert_to_3d()[source]¶
Convert the data to the 3D (4, inf, 4) format from whatever format it was in.
If it was in the Null state it will be initialised with the first entry in the
BiomeManager
.In this mode this class will behave like the
Biome3D
class.