[][src]Crate fastanvil

For handling Minecraft's region format, Anvil.

anvil::Region can be given a Read and Seek type eg a file in order to extract chunk data.

Modules

biome

functionality relating to Minecraft biomes.

tex

Structs

Block

A block within the world.

Chunk

A Minecraft chunk.

ChunkLocation

The location of chunk data within a Region file.

ChunkMeta

Encodes how the NBT-Data is compressed

Heightmaps

Various heightmaps kept up to date by Minecraft.

Level

A level describes the contents of the chunk in the world.

PackedBits

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.

Region

A Minecraft Region. Allows access to chunk data, handling decompression.

RegionBlockDrawer
RegionMap
RenderedPalette
Section

A vertical section of a chunk (ie a 16x16x16 block cube)

Enums

CompressionScheme

Various compression schemes that NBT data is typically compressed with.

DrawError
Error

Constants

HEADER_SIZE

the size of the region file header.

SECTOR_SIZE

the size in bytes of a 'sector' in a region file. Sectors are Minecraft's size unit for chunks. For example, a chunk might be 3 * SECTOR_SIZE bytes.

Traits

ChunkRender

ChunkRender objects can render a given chunk. What they render to is entirely up to the implementation.

IntoMap
Palette

Palette can be used to take a block description to produce a colour that it should render to.

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).

parse_region

Type Definitions

DrawResult
Result
Rgba