Export the blocks data
This commit is contained in:
@ -44,7 +44,7 @@ func init() {
|
||||
ToStateID = make(map[Block]int, len(states))
|
||||
StateList = make([]Block, 0, len(states))
|
||||
for _, state := range states {
|
||||
block := fromID[state.Name]
|
||||
block := FromID[state.Name]
|
||||
if state.Properties.Type != nbt.TagEnd {
|
||||
err := state.Properties.Unmarshal(&block)
|
||||
if err != nil {
|
||||
@ -59,8 +59,3 @@ func init() {
|
||||
}
|
||||
BitsPerBlock = bits.Len(uint(len(StateList)))
|
||||
}
|
||||
|
||||
func DefaultBlock(id string) (b Block, ok bool) {
|
||||
b, ok = fromID[id]
|
||||
return
|
||||
}
|
||||
|
@ -3664,7 +3664,7 @@ func (RawGoldBlock) ID() string { return "minecraft:raw_gold_bloc
|
||||
func (PottedAzaleaBush) ID() string { return "minecraft:potted_azalea_bush" }
|
||||
func (PottedFloweringAzaleaBush) ID() string { return "minecraft:potted_flowering_azalea_bush" }
|
||||
|
||||
var fromID = map[string]Block{
|
||||
var FromID = map[string]Block{
|
||||
"minecraft:air": Air{},
|
||||
"minecraft:stone": Stone{},
|
||||
"minecraft:granite": Granite{},
|
||||
|
Reference in New Issue
Block a user