update level/block, fix block states

This commit is contained in:
Tnze
2022-12-10 01:09:51 +08:00
parent 2ec7d98e6d
commit bb35ed21c8
4 changed files with 28 additions and 5 deletions

Binary file not shown.

View File

@ -31,10 +31,10 @@ var EnumProperties = []EnumProperty{
{Name: "DripstoneThickness", Values: []string{"tip_merge", "tip", "frustum", "middle", "base"}}, {Name: "DripstoneThickness", Values: []string{"tip_merge", "tip", "frustum", "middle", "base"}},
{Name: "Half", TrimPrefix: true, Values: []string{"top", "bottom"}}, {Name: "Half", TrimPrefix: true, Values: []string{"top", "bottom"}},
{Name: "NoteBlockInstrument", Values: []string{ {Name: "NoteBlockInstrument", Values: []string{
"harp", "basedrum", "snare", "hat", "harp", "basedrum", "snare", "hat", "bass", "flute", "bell",
"bass", "flute", "bell", "guitar", "guitar", "chime", "xylophone", "iron_xylophone", "cow_bell",
"chime", "xylophone", "iron_xylophone", "cow_bell", "didgeridoo", "bit", "banjo", "pling", "zombie", "skeleton",
"didgeridoo", "bit", "banjo", "pling", "creeper", "dragon", "wither_skeleton", "piglin", "custom_head",
}}, }},
{Name: "PistonType", Values: []string{"normal", "sticky"}}, {Name: "PistonType", Values: []string{"normal", "sticky"}},
{Name: "RailShape", Values: []string{ {Name: "RailShape", Values: []string{

View File

@ -1,4 +1,5 @@
// Code generated by {{Generator}}; DO NOT EDIT. // Code generated by {{Generator}}; DO NOT EDIT.
package block package block
import ( import (

View File

@ -1,4 +1,5 @@
// Code generated by generator/properties/main.go; DO NOT EDIT. // Code generated by generator/properties/main.go; DO NOT EDIT.
package block package block
import ( import (
@ -484,9 +485,16 @@ const (
NoteBlockInstrumentBit NoteBlockInstrumentBit
NoteBlockInstrumentBanjo NoteBlockInstrumentBanjo
NoteBlockInstrumentPling NoteBlockInstrumentPling
NoteBlockInstrumentZombie
NoteBlockInstrumentSkeleton
NoteBlockInstrumentCreeper
NoteBlockInstrumentDragon
NoteBlockInstrumentWitherSkeleton
NoteBlockInstrumentPiglin
NoteBlockInstrumentCustomHead
) )
var strNoteBlockInstrument = [...]string{"harp", "basedrum", "snare", "hat", "bass", "flute", "bell", "guitar", "chime", "xylophone", "iron_xylophone", "cow_bell", "didgeridoo", "bit", "banjo", "pling"} var strNoteBlockInstrument = [...]string{"harp", "basedrum", "snare", "hat", "bass", "flute", "bell", "guitar", "chime", "xylophone", "iron_xylophone", "cow_bell", "didgeridoo", "bit", "banjo", "pling", "zombie", "skeleton", "creeper", "dragon", "wither_skeleton", "piglin", "custom_head"}
func (n NoteBlockInstrument) String() string { func (n NoteBlockInstrument) String() string {
if int(n) < len(strNoteBlockInstrument) { if int(n) < len(strNoteBlockInstrument) {
@ -536,6 +544,20 @@ func (n *NoteBlockInstrument) UnmarshalText(text []byte) error {
*n = NoteBlockInstrumentBanjo *n = NoteBlockInstrumentBanjo
case "pling": case "pling":
*n = NoteBlockInstrumentPling *n = NoteBlockInstrumentPling
case "zombie":
*n = NoteBlockInstrumentZombie
case "skeleton":
*n = NoteBlockInstrumentSkeleton
case "creeper":
*n = NoteBlockInstrumentCreeper
case "dragon":
*n = NoteBlockInstrumentDragon
case "wither_skeleton":
*n = NoteBlockInstrumentWitherSkeleton
case "piglin":
*n = NoteBlockInstrumentPiglin
case "custom_head":
*n = NoteBlockInstrumentCustomHead
default: default:
return errors.New("unknown NoteBlockInstrument: " + str) return errors.New("unknown NoteBlockInstrument: " + str)
} }