Documentation ¶
Index ¶
Constants ¶
View Source
const ( ErrChunkNotExist sentinel = "chunk does not exist" // ErrChunkNotGenerated indicates that the requested chunk has not been generated yet. ErrChunkNotGenerated sentinel = "chunk not generated" )
Variables ¶
View Source
var ( Decompressor = [4]func(io.Reader) (io.Reader, error){ func(_ io.Reader) (io.Reader, error) { return nil, fmt.Errorf("unknown compression 0x00") }, func(in io.Reader) (io.Reader, error) { return gzip.NewReader(in) }, func(in io.Reader) (io.Reader, error) { return zlib.NewReader(in) }, func(in io.Reader) (io.Reader, error) { return in, nil }, } )
Functions ¶
func ChunkHeightmap ¶
Types ¶
type CarvingMasks ¶
type CompressionType ¶
type CompressionType byte
const ( CompressionGZip CompressionType = iota + 1 // GZip CompressionZlib // Zlib CompressionUncompressed // uncompressed )
func (CompressionType) String ¶
func (i CompressionType) String() string
type Heightmapper ¶
type Heightmaps ¶
type Heightmaps struct { MotionBlocking []int64 MotionBlockingNoLeaves []int64 OceanFloor []int64 OceanFloorWG []int64 WorldSurface []int64 WorldSurfaceWG []int64 }
func (Heightmaps) ToNBT ¶
func (h Heightmaps) ToNBT() nbt.Tag
type Section ¶
Section is a 16x16x16 cube, which is part of a chunk. A chunk consists of multiple sections, where the actual block data is stored.
func ChunkSection ¶
ChunkSection returns the section with the given section index from the given chunk. The section index is zero based, where 0 stands for the section from y=0 to y=15. A section index of -1 is not supported. If the given chunk implements the Sectioner interface, it will be used to extract the respective section. If not, the computation will be most expensive and will not be cached.
type Status ¶
type Status string
const ( StatusEmpty Status = "empty" StatusStructureStarts Status = "structure_starts" StatusStructureReferences Status = "structure_references" StatusBiomes Status = "biomes" StatusNoise Status = "noise" StatusSurface Status = "surface" StatusCarvers Status = "carvers" StatusLiquidCarvers Status = "liquid_carvers" StatusFeatures Status = "features" StatusLight Status = "light" StatusSpawn Status = "spawn" StatusHeightmaps Status = "heightmaps" StatusFull Status = "full" )
type World ¶
type World interface { // Chunk returns and if necessary also loads the chunk on the // given voxel. Chunk(voxel.V2) (Chunk, error) // IsChunkLoaded determines whether the chunk on the given // voxel is already loaded. IsChunkLoaded(voxel.V2) bool // Unload unloads the chunk on the given voxel. If there is // no such chunk loaded, this is a no-op. Unload(voxel.V2) Seed() int64 }
Click to show internal directories.
Click to hide internal directories.