world

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CalculateRequiredLongs

func CalculateRequiredLongs(numBlocks int, bitsPerBlock uint8) int

Types

type Chunk

type Chunk struct {
	Sections []ChunkSection

	X int
	Z int

	BlockEntities []save.BlockEntity
}

func EmptyChunk

func EmptyChunk(protocolId int) *Chunk

func (Chunk) SetSection

func (c Chunk) SetSection(index int, section ChunkSection)

func (*Chunk) ToBuffer added in v0.1.0

func (c *Chunk) ToBuffer(region *Region, protocolVersion int) ([]byte, error)

type ChunkSection

type ChunkSection struct {
	Blocks []*save.BlockState
	Biomes []*save.BiomeState

	SkyLight   []byte
	BlockLight []byte
}

func EmptyChunkSection

func EmptyChunkSection(protocolId int) ChunkSection

func (*ChunkSection) ToBiomeNBT

func (cs *ChunkSection) ToBiomeNBT() ([]save.BiomeState, []int)

func (*ChunkSection) ToNBT

func (cs *ChunkSection) ToNBT() ([]save.BlockState, []int)

type Region

type Region struct {
	X        int
	Z        int
	Chunks   [32][32]*[]byte
	RefChunk *save.Chunk
}

func EmptyRegion

func EmptyRegion(x, z int) *Region

func (*Region) Save

func (r *Region) Save(path string, protocolVersion int) error

Jump to

Keyboard shortcuts

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