Versions in this module Expand all Collapse all v0 v0.0.4 Jan 4, 2021 Changes in this version + const SubChunkVersion + var AirRuntimeID uint32 + var FilteringBlocks = make([]uint8, 0, 7000) + var LightBlocks = make([]uint8, 0, 7000) + var RuntimeIDToState func(runtimeID uint32) (name string, properties map[string]interface{}, found bool) + var StateToRuntimeID func(name string, properties map[string]interface{}) (runtimeID uint32, found bool) + func FillLight(c *Chunk) + func SpreadLight(c *Chunk, neighbours []*Chunk) + type BlockStorage struct + func (storage *BlockStorage) Palette() *Palette + func (storage *BlockStorage) RuntimeID(x, y, z byte) uint32 + func (storage *BlockStorage) SetRuntimeID(x, y, z byte, runtimeID uint32) + type Chunk struct + func DiskDecode(data SerialisedData) (*Chunk, error) + func NetworkDecode(data []byte, subChunkCount int) (*Chunk, error) + func New() *Chunk + func (chunk *Chunk) BiomeID(x, z uint8) uint8 + func (chunk *Chunk) BlockNBT() map[[3]int]map[string]interface{} + func (chunk *Chunk) Compact() + func (chunk *Chunk) HighestBlock(x, z uint8) uint8 + func (chunk *Chunk) HighestLightBlocker(x, z uint8) uint8 + func (chunk *Chunk) Light(x, y, z uint8) uint8 + func (chunk *Chunk) RuntimeID(x, y, z uint8, layer uint8) uint32 + func (chunk *Chunk) SetBiomeID(x, z, biomeID uint8) + func (chunk *Chunk) SetBlockNBT(pos [3]int, data map[string]interface{}) + func (chunk *Chunk) SetRuntimeID(x, y, z uint8, layer uint8, runtimeID uint32) + func (chunk *Chunk) SkyLight(x, y, z uint8) uint8 + func (chunk *Chunk) Sub() []*SubChunk + type Palette struct + func (palette *Palette) Add(runtimeID uint32) uint16 + func (palette *Palette) Index(runtimeID uint32) int + func (palette *Palette) Len() int + func (palette *Palette) Replace(f func(runtimeID uint32) uint32) + func (palette *Palette) RuntimeID(paletteIndex uint16) uint32 + type SerialisedData struct + BlockNBT []byte + Data2D []byte + SubChunks [16][]byte + func DiskEncode(c *Chunk, blob bool) (d SerialisedData) + func NetworkEncode(c *Chunk) (d SerialisedData) + type SubChunk struct + func (sub *SubChunk) Layer(layer uint8) *BlockStorage + func (sub *SubChunk) Layers() []*BlockStorage + func (sub *SubChunk) Light(x, y, z byte) uint8 + func (sub *SubChunk) RuntimeID(x, y, z byte, layer uint8) uint32 + func (sub *SubChunk) SetRuntimeID(x, y, z byte, layer uint8, runtimeID uint32) + func (sub *SubChunk) SkyLightAt(x, y, z byte) uint8