Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidColumnCoords = errors.New("specified column coordinates are invalid, check region file is correct")
View Source
var ErrInvalidColumnSize = errors.New("column exact size is greater than maximum column size specified in region header")
View Source
var ErrOffsetOutOfBounds = errors.New("column location offset is out of bounds")
Functions ¶
This section is empty.
Types ¶
type Chunk ¶
type Chunk struct { Y byte `nbt:"Y"` Palette []struct { Name string `nbt:"Name"` } `nbt:"Palette"` BlockLight []byte `nbt:"BlockLight"` BlockStates []int64 `nbt:"BlockStates"` SkyLight []byte `nbt:"SkyLight"` }
Chunk represents a world section of 16x16x16 blocks
type Column ¶
type Column struct { XPos int32 `nbt:"xPos"` ZPos int32 `nbt:"zPos"` Sections []Chunk `nbt:"Sections"` }
Column represents a world section composed by 1x16x1 chunks
type ColumnLocation ¶
type ColumnLocation []byte
func (ColumnLocation) ColumnOffset ¶
func (cl ColumnLocation) ColumnOffset() (offset uint)
func (ColumnLocation) ColumnSize ¶
func (cl ColumnLocation) ColumnSize() (size uint)
type Dimension ¶
type Dimension struct {
// contains filtered or unexported fields
}
Dimension is a collection of region files. It's so called because minecraft stores dimensions in separate folders.
func OpenDimension ¶
OpenDimension returns a new Dimension with regionDir as the base directory for region files
type Region ¶
type Region struct {
X, Z int
Header RegionHeader
ColumnData []byte
}
Region represents a section of world composed by 32x1x32 columns
func ParseRegion ¶
ParseRegion returns a Region decoded from the Reader r, eventually returning an error.
type RegionHeader ¶
type RegionHeader []byte
func (RegionHeader) GetColumnLocation ¶
func (rh RegionHeader) GetColumnLocation(x, z int) (c ColumnLocation, err error)
GetColumnLocation returns the location of the column at (x,z)
Click to show internal directories.
Click to hide internal directories.