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

@ -0,0 +1,12 @@
// Code generated by {{Generator}}; DO NOT EDIT.
package block
{{range .}}
type {{.Name | ToGoTypeName}} struct { {{- range $key, $elem := .Meta}}
{{$key | UpperTheFirst}} {{$elem | GetType}} `nbt:"{{$key}}"`{{end}} {{- if ne 0 (len .Meta)}}
{{end -}} }
func ({{.Name | ToGoTypeName}}) ID() string { return {{.Name | printf "%q"}} }
{{end}}
var fromID = map[string]Block { {{- range .}}
{{.Name | printf "%#v"}}: {{.Name | ToGoTypeName}}{},{{end}}
}