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§
Structs§
- Biome
Data - Block
- Block
Data - CCoord
- Chunk
Data - Chunk
Location - Current
Java Chunk - A Minecraft chunk.
- Heightmaps
- Various heightmaps kept up to date by Minecraft.
- Loader
Error - Packed
Bits - 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. - Palette
Error - RCoord
- Region
- 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. - Region
File Loader - Region
Iter - Region
Map - Rendered
Palette - Section
- A vertical section of a chunk (ie a 16x16x16 block cube)
- Section
Tower - 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.
- States
Iter - Iterator over block state data. Each value is the index into the relevant palette.
- TopShade
Renderer
Enums§
- Block
Archetype - Compression
Scheme - Various compression schemes that NBT data is typically compressed with.
- Error
- Height
Mode - Java
Chunk - A Minecraft chunk.
Statics§
Traits§
- Chunk
- Palette
- Palette can be used to take a block description to produce a colour that it should render to.
- Region
Loader - RegionLoader implmentations provide access to regions. They do not need to be concerned with caching, just providing an object that implements Region.
- Section
Like
Functions§
- bits_
per_ block - Get the number of bits that will be used in
Blockstates
per block. - expand_
blockstates - Expand blockstate data so each block is an element of a
Vec
. - expand_
generic_ 1_ 15 - Expand generic bit-packed data in the 1.15 format, ie data potentially existing across two 64-bit ints.
- expand_
generic_ 1_ 16 - Expand generic bit-packed data in the 1.16 format, ie with padding bits.
- expand_
heightmap - Expand heightmap data. This is equivalent to
expand_generic(data, 9)
. - load_
rendered_ palette - Load a prepared rendered palette. This is for use with the palette.tar.gz alongside the fastnbt project repository.
- render_
region - unstable_
div_ ceil