latestmappings

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Adjust

func Adjust(customStates []blockupgrader.BlockState)

Adjust adjusts the latest mappings to account for custom states.

func ItemNameToRuntimeID

func ItemNameToRuntimeID(name string) (runtimeID int32, found bool)

ItemNameToRuntimeID converts a string ID to an item runtime ID.

func ItemRuntimeIDToName

func ItemRuntimeIDToName(runtimeID int32) (name string, found bool)

ItemRuntimeIDToName converts an item runtime ID to a string ID.

func RuntimeIDToState

func RuntimeIDToState(runtimeID uint32) (name string, properties map[string]any, found bool)

RuntimeIDToState converts a runtime ID to a name and its state properties.

func StateToRuntimeID

func StateToRuntimeID(name string, properties map[string]any) (runtimeID uint32, found bool)

StateToRuntimeID converts a name and its state properties to a runtime ID.

Types

type StateHash

type StateHash struct {
	Name, Properties string
}

StateHash 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 HashState

func HashState(state blockupgrader.BlockState) StateHash

HashState produces a hash for the block properties held by the blockState.

Jump to

Keyboard shortcuts

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