Expand description
For handling Minecraft’s region format, Anvil. This crate is mostly to
support creating maps of Minecraft worlds and is not stable (per-1.0). The
Region
struct is probably the most generally useful part in this crate.
This crate also contains a JavaChunk
that allows deserializing 1.18
down to about 1.15 chunks into some structs. This doesn’t record all
information from a chunk however, eg entities are lost. It is not suitable
for serializing back into a region.
You can create your own chunk structures to (de)serialize using fastnbt
.
Region
can be given a Read
, Write
and Seek
type eg a file in
order to read and write chunk data.
§Crate features
- render - This feature is enabled by default and encapsulates all world-rendering related functionality.
Modules§
- functionality relating to Minecraft biomes.
- 1.2 to 1.12
- 1.13 to 1.17
Structs§
- A Minecraft chunk.
- Various heightmaps kept up to date by Minecraft.
- PackedBits can be used in place of blockstates in chunks to avoid allocating memory for them when they might not be needed. This object by default just retains a reference to the data in the input, and
unpack_into
can be used to get the unpacked version when needed. - A Minecraft Region, allowing reading and writing of chunk data to a stream (eg a File). This does not concern itself with manipulating chunk data, users are expected to use
fastnbt
or other deserialization method to manipulate the chunk data itself. - A vertical section of a chunk (ie a 16x16x16 block cube)
- SectionTower represents the set of sections that make up a Minecraft chunk. It has a custom deserialization in order to more efficiently lay out the sections for quick access.
- Iterator over block state data. Each value is the index into the relevant palette.
Enums§
- Various compression schemes that NBT data is typically compressed with.
- A Minecraft chunk.
Statics§
Traits§
- Palette can be used to take a block description to produce a colour that it should render to.
- RegionLoader implmentations provide access to regions. They do not need to be concerned with caching, just providing an object that implements Region.
Functions§
- Get the number of bits that will be used in
Blockstates
per block. - Expand blockstate data so each block is an element of a
Vec
. - Expand generic bit-packed data in the 1.15 format, ie data potentially existing across two 64-bit ints.
- Expand generic bit-packed data in the 1.16 format, ie with padding bits.
- Expand heightmap data. This is equivalent to
expand_generic(data, 9)
. - Load a prepared rendered palette. This is for use with the palette.tar.gz alongside the fastnbt project repository.