Documentation ¶
Index ¶
- Constants
- Variables
- func FromNodePos(pos int) (int, int, int)
- func GetNodePos(x, y, z int) int
- type CountedReader
- type Inventory
- type Item
- type MapBlock
- type MapData
- type Metadata
- func (md *Metadata) GetInventory(pos int, name string) *Inventory
- func (md *Metadata) GetInventoryMap(pos int) map[string]*Inventory
- func (md *Metadata) GetInventoryMapAtPos(x, y, z int) map[string]*Inventory
- func (md *Metadata) GetMetadata(x, y, z int) map[string]string
- func (md *Metadata) GetPairsMap(pos int) map[string]string
Constants ¶
View Source
const ( INVENTORY_TERMINATOR = "EndInventory" INVENTORY_END = "EndInventoryList" INVENTORY_START = "List" )
View Source
const MapDataSize = 16384
Variables ¶
View Source
var ErrMapblockVersion = errors.New("mapblock version unsupported")
View Source
var ErrNoData = errors.New("no data")
Functions ¶
func FromNodePos ¶ added in v0.1.1
converts the index back to a vector
func GetNodePos ¶ added in v0.1.1
converts a vector to an integer for indexing the internal mapblock positions
Types ¶
type CountedReader ¶
func (*CountedReader) ReadByte ¶
func (r *CountedReader) ReadByte() (byte, error)
type MapBlock ¶
type MapBlock struct { Size int `json:"size"` Version byte `json:"version"` Underground bool `json:"underground"` Timestamp uint32 `json:"timestamp"` Mapdata *MapData `json:"mapdata"` Metadata *Metadata `json:"metadata"` BlockMapping map[int]string `json:"blockmapping"` }
func NewMapblock ¶
func NewMapblock() *MapBlock
func (*MapBlock) GetNodeName ¶
type Metadata ¶
type Metadata struct { Inventories map[int]map[string]*Inventory `json:"inventories"` Pairs map[int]map[string]string `json:"pairs"` }
func NewMetadata ¶
func NewMetadata() *Metadata
func (*Metadata) GetInventoryMap ¶
func (*Metadata) GetInventoryMapAtPos ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.