block

package
v0.0.0-...-cbdf446 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const MinecraftPrefix = "minecraft:"

MinecraftPrefix is a block prefix

Variables

View Source
var BlockListV112 = LoadV112()

BlockListV112 is a block data for v1.12

View Source
var BlockListV113 = LoadV113()

BlockListV113 is a block data for v1.13

View Source
var V112ToV113 = setPrefix(MinecraftPrefix, v112Tov113)

V112ToV113 is compatibility data between v1.12 and v1.13 with minecraft prefix

Functions

func GetV112ToV113

func GetV112ToV113(name string, meta int) string

GetV112ToV113 gets a block name which is converted from v1.12 to v1.13

func ToNumberID

func ToNumberID(id int) string

func ToNumberIDMeta

func ToNumberIDMeta(id int, meta int) string

Types

type Block

type Block struct {
	Name       string // minecraft:dirt
	Properties map[string]string

	ID   int
	Meta int
}

Block is a common block data TODO: support level.BlockState

func FromBlockID

func FromBlockID(id int, meta int) *Block

FromBlockID returns Block from old block id and meta

type List

type List map[string]*Block

List is a compatibility data for block

func LoadV112

func LoadV112() List

LoadV112 loads block data for v112

func LoadV113

func LoadV113() List

LoadV113 loads block data for v113

Jump to

Keyboard shortcuts

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