chunk

package
v0.0.0-...-a5005bf Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 29, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ChunkSize        = 16
	ChunkHeight      = 256
	SectionHeight    = 16
	BlocksPerSection = 4096
	BiomesPerSection = 64
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockEntity

type BlockEntity struct {
	PackedXZ byte
	Y        int16
	Type     int
	Data     nbt.RawMessage
}

type Chunk

type Chunk struct {
	Sections []Section
}

func GenerateExampleChunk

func GenerateExampleChunk() *Chunk

func (*Chunk) WriteTo

func (c *Chunk) WriteTo(writer io.Writer) (int64, error)

type Heightmap

type Heightmap struct {
	MotionBlocking []int64 `nbt:"MOTION_BLOCKING"`
	WorldSurface   []int64 `nbt:"WORLD_SURFACE"`
}

func GenerateExampleHeightmap

func GenerateExampleHeightmap() *Heightmap

type PaletteIndirect

type PaletteIndirect struct {
	Palette []int
}

type PaletteSingleValued

type PaletteSingleValued struct {
	Value int
}

type PalettedContainer

type PalettedContainer struct {
	BitsPerEntry        byte
	PaletteSingleValued *PaletteSingleValued
	PaletteIndirect     *PaletteIndirect
	Data                []int64
}

type Section

type Section struct {
	BlockCount  int16
	BlockStates []PalettedContainer
	Biomes      []PalettedContainer
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL