add generator tag

This commit is contained in:
Tnze
2022-11-23 01:25:50 +08:00
parent d250284642
commit 43c7b485c4
5 changed files with 17 additions and 4 deletions

View File

@ -16,6 +16,7 @@ type Block interface {
// This file stores all possible block states into a TAG_List with gzip compressed.
//
//go:generate go run ./generator/blocks/main.go
//go:embed block_states.nbt
var blockStates []byte

View File

@ -74,6 +74,7 @@ func genSourceFile(states []State) {
if err != nil {
panic(err)
}
log.Print("Generated blocks.go")
}
var typeMaps = map[string]string{

View File

@ -82,6 +82,7 @@ func main() {
if err != nil {
log.Panic(err)
}
log.Print("Generated properties_enum.go")
}
func UpperTheFirst(word string) string {

View File

@ -2,6 +2,8 @@ package block
import "strconv"
//go:generate go run ./generator/properties/main.go
type Boolean bool
func (b Boolean) MarshalText() (text []byte, err error) {