Squashed below commits
nbt chat message fixes some bug chunk temp relocate module items id
This commit is contained in:
@ -4,7 +4,7 @@ import (
|
||||
"fmt"
|
||||
"io"
|
||||
|
||||
pk "github.com/Tnze/go-mc/net/packet"
|
||||
pk "git.konjactw.dev/falloutBot/go-mc/net/packet"
|
||||
)
|
||||
|
||||
type Decoration struct {
|
||||
|
@ -6,7 +6,7 @@ import (
|
||||
"errors"
|
||||
"io"
|
||||
|
||||
pk "github.com/Tnze/go-mc/net/packet"
|
||||
pk "git.konjactw.dev/falloutBot/go-mc/net/packet"
|
||||
)
|
||||
|
||||
// JsonMessage is Message, unless when it is going to be Json instead of NBT
|
||||
|
@ -7,9 +7,9 @@ import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/Tnze/go-mc/chat"
|
||||
en_us "github.com/Tnze/go-mc/data/lang/en-us"
|
||||
pk "github.com/Tnze/go-mc/net/packet"
|
||||
"git.konjactw.dev/falloutBot/go-mc/chat"
|
||||
en_us "git.konjactw.dev/falloutBot/go-mc/data/lang/en-us"
|
||||
pk "git.konjactw.dev/falloutBot/go-mc/net/packet"
|
||||
)
|
||||
|
||||
var jsons = []string{
|
||||
|
@ -4,7 +4,7 @@
|
||||
// or net/packet.Field .
|
||||
//
|
||||
// It's very recommended that use SetLanguage before using Message.String or Message.ClearString,
|
||||
// or the `github.com/Tnze/go-mc/data/en-us` will be used.
|
||||
// or the `git.konjactw.dev/falloutBot/go-mc/data/en-us` will be used.
|
||||
// Note: The package of data/lang/... will SetLanguage on theirs init() so you don't need to call by your self.
|
||||
//
|
||||
// Some of these docs is copied from https://wiki.vg/Chat.
|
||||
@ -15,7 +15,7 @@ import (
|
||||
"regexp"
|
||||
"strings"
|
||||
|
||||
en_us "github.com/Tnze/go-mc/data/lang/en-us"
|
||||
en_us "git.konjactw.dev/falloutBot/go-mc/data/lang/en-us"
|
||||
)
|
||||
|
||||
const (
|
||||
@ -51,7 +51,7 @@ const (
|
||||
|
||||
// Message is a message sent by other
|
||||
type Message struct {
|
||||
Text string `json:"text" nbt:"text"`
|
||||
Text string `json:"text" nbt:"text,default"`
|
||||
|
||||
Bold bool `json:"bold,omitempty" nbt:"bold,omitempty"` // 粗体
|
||||
Italic bool `json:"italic,omitempty" nbt:"italic,omitempty"` // 斜体
|
||||
|
@ -6,8 +6,8 @@ import (
|
||||
"io"
|
||||
"strconv"
|
||||
|
||||
"github.com/Tnze/go-mc/nbt"
|
||||
pk "github.com/Tnze/go-mc/net/packet"
|
||||
"git.konjactw.dev/falloutBot/go-mc/nbt"
|
||||
pk "git.konjactw.dev/falloutBot/go-mc/net/packet"
|
||||
)
|
||||
|
||||
// ReadFrom decode Message in a Text component
|
||||
|
@ -3,9 +3,9 @@ package chat_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/Tnze/go-mc/chat"
|
||||
en_us "github.com/Tnze/go-mc/data/lang/en-us"
|
||||
"github.com/Tnze/go-mc/nbt"
|
||||
"git.konjactw.dev/falloutBot/go-mc/chat"
|
||||
en_us "git.konjactw.dev/falloutBot/go-mc/data/lang/en-us"
|
||||
"git.konjactw.dev/falloutBot/go-mc/nbt"
|
||||
)
|
||||
|
||||
func TestMessage_UnmarshalJSON_string(t *testing.T) {
|
||||
|
@ -7,9 +7,9 @@ import (
|
||||
|
||||
"github.com/google/uuid"
|
||||
|
||||
"github.com/Tnze/go-mc/chat"
|
||||
pk "github.com/Tnze/go-mc/net/packet"
|
||||
"github.com/Tnze/go-mc/yggdrasil/user"
|
||||
"git.konjactw.dev/falloutBot/go-mc/chat"
|
||||
pk "git.konjactw.dev/falloutBot/go-mc/net/packet"
|
||||
"git.konjactw.dev/falloutBot/go-mc/yggdrasil/user"
|
||||
)
|
||||
|
||||
type Message struct {
|
||||
|
@ -6,7 +6,7 @@ import (
|
||||
|
||||
"github.com/google/uuid"
|
||||
|
||||
pk "github.com/Tnze/go-mc/net/packet"
|
||||
pk "git.konjactw.dev/falloutBot/go-mc/net/packet"
|
||||
)
|
||||
|
||||
type MessageBody struct {
|
||||
|
Reference in New Issue
Block a user