support block state & nbt improvement

This commit is contained in:
Tnze
2022-03-09 16:12:47 +08:00
parent 86592931c6
commit aa8e611644
915 changed files with 6566 additions and 8605 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}}
}