diff --git a/bot/basic/info.go b/bot/basic/info.go index 3a1b4bc..d6347b7 100644 --- a/bot/basic/info.go +++ b/bot/basic/info.go @@ -3,10 +3,9 @@ package basic import ( "unsafe" - "github.com/Tnze/go-mc/registry" - "github.com/Tnze/go-mc/data/packetid" pk "github.com/Tnze/go-mc/net/packet" + "github.com/Tnze/go-mc/registry" ) // WorldInfo content player info in server. diff --git a/chat/decoration.go b/chat/decoration.go index da1df15..8f2a436 100644 --- a/chat/decoration.go +++ b/chat/decoration.go @@ -10,15 +10,15 @@ type Decoration struct { TranslationKey string `nbt:"translation_key"` Parameters []string `nbt:"parameters"` Style struct { - Bold bool `nbt:"bold"` - Italic bool `nbt:"italic"` - UnderLined bool `nbt:"underlined"` - StrikeThrough bool `nbt:"strikethrough"` - Obfuscated bool `nbt:"obfuscated"` - Color string `nbt:"color"` - Insertion string `nbt:"insertion"` - Font string `nbt:"font"` - } `nbt:"style"` + Bold bool `nbt:"bold,omitempty"` + Italic bool `nbt:"italic,omitempty"` + UnderLined bool `nbt:"underlined,omitempty"` + StrikeThrough bool `nbt:"strikethrough,omitempty"` + Obfuscated bool `nbt:"obfuscated,omitempty"` + Color string `nbt:"color,omitempty"` + Insertion string `nbt:"insertion,omitempty"` + Font string `nbt:"font,omitempty"` + } `nbt:"style,omitempty"` } type Type struct { diff --git a/examples/daze/daze.go b/examples/daze/daze.go index 1efea60..4c00557 100644 --- a/examples/daze/daze.go +++ b/examples/daze/daze.go @@ -22,7 +22,7 @@ import ( ) var ( - address = flag.String("address", "127.0.0.1:25566", "The server address") + address = flag.String("address", "127.0.0.1:25565", "The server address") name = flag.String("name", "Daze", "The player's name") playerID = flag.String("uuid", "", "The player's UUID") accessToken = flag.String("token", "", "AccessToken") diff --git a/nbt/snbt_scanner.go b/nbt/snbt_scanner.go index 4ddafa2..392b34e 100644 --- a/nbt/snbt_scanner.go +++ b/nbt/snbt_scanner.go @@ -83,7 +83,7 @@ func (s *scanner) eof() int { return scanEnd } if s.errContext == "" { - s.errContext = "unexpected end of JSON input" + s.errContext = "unexpected end of SNBT input" } return scanError }