world

package
v1.15.2 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Block

type Block struct {
	// contains filtered or unexported fields
}

Block is the base of world

type Chunk

type Chunk struct {
	// contains filtered or unexported fields
}

Chunk store a 256*16*16 clolumn blocks

func DecodeChunkColumn

func DecodeChunkColumn(mask int32, data []byte) (*Chunk, error)

DecodeChunkColumn decode the chunk data structure

type ChunkLoc

type ChunkLoc struct {
	X, Z int
}

type Section

type Section struct {
	// contains filtered or unexported fields
}

Section store a 16*16*16 cube blocks

type World

type World struct {
	Entities map[int32]entity.Entity
	Chunks   map[ChunkLoc]*Chunk
}

World record all of the things in the world where player at

func (*World) LoadChunk

func (w *World) LoadChunk(x, z int, c *Chunk)

LoadChunk load chunk at (x, z)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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