Squashed below commits
Some checks failed
CodeQL / Analyze (go) (push) Has been cancelled
Go / Test (1.22) (push) Has been cancelled
Go / Test (^1.22) (push) Has been cancelled

nbt chat message

fixes some bug

chunk temp

relocate module

items id
This commit is contained in:
2025-08-26 02:37:53 +08:00
committed by 蒟蒻
parent f0bb92bdb9
commit 185020e31c
210 changed files with 3174 additions and 1749 deletions

View File

@ -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 {

View File

@ -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

View File

@ -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{

View File

@ -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"` // 斜体

View File

@ -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

View File

@ -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) {

View File

@ -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 {

View File

@ -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 {