Documentation
¶
Index ¶
- func Adjust(customStates []blockupgrader.BlockState)
- func ItemNameToRuntimeID(name string) (runtimeID int32, found bool)
- func ItemRuntimeIDToName(runtimeID int32) (name string, found bool)
- func RuntimeIDToState(runtimeID uint32) (name string, properties map[string]any, found bool)
- func StateToRuntimeID(name string, properties map[string]any) (runtimeID uint32, found bool)
- type StateHash
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 ¶
ItemNameToRuntimeID converts a string ID to an item runtime ID.
func ItemRuntimeIDToName ¶
ItemRuntimeIDToName converts an item runtime ID to a string ID.
func RuntimeIDToState ¶
RuntimeIDToState converts a runtime ID to a name and its state properties.
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.
Click to show internal directories.
Click to hide internal directories.