refactor package
This commit is contained in:
32
pkg/protocol/component/written_book_content.go
Normal file
32
pkg/protocol/component/written_book_content.go
Normal file
@ -0,0 +1,32 @@
|
||||
package component
|
||||
|
||||
import (
|
||||
"git.konjactw.dev/patyhank/minego/pkg/protocol/slot"
|
||||
"github.com/Tnze/go-mc/chat"
|
||||
pk "github.com/Tnze/go-mc/net/packet"
|
||||
)
|
||||
|
||||
//codec:gen
|
||||
type WrittenBookContent struct {
|
||||
RawTitle string `mc:"String"`
|
||||
HasFilteredTitle bool
|
||||
FilteredTitle pk.Option[pk.String, *pk.String]
|
||||
Author string `mc:"String"`
|
||||
Generation int32 `mc:"VarInt"`
|
||||
Pages []WrittenBookPage
|
||||
}
|
||||
|
||||
//codec:gen
|
||||
type WrittenBookPage struct {
|
||||
RawContent chat.Message
|
||||
HasFilteredContent bool
|
||||
FilteredContent pk.Option[chat.Message, *chat.Message]
|
||||
}
|
||||
|
||||
func (*WrittenBookContent) Type() slot.ComponentID {
|
||||
return 46
|
||||
}
|
||||
|
||||
func (*WrittenBookContent) ID() string {
|
||||
return "minecraft:written_book_content"
|
||||
}
|
Reference in New Issue
Block a user