Documentation
¶
Index ¶
Constants ¶
const ( DimensionIDOverworld = iota DimensionIDNether DimensionIDEnd )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlockState ¶
type BlockState struct {
Name string `nbt:"name"`
Properties map[string]any `nbt:"states"`
Version int32 `nbt:"version"`
}
BlockState holds a combination of a name and properties, together with a version.
type ChunkPos ¶
type ChunkPos [2]int32
ChunkPos holds the position of a chunk. The type is provided as a utility struct for keeping track of a chunk's position. Chunks do not themselves keep track of that. Chunk positions are different from block positions in the way that increasing the X/Z by one means increasing the absolute value on the X/Z axis in terms of blocks by 16.
type Dimension ¶
type Dimension int32
Dimension is a dimension of a World. It influences a variety of properties of a World such as the building range, the sky colour and the behaviour of liquid blocks.
func (Dimension) Height ¶
Height returns the height of this dimension. For example, the height of overworld is 384 due to "384 = 319 - (-64) + 1", and 319 is the max Y that overworld could build, and -64 is the min Y that overworld could build.
type HashWithPosY ¶
HashWithPosY ..
func (HashWithPosY) String ¶
func (h HashWithPosY) String() string
type NetEaseBlock ¶
type NetEaseBlock struct {
Name string `nbt:"name"`
NameHash int64 `nbt:"name_hash"`
BlockRuntimeID int32 `nbt:"network_id"`
States map[string]any `nbt:"states"`
Val int16 `nbt:"val"`
Version int32 `nbt:"version"`
}
NetEaseBlock is the represents of a block in NetEase
type Range ¶
type Range [2]int
Range represents the height range of a Dimension in blocks. The first value of the Range holds the minimum Y value, the second value holds the maximum Y value.
func (Range) Height ¶
Height returns the total height of the Range, the difference between Max and Min.
type SubChunkPos ¶
type SubChunkPos [3]int32
SubChunkPos holds the position of a sub-chunk. The type is provided as a utility struct for keeping track of a sub-chunk's position. Sub-chunks do not themselves keep track of that. Sub-chunk positions are different from block positions in the way that increasing the X/Y/Z by one means increasing the absolute value on the X/Y/Z axis in terms of blocks by 16.
func (SubChunkPos) String ¶
func (p SubChunkPos) String() string
String implements fmt.Stringer and returns (x, y, z).
func (SubChunkPos) X ¶
func (p SubChunkPos) X() int32
X returns the X coordinate of the sub-chunk position.
func (SubChunkPos) Y ¶
func (p SubChunkPos) Y() int32
Y returns the Y coordinate of the sub-chunk position.
func (SubChunkPos) Z ¶
func (p SubChunkPos) Z() int32
Z returns the Z coordinate of the sub-chunk position.