state

package
v0.0.0-...-c5aaabd Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2022 License: MIT Imports: 4 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 {
	// Name is the name of the block.
	Name string `nbt:"name"`
	// Properties is a map of properties that define the block's state.
	Properties map[string]interface{} `nbt:"states"`
	// Version is the version of the block state.
	Version int32 `nbt:"version"`
}

Block holds a combination of a name and properties, together with a version.

type Hash

type Hash struct {
	Name, Properties string
}

Hash is a struct that may be used as a map key for block states. It contains the name of the block state and an encoded version of the properties.

func HashBlock

func HashBlock(state Block) Hash

HashBlock produces a Hash for the Block given.

Jump to

Keyboard shortcuts

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