blocks

package module
v0.0.0-...-54ab0b2 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2025 License: AGPL-3.0 Imports: 10 Imported by: 0

README

blocks

Bedrock Block Conversion

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AIR_RUNTIMEID = uint32(0)
View Source
var BedrockToJavaConvertor *convertor.ToJavaConvertor
View Source
var DefaultAnyToNemcConvertor *convertor.ToNEMCConvertor
View Source
var JavaBlockStrToRuntimeID = BlockStrToRuntimeID

JavaBlockStrToRuntimeID converts Java block strings to RuntimeID It uses the same conversion logic as BlockStrToRuntimeID

View Source
var MC_CURRENT *block_set.BlockSet
View Source
var NEMC_AIR_RUNTIMEID = uint32(0)
View Source
var NEMC_BLOCK_VERSION = uint32(0)

duplicate in future

Functions

func BedrockBlockNameAndStateToJavaBlock

func BedrockBlockNameAndStateToJavaBlock(name string, properties map[string]any) (javaName string, javaProperties map[string]any, found bool)

BedrockBlockNameAndStateToJavaBlock converts Bedrock block name and properties to Java block

func BedrockBlockStrToJavaBlockStr

func BedrockBlockStrToJavaBlockStr(bedrockBlockStr string) (javaBlockStr string, found bool)

BedrockBlockStrToJavaBlockStr converts Bedrock block string to Java block string

func BlockNameAndStateStrToRuntimeID

func BlockNameAndStateStrToRuntimeID(name string, stateStr string) (runtimeID uint32, found bool)

func BlockNameAndStateToRuntimeID

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

func BlockStrToRuntimeID

func BlockStrToRuntimeID(blockNameWithOrWithoutState string) (runtimeID uint32, found bool)

func ConvertStringToBlockNameAndPropsForSearch

func ConvertStringToBlockNameAndPropsForSearch(blockString string) (blockNameForSearch describe.BaseWithNameSpace, propsForSearch *describe.PropsForSearch)

func GetSchematicMapping

func GetSchematicMapping() [256][256]uint32

func Init

func Init()

func LegacyBlockToRuntimeID

func LegacyBlockToRuntimeID(name string, data uint16) (runtimeID uint32, found bool)

func RuntimeIDToBlock

func RuntimeIDToBlock(runtimeID uint32) (block *describe.Block, found bool)

func RuntimeIDToBlockNameAndStateStr

func RuntimeIDToBlockNameAndStateStr(runtimeID uint32) (blockName, blockState string, found bool)

func RuntimeIDToBlockNameWithStateStr

func RuntimeIDToBlockNameWithStateStr(runtimeID uint32) (blockNameWithState string, found bool)

coral_block ["coral_color":"yellow", "dead_bit":false] true

func RuntimeIDToJavaBlockNameAndState

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

RuntimeIDToJavaBlockNameAndState converts Bedrock RuntimeID to Java block name and properties

func RuntimeIDToJavaBlockNameAndStateStr

func RuntimeIDToJavaBlockNameAndStateStr(runtimeID uint32) (blockName, blockState string, found bool)

RuntimeIDToJavaBlockNameAndStateStr converts Bedrock RuntimeID to Java block name and state string

func RuntimeIDToJavaBlockStr

func RuntimeIDToJavaBlockStr(runtimeID uint32) (javaBlockStr string, found bool)

RuntimeIDToJavaBlockStr converts Bedrock RuntimeID to Java block string

func RuntimeIDToSchematic

func RuntimeIDToSchematic(runtimeID uint32) (block uint8, value uint8, found bool)

func RuntimeIDToState

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

func SchematicToRuntimeID

func SchematicToRuntimeID(block uint8, value uint8) uint32

Types

This section is empty.

Jump to

Keyboard shortcuts

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