Documentation
¶
Index ¶
Constants ¶
View Source
const ( ChunkWidth = 32 ChunkHeight = 32 ChunkDepth = 32 BlocksPerChunk = ChunkWidth * ChunkHeight * ChunkDepth )
Variables ¶
This section is empty.
Functions ¶
func EachOffset ¶
func EachOffset(cb func(oc Offset))
Calls the given function with every valid offset coordinate. Useful for going through all the blocks in a chunk.
Types ¶
type Block ¶
Block represents the coordinates of any block in the world. It represents the same units as World, but without any precision (because blocks can only exist at integer boundries).
type Chunk ¶
type Offset ¶
func IndexOffset ¶
Given an integer 0 <= index < BlocksPerChunk, returns the offset coordinate for that index in "standard" packed format. This logic is duplicated on the client.
type Size ¶
var ChunkSize Size = Size{ X: ChunkWidth, Y: ChunkHeight, Z: ChunkDepth, }
Click to show internal directories.
Click to hide internal directories.