All block states' properties are parsed and all enums represented as byte

This commit is contained in:
Tnze
2022-03-11 14:02:21 +08:00
parent 442993d3b1
commit a05f8e0a33
17 changed files with 1954 additions and 760 deletions

View File

@ -2,7 +2,7 @@ package block
import (
"bytes"
"compress/zlib"
"compress/gzip"
_ "embed"
"fmt"
"math/bits"
@ -14,7 +14,7 @@ type Block interface {
ID() string
}
// This file stores all possible block states into a TAG_List with zlib compressed.
// This file stores all possible block states into a TAG_List with gzip compressed.
//go:embed block_states.nbt
var blockStates []byte
@ -33,7 +33,7 @@ type State struct {
func init() {
var states []State
// decompress
z, err := zlib.NewReader(bytes.NewReader(blockStates))
z, err := gzip.NewReader(bytes.NewReader(blockStates))
if err != nil {
panic(err)
}