game

package
v0.0.0-...-b730334 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2021 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Region

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

Region contain 32*32 chunks in one .mca file

func Open

func Open(name string) (r *Region, err error)

Open open a .mca file and read the head. Close the Region after used.

func (*Region) Close

func (r *Region) Close() error

Close close the region file

func (*Region) ReadSector

func (r *Region) ReadSector(x, y int) (data []byte, err error)

ReadSector find and read the anvilChunkSection data from region

type World

type World struct {
	WorldName string
	// contains filtered or unexported fields
}

func (*World) Block

func (w *World) Block(x int, y int, z int) int32

Block returns the block at the given global x, y, and z.

func (*World) Column

func (w *World) Column(x int, z int) *column

Column returns the column with the given column x and column z.

func (*World) SetBlock

func (w *World) SetBlock(x int, y int, z int, blockID int32)

SetBlock sets a block at the given global x, y, and z.

Jump to

Keyboard shortcuts

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