refactor package
This commit is contained in:
@ -1,18 +0,0 @@
|
|||||||
{
|
|
||||||
"permissions": {
|
|
||||||
"allow": [
|
|
||||||
"Bash(./packetizer)",
|
|
||||||
"Bash(packetizer)",
|
|
||||||
"Bash(find:*)",
|
|
||||||
"Bash(grep:*)",
|
|
||||||
"Bash(rg:*)",
|
|
||||||
"Bash(go:*)",
|
|
||||||
"Bash(./gen-packet.sh:*)",
|
|
||||||
"Bash(chmod:*)",
|
|
||||||
"Bash(/root/go/bin/packetizer:*)",
|
|
||||||
"**",
|
|
||||||
"*"
|
|
||||||
],
|
|
||||||
"deny": []
|
|
||||||
}
|
|
||||||
}
|
|
1
go.mod
1
go.mod
@ -7,7 +7,6 @@ toolchain go1.24.4
|
|||||||
require (
|
require (
|
||||||
github.com/Tnze/go-mc v1.20.3-0.20241224032005-539b4a3a7f03
|
github.com/Tnze/go-mc v1.20.3-0.20241224032005-539b4a3a7f03
|
||||||
github.com/google/uuid v1.6.0
|
github.com/google/uuid v1.6.0
|
||||||
github.com/mlange-42/ark v0.4.3
|
|
||||||
)
|
)
|
||||||
|
|
||||||
replace github.com/Tnze/go-mc v1.20.3-0.20241224032005-539b4a3a7f03 => git.konjactw.dev/patyhank/go-mc v1.20.3-0.20250619063151-133e3fab4ac2
|
replace github.com/Tnze/go-mc v1.20.3-0.20241224032005-539b4a3a7f03 => git.konjactw.dev/patyhank/go-mc v1.20.3-0.20250619063151-133e3fab4ac2
|
||||||
|
2
go.sum
2
go.sum
@ -6,6 +6,8 @@ github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
|
|||||||
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||||
github.com/mlange-42/ark v0.4.3 h1:k5MydLdgONyOaHT0mfTJNW68kkHz24hkMnmzog6SOjw=
|
github.com/mlange-42/ark v0.4.3 h1:k5MydLdgONyOaHT0mfTJNW68kkHz24hkMnmzog6SOjw=
|
||||||
github.com/mlange-42/ark v0.4.3/go.mod h1:47KXHr5HLftLn4iyL8w04iv7KJUNUoDymEIotD41f3o=
|
github.com/mlange-42/ark v0.4.3/go.mod h1:47KXHr5HLftLn4iyL8w04iv7KJUNUoDymEIotD41f3o=
|
||||||
|
github.com/mlange-42/ark-tools v0.1.4 h1:GD+CYe+jx7b/HQCgdHNym04IwxsAfTdPgKskoM3Mwpw=
|
||||||
|
github.com/mlange-42/ark-tools v0.1.4/go.mod h1:+uS2tMZrMXRtPfRRN0S6F/ou7XbivqcFV/Lc214XRCQ=
|
||||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||||
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
|
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
|
||||||
|
16
go.work.sum
Normal file
16
go.work.sum
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
|
||||||
|
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
|
||||||
|
github.com/yuin/goldmark v1.4.13 h1:fVcFKWvrslecOb/tg+Cc05dkeYx540o0FuFt3nUVDoE=
|
||||||
|
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
|
||||||
|
golang.org/x/mod v0.25.0 h1:n7a+ZbQKQA/Ysbyb0/6IbB1H/X41mKgbhfv7AfG/44w=
|
||||||
|
golang.org/x/mod v0.25.0/go.mod h1:IXM97Txy2VM4PJ3gI61r1YEk/gAj6zAHN3AdZt6S9Ww=
|
||||||
|
golang.org/x/net v0.41.0 h1:vBTly1HeNPEn3wtREYfy4GZ/NECgw2Cnl+nK6Nz3uvw=
|
||||||
|
golang.org/x/net v0.41.0/go.mod h1:B/K4NNqkfmg07DQYrbwvSluqCJOOXwUjeb/5lOisjbA=
|
||||||
|
golang.org/x/sync v0.15.0 h1:KWH3jNZsfyT6xfAfKiz6MRNmd46ByHDYaZ7KSkCtdW8=
|
||||||
|
golang.org/x/sync v0.15.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA=
|
||||||
|
golang.org/x/sys v0.33.0 h1:q3i8TbbEz+JRD9ywIRlyRAQbM0qF7hu24q3teo2hbuw=
|
||||||
|
golang.org/x/sys v0.33.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
|
||||||
|
golang.org/x/telemetry v0.0.0-20240521205824-bda55230c457 h1:zf5N6UOrA487eEFacMePxjXAJctxKmyjKUsjA11Uzuk=
|
||||||
|
golang.org/x/telemetry v0.0.0-20240521205824-bda55230c457/go.mod h1:pRgIJT+bRLFKnoM1ldnzKoxTIn14Yxz928LQRYYgIN0=
|
||||||
|
golang.org/x/tools v0.34.0 h1:qIpSLOxeCYGg9TrcJokLBG4KFA6d795g0xkBkiESGlo=
|
||||||
|
golang.org/x/tools v0.34.0/go.mod h1:pAP9OwEaY1CAW3HOmg3hLZC5Z0CCmzjAF2UQMSqNARg=
|
45
login-sequence.txt
Normal file
45
login-sequence.txt
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
The recommended login sequence as of 1.21 looks like this, where C is the client and S is the server:
|
||||||
|
|
||||||
|
Client connects to the server
|
||||||
|
C→S: Handshake State=2
|
||||||
|
C→S: Login Start
|
||||||
|
S→C: Encryption Request (optional)
|
||||||
|
Client auth (Only if server sent Encryption Request)
|
||||||
|
C→S: Encryption Response (Only if server sent Encryption Request)
|
||||||
|
Server auth, both enable encryption (Only if server sent Encryption Request)
|
||||||
|
S → C: Set Compression (Optional, enables compression)
|
||||||
|
S → C: Login Success
|
||||||
|
C → S: Login Acknowledged
|
||||||
|
C → S: Serverbound Plugin Message (Optional, minecraft:brand with the client's brand)
|
||||||
|
C → S: Client Information (Optional)
|
||||||
|
S → C: Clientbound Plugin Message (Optional, minecraft:brand with the server's brand)
|
||||||
|
S → C: Feature Flags (Optional)
|
||||||
|
S → C: Clientbound Known Packs
|
||||||
|
C → S: Serverbound Known Packs
|
||||||
|
S → C: Registry Data (Multiple)
|
||||||
|
S → C: Update Tags (Optional)
|
||||||
|
S → C: Finish Configuration
|
||||||
|
C → S: Acknowledge Finish Configuration
|
||||||
|
S → C: Login (play)
|
||||||
|
S → C: Change Difficulty (Optional)
|
||||||
|
S → C: Player Abilities (Optional)
|
||||||
|
S → C: Set Held Item (Optional)
|
||||||
|
S → C: Update Recipes (Optional)
|
||||||
|
S → C: Entity Event (Optional, for the OP permission level; see Entity statuses#Player)
|
||||||
|
S → C: Commands (Optional)
|
||||||
|
S → C: Update Recipe Book (Optional)
|
||||||
|
S → C: Synchronize Player Position
|
||||||
|
C → S: Confirm Teleportation
|
||||||
|
C → S: Set Player Position and Rotation (Optional, to confirm the spawn position)
|
||||||
|
S → C: Server Data (Optional)
|
||||||
|
S → C: Player Info Update (Add Player action, all players except the one joining (the vanilla server separates these, you don't need to))
|
||||||
|
S → C: Player Info Update (Add Player action, joining player)
|
||||||
|
S → C: Initialize World Border (Optional)
|
||||||
|
S → C: Update Time (Optional)
|
||||||
|
S → C: Set Default Spawn Position (Optional, “home” spawn, not where the client will spawn on login)
|
||||||
|
S → C: Game Event (Start waiting for level chunks event, required for the client to spawn)
|
||||||
|
S → C: Set Ticking State (Optional)
|
||||||
|
S → C: Step Tick (Optional, the vanilla server sends this regardless of ticking state)
|
||||||
|
S → C: Set Center Chunk
|
||||||
|
S → C: Chunk Data and Update Light (One sent for each chunk in a circular area centered on the player's position)
|
||||||
|
S → C: inventory, entities, etc.
|
@ -1,7 +1,7 @@
|
|||||||
package component
|
package component
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"git.konjactw.dev/patyhank/minego/codec/slot"
|
"git.konjactw.dev/patyhank/minego/pkg/protocol/slot"
|
||||||
)
|
)
|
||||||
|
|
||||||
//codec:gen
|
//codec:gen
|
@ -1,6 +1,8 @@
|
|||||||
package component
|
package component
|
||||||
|
|
||||||
import "git.konjactw.dev/patyhank/minego/codec/slot"
|
import (
|
||||||
|
"git.konjactw.dev/patyhank/minego/pkg/protocol/slot"
|
||||||
|
)
|
||||||
|
|
||||||
//codec:gen
|
//codec:gen
|
||||||
type AxolotlVariant struct {
|
type AxolotlVariant struct {
|
@ -1,7 +1,7 @@
|
|||||||
package component
|
package component
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"git.konjactw.dev/patyhank/minego/codec/slot"
|
"git.konjactw.dev/patyhank/minego/pkg/protocol/slot"
|
||||||
pk "github.com/Tnze/go-mc/net/packet"
|
pk "github.com/Tnze/go-mc/net/packet"
|
||||||
)
|
)
|
||||||
|
|
@ -1,6 +1,8 @@
|
|||||||
package component
|
package component
|
||||||
|
|
||||||
import "git.konjactw.dev/patyhank/minego/codec/slot"
|
import (
|
||||||
|
"git.konjactw.dev/patyhank/minego/pkg/protocol/slot"
|
||||||
|
)
|
||||||
|
|
||||||
//codec:gen
|
//codec:gen
|
||||||
type BaseColor struct {
|
type BaseColor struct {
|
@ -1,7 +1,7 @@
|
|||||||
package component
|
package component
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"git.konjactw.dev/patyhank/minego/codec/slot"
|
"git.konjactw.dev/patyhank/minego/pkg/protocol/slot"
|
||||||
"github.com/Tnze/go-mc/nbt"
|
"github.com/Tnze/go-mc/nbt"
|
||||||
)
|
)
|
||||||
|
|
@ -1,7 +1,7 @@
|
|||||||
package component
|
package component
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"git.konjactw.dev/patyhank/minego/codec/slot"
|
"git.konjactw.dev/patyhank/minego/pkg/protocol/slot"
|
||||||
"github.com/Tnze/go-mc/nbt"
|
"github.com/Tnze/go-mc/nbt"
|
||||||
)
|
)
|
||||||
|
|
@ -1,6 +1,8 @@
|
|||||||
package component
|
package component
|
||||||
|
|
||||||
import "git.konjactw.dev/patyhank/minego/codec/slot"
|
import (
|
||||||
|
"git.konjactw.dev/patyhank/minego/pkg/protocol/slot"
|
||||||
|
)
|
||||||
|
|
||||||
//codec:gen
|
//codec:gen
|
||||||
type BlockState struct {
|
type BlockState struct {
|
@ -1,7 +1,7 @@
|
|||||||
package component
|
package component
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"git.konjactw.dev/patyhank/minego/codec/slot"
|
"git.konjactw.dev/patyhank/minego/pkg/protocol/slot"
|
||||||
pk "github.com/Tnze/go-mc/net/packet"
|
pk "github.com/Tnze/go-mc/net/packet"
|
||||||
)
|
)
|
||||||
|
|
@ -1,7 +1,7 @@
|
|||||||
package component
|
package component
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"git.konjactw.dev/patyhank/minego/codec/slot"
|
"git.konjactw.dev/patyhank/minego/pkg/protocol/slot"
|
||||||
"github.com/Tnze/go-mc/net/packet"
|
"github.com/Tnze/go-mc/net/packet"
|
||||||
)
|
)
|
||||||
|
|
@ -1,7 +1,7 @@
|
|||||||
package component
|
package component
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"git.konjactw.dev/patyhank/minego/codec/slot"
|
"git.konjactw.dev/patyhank/minego/pkg/protocol/slot"
|
||||||
"github.com/Tnze/go-mc/nbt"
|
"github.com/Tnze/go-mc/nbt"
|
||||||
)
|
)
|
||||||
|
|
@ -1,13 +1,15 @@
|
|||||||
package component
|
package component
|
||||||
|
|
||||||
import "git.konjactw.dev/patyhank/minego/codec/slot"
|
import (
|
||||||
|
slot2 "git.konjactw.dev/patyhank/minego/pkg/protocol/slot"
|
||||||
|
)
|
||||||
|
|
||||||
//codec:gen
|
//codec:gen
|
||||||
type BundleContents struct {
|
type BundleContents struct {
|
||||||
Items []slot.Slot
|
Items []slot2.Slot
|
||||||
}
|
}
|
||||||
|
|
||||||
func (*BundleContents) Type() slot.ComponentID {
|
func (*BundleContents) Type() slot2.ComponentID {
|
||||||
return 41
|
return 41
|
||||||
}
|
}
|
||||||
|
|
@ -1,6 +1,8 @@
|
|||||||
package component
|
package component
|
||||||
|
|
||||||
import "git.konjactw.dev/patyhank/minego/codec/slot"
|
import (
|
||||||
|
"git.konjactw.dev/patyhank/minego/pkg/protocol/slot"
|
||||||
|
)
|
||||||
|
|
||||||
//codec:gen
|
//codec:gen
|
||||||
type CanBreak struct {
|
type CanBreak struct {
|
@ -3,7 +3,7 @@ package component
|
|||||||
import (
|
import (
|
||||||
"io"
|
"io"
|
||||||
|
|
||||||
"git.konjactw.dev/patyhank/minego/codec/slot"
|
"git.konjactw.dev/patyhank/minego/pkg/protocol/slot"
|
||||||
"github.com/Tnze/go-mc/nbt"
|
"github.com/Tnze/go-mc/nbt"
|
||||||
pk "github.com/Tnze/go-mc/net/packet"
|
pk "github.com/Tnze/go-mc/net/packet"
|
||||||
)
|
)
|
@ -1,6 +1,8 @@
|
|||||||
package component
|
package component
|
||||||
|
|
||||||
import "git.konjactw.dev/patyhank/minego/codec/slot"
|
import (
|
||||||
|
"git.konjactw.dev/patyhank/minego/pkg/protocol/slot"
|
||||||
|
)
|
||||||
|
|
||||||
//codec:gen
|
//codec:gen
|
||||||
type CatCollar struct {
|
type CatCollar struct {
|
@ -1,6 +1,8 @@
|
|||||||
package component
|
package component
|
||||||
|
|
||||||
import "git.konjactw.dev/patyhank/minego/codec/slot"
|
import (
|
||||||
|
"git.konjactw.dev/patyhank/minego/pkg/protocol/slot"
|
||||||
|
)
|
||||||
|
|
||||||
//codec:gen
|
//codec:gen
|
||||||
type CatVariant struct {
|
type CatVariant struct {
|
@ -1,13 +1,15 @@
|
|||||||
package component
|
package component
|
||||||
|
|
||||||
import "git.konjactw.dev/patyhank/minego/codec/slot"
|
import (
|
||||||
|
slot2 "git.konjactw.dev/patyhank/minego/pkg/protocol/slot"
|
||||||
|
)
|
||||||
|
|
||||||
//codec:gen
|
//codec:gen
|
||||||
type ChargedProjectiles struct {
|
type ChargedProjectiles struct {
|
||||||
Projectiles []slot.Slot
|
Projectiles []slot2.Slot
|
||||||
}
|
}
|
||||||
|
|
||||||
func (*ChargedProjectiles) Type() slot.ComponentID {
|
func (*ChargedProjectiles) Type() slot2.ComponentID {
|
||||||
return 40
|
return 40
|
||||||
}
|
}
|
||||||
|
|
@ -3,7 +3,7 @@ package component
|
|||||||
import (
|
import (
|
||||||
"io"
|
"io"
|
||||||
|
|
||||||
"git.konjactw.dev/patyhank/minego/codec/slot"
|
"git.konjactw.dev/patyhank/minego/pkg/protocol/slot"
|
||||||
"github.com/Tnze/go-mc/net/packet"
|
"github.com/Tnze/go-mc/net/packet"
|
||||||
)
|
)
|
||||||
|
|
@ -3602,106 +3602,13 @@ func (c WrittenBookPage) WriteTo(w io.Writer) (n int64, err error) {
|
|||||||
return n, err
|
return n, err
|
||||||
}
|
}
|
||||||
|
|
||||||
// StringVarIntArray a utility type for encoding/decoding packet.String -> string[packet.VarInt] slice.
|
|
||||||
type StringVarIntArray []string
|
|
||||||
|
|
||||||
func (a StringVarIntArray) WriteTo(w io.Writer) (n int64, err error) {
|
|
||||||
size := len(a)
|
|
||||||
if nn, err := packet.VarInt(size).WriteTo(w); err != nil {
|
|
||||||
return n, err
|
|
||||||
}
|
|
||||||
n += nn
|
|
||||||
for i := 0; i < size; i++ {
|
|
||||||
nn, err := packet.String(a[i]).WriteTo(w)
|
|
||||||
n += nn
|
|
||||||
if err != nil {
|
|
||||||
return n, err
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return n, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (a *StringVarIntArray) ReadFrom(r io.Reader) (n int64, err error) {
|
|
||||||
var size packet.VarInt
|
|
||||||
nn, err := size.ReadFrom(r)
|
|
||||||
n += nn
|
|
||||||
if err != nil {
|
|
||||||
return n, err
|
|
||||||
}
|
|
||||||
if size < 0 {
|
|
||||||
return n, errors.New("array length less than zero")
|
|
||||||
}
|
|
||||||
|
|
||||||
if cap(*a) >= int(size) {
|
|
||||||
*a = (*a)[:int(size)]
|
|
||||||
} else {
|
|
||||||
*a = make(StringVarIntArray, int(size))
|
|
||||||
}
|
|
||||||
|
|
||||||
for i := 0; i < int(size); i++ {
|
|
||||||
nn, err = (*packet.String)(&(*a)[i]).ReadFrom(r)
|
|
||||||
n += nn
|
|
||||||
if err != nil {
|
|
||||||
return n, err
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return n, err
|
|
||||||
}
|
|
||||||
|
|
||||||
// Int32VarIntVarIntArray a utility type for encoding/decoding packet.VarInt -> int32[packet.VarInt] slice.
|
|
||||||
type Int32VarIntVarIntArray []int32
|
|
||||||
|
|
||||||
func (a Int32VarIntVarIntArray) WriteTo(w io.Writer) (n int64, err error) {
|
|
||||||
size := len(a)
|
|
||||||
if nn, err := packet.VarInt(size).WriteTo(w); err != nil {
|
|
||||||
return n, err
|
|
||||||
}
|
|
||||||
n += nn
|
|
||||||
for i := 0; i < size; i++ {
|
|
||||||
nn, err := packet.VarInt(a[i]).WriteTo(w)
|
|
||||||
n += nn
|
|
||||||
if err != nil {
|
|
||||||
return n, err
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return n, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (a *Int32VarIntVarIntArray) ReadFrom(r io.Reader) (n int64, err error) {
|
|
||||||
var size packet.VarInt
|
|
||||||
nn, err := size.ReadFrom(r)
|
|
||||||
n += nn
|
|
||||||
if err != nil {
|
|
||||||
return n, err
|
|
||||||
}
|
|
||||||
if size < 0 {
|
|
||||||
return n, errors.New("array length less than zero")
|
|
||||||
}
|
|
||||||
|
|
||||||
if cap(*a) >= int(size) {
|
|
||||||
*a = (*a)[:int(size)]
|
|
||||||
} else {
|
|
||||||
*a = make(Int32VarIntVarIntArray, int(size))
|
|
||||||
}
|
|
||||||
|
|
||||||
for i := 0; i < int(size); i++ {
|
|
||||||
nn, err = (*packet.VarInt)(&(*a)[i]).ReadFrom(r)
|
|
||||||
n += nn
|
|
||||||
if err != nil {
|
|
||||||
return n, err
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return n, err
|
|
||||||
}
|
|
||||||
|
|
||||||
// Float32VarIntArray a utility type for encoding/decoding packet.Float -> float32[packet.VarInt] slice.
|
// Float32VarIntArray a utility type for encoding/decoding packet.Float -> float32[packet.VarInt] slice.
|
||||||
type Float32VarIntArray []float32
|
type Float32VarIntArray []float32
|
||||||
|
|
||||||
func (a Float32VarIntArray) WriteTo(w io.Writer) (n int64, err error) {
|
func (a Float32VarIntArray) WriteTo(w io.Writer) (n int64, err error) {
|
||||||
size := len(a)
|
size := len(a)
|
||||||
if nn, err := packet.VarInt(size).WriteTo(w); err != nil {
|
nn, err := packet.VarInt(size).WriteTo(w)
|
||||||
|
if err != nil {
|
||||||
return n, err
|
return n, err
|
||||||
}
|
}
|
||||||
n += nn
|
n += nn
|
||||||
@ -3748,7 +3655,8 @@ type BoolVarIntArray []bool
|
|||||||
|
|
||||||
func (a BoolVarIntArray) WriteTo(w io.Writer) (n int64, err error) {
|
func (a BoolVarIntArray) WriteTo(w io.Writer) (n int64, err error) {
|
||||||
size := len(a)
|
size := len(a)
|
||||||
if nn, err := packet.VarInt(size).WriteTo(w); err != nil {
|
nn, err := packet.VarInt(size).WriteTo(w)
|
||||||
|
if err != nil {
|
||||||
return n, err
|
return n, err
|
||||||
}
|
}
|
||||||
n += nn
|
n += nn
|
||||||
@ -3795,7 +3703,8 @@ type Int32VarIntArray []int32
|
|||||||
|
|
||||||
func (a Int32VarIntArray) WriteTo(w io.Writer) (n int64, err error) {
|
func (a Int32VarIntArray) WriteTo(w io.Writer) (n int64, err error) {
|
||||||
size := len(a)
|
size := len(a)
|
||||||
if nn, err := packet.VarInt(size).WriteTo(w); err != nil {
|
nn, err := packet.VarInt(size).WriteTo(w)
|
||||||
|
if err != nil {
|
||||||
return n, err
|
return n, err
|
||||||
}
|
}
|
||||||
n += nn
|
n += nn
|
||||||
@ -3842,7 +3751,8 @@ type Int32PrefixedArrayVarIntArray []int32
|
|||||||
|
|
||||||
func (a Int32PrefixedArrayVarIntArray) WriteTo(w io.Writer) (n int64, err error) {
|
func (a Int32PrefixedArrayVarIntArray) WriteTo(w io.Writer) (n int64, err error) {
|
||||||
size := len(a)
|
size := len(a)
|
||||||
if nn, err := packet.VarInt(size).WriteTo(w); err != nil {
|
nn, err := packet.VarInt(size).WriteTo(w)
|
||||||
|
if err != nil {
|
||||||
return n, err
|
return n, err
|
||||||
}
|
}
|
||||||
n += nn
|
n += nn
|
||||||
@ -3883,3 +3793,99 @@ func (a *Int32PrefixedArrayVarIntArray) ReadFrom(r io.Reader) (n int64, err erro
|
|||||||
|
|
||||||
return n, err
|
return n, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// StringVarIntArray a utility type for encoding/decoding packet.String -> string[packet.VarInt] slice.
|
||||||
|
type StringVarIntArray []string
|
||||||
|
|
||||||
|
func (a StringVarIntArray) WriteTo(w io.Writer) (n int64, err error) {
|
||||||
|
size := len(a)
|
||||||
|
nn, err := packet.VarInt(size).WriteTo(w)
|
||||||
|
if err != nil {
|
||||||
|
return n, err
|
||||||
|
}
|
||||||
|
n += nn
|
||||||
|
for i := 0; i < size; i++ {
|
||||||
|
nn, err := packet.String(a[i]).WriteTo(w)
|
||||||
|
n += nn
|
||||||
|
if err != nil {
|
||||||
|
return n, err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return n, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (a *StringVarIntArray) ReadFrom(r io.Reader) (n int64, err error) {
|
||||||
|
var size packet.VarInt
|
||||||
|
nn, err := size.ReadFrom(r)
|
||||||
|
n += nn
|
||||||
|
if err != nil {
|
||||||
|
return n, err
|
||||||
|
}
|
||||||
|
if size < 0 {
|
||||||
|
return n, errors.New("array length less than zero")
|
||||||
|
}
|
||||||
|
|
||||||
|
if cap(*a) >= int(size) {
|
||||||
|
*a = (*a)[:int(size)]
|
||||||
|
} else {
|
||||||
|
*a = make(StringVarIntArray, int(size))
|
||||||
|
}
|
||||||
|
|
||||||
|
for i := 0; i < int(size); i++ {
|
||||||
|
nn, err = (*packet.String)(&(*a)[i]).ReadFrom(r)
|
||||||
|
n += nn
|
||||||
|
if err != nil {
|
||||||
|
return n, err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return n, err
|
||||||
|
}
|
||||||
|
|
||||||
|
// Int32VarIntVarIntArray a utility type for encoding/decoding packet.VarInt -> int32[packet.VarInt] slice.
|
||||||
|
type Int32VarIntVarIntArray []int32
|
||||||
|
|
||||||
|
func (a Int32VarIntVarIntArray) WriteTo(w io.Writer) (n int64, err error) {
|
||||||
|
size := len(a)
|
||||||
|
nn, err := packet.VarInt(size).WriteTo(w)
|
||||||
|
if err != nil {
|
||||||
|
return n, err
|
||||||
|
}
|
||||||
|
n += nn
|
||||||
|
for i := 0; i < size; i++ {
|
||||||
|
nn, err := packet.VarInt(a[i]).WriteTo(w)
|
||||||
|
n += nn
|
||||||
|
if err != nil {
|
||||||
|
return n, err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return n, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (a *Int32VarIntVarIntArray) ReadFrom(r io.Reader) (n int64, err error) {
|
||||||
|
var size packet.VarInt
|
||||||
|
nn, err := size.ReadFrom(r)
|
||||||
|
n += nn
|
||||||
|
if err != nil {
|
||||||
|
return n, err
|
||||||
|
}
|
||||||
|
if size < 0 {
|
||||||
|
return n, errors.New("array length less than zero")
|
||||||
|
}
|
||||||
|
|
||||||
|
if cap(*a) >= int(size) {
|
||||||
|
*a = (*a)[:int(size)]
|
||||||
|
} else {
|
||||||
|
*a = make(Int32VarIntVarIntArray, int(size))
|
||||||
|
}
|
||||||
|
|
||||||
|
for i := 0; i < int(size); i++ {
|
||||||
|
nn, err = (*packet.VarInt)(&(*a)[i]).ReadFrom(r)
|
||||||
|
n += nn
|
||||||
|
if err != nil {
|
||||||
|
return n, err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return n, err
|
||||||
|
}
|
@ -1,6 +1,8 @@
|
|||||||
package component
|
package component
|
||||||
|
|
||||||
import "git.konjactw.dev/patyhank/minego/codec/slot"
|
import (
|
||||||
|
"git.konjactw.dev/patyhank/minego/pkg/protocol/slot"
|
||||||
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
slot.RegisterComponent(func() slot.Component {
|
slot.RegisterComponent(func() slot.Component {
|
@ -1,7 +1,7 @@
|
|||||||
package component
|
package component
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"git.konjactw.dev/patyhank/minego/codec/slot"
|
"git.konjactw.dev/patyhank/minego/pkg/protocol/slot"
|
||||||
"github.com/Tnze/go-mc/net/packet"
|
"github.com/Tnze/go-mc/net/packet"
|
||||||
)
|
)
|
||||||
|
|
@ -1,13 +1,15 @@
|
|||||||
package component
|
package component
|
||||||
|
|
||||||
import "git.konjactw.dev/patyhank/minego/codec/slot"
|
import (
|
||||||
|
slot2 "git.konjactw.dev/patyhank/minego/pkg/protocol/slot"
|
||||||
|
)
|
||||||
|
|
||||||
//codec:gen
|
//codec:gen
|
||||||
type Container struct {
|
type Container struct {
|
||||||
Items []slot.Slot
|
Items []slot2.Slot
|
||||||
}
|
}
|
||||||
|
|
||||||
func (*Container) Type() slot.ComponentID {
|
func (*Container) Type() slot2.ComponentID {
|
||||||
return 66
|
return 66
|
||||||
}
|
}
|
||||||
|
|
@ -1,7 +1,7 @@
|
|||||||
package component
|
package component
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"git.konjactw.dev/patyhank/minego/codec/slot"
|
"git.konjactw.dev/patyhank/minego/pkg/protocol/slot"
|
||||||
"github.com/Tnze/go-mc/nbt"
|
"github.com/Tnze/go-mc/nbt"
|
||||||
)
|
)
|
||||||
|
|
@ -1,6 +1,8 @@
|
|||||||
package component
|
package component
|
||||||
|
|
||||||
import "git.konjactw.dev/patyhank/minego/codec/slot"
|
import (
|
||||||
|
"git.konjactw.dev/patyhank/minego/pkg/protocol/slot"
|
||||||
|
)
|
||||||
|
|
||||||
//codec:gen
|
//codec:gen
|
||||||
type CowVariant struct {
|
type CowVariant struct {
|
@ -1,6 +1,8 @@
|
|||||||
package component
|
package component
|
||||||
|
|
||||||
import "git.konjactw.dev/patyhank/minego/codec/slot"
|
import (
|
||||||
|
"git.konjactw.dev/patyhank/minego/pkg/protocol/slot"
|
||||||
|
)
|
||||||
|
|
||||||
//codec:gen
|
//codec:gen
|
||||||
type CreativeSlotLock struct {
|
type CreativeSlotLock struct {
|
@ -1,7 +1,7 @@
|
|||||||
package component
|
package component
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"git.konjactw.dev/patyhank/minego/codec/slot"
|
"git.konjactw.dev/patyhank/minego/pkg/protocol/slot"
|
||||||
"github.com/Tnze/go-mc/nbt"
|
"github.com/Tnze/go-mc/nbt"
|
||||||
)
|
)
|
||||||
|
|
@ -1,6 +1,8 @@
|
|||||||
package component
|
package component
|
||||||
|
|
||||||
import "git.konjactw.dev/patyhank/minego/codec/slot"
|
import (
|
||||||
|
"git.konjactw.dev/patyhank/minego/pkg/protocol/slot"
|
||||||
|
)
|
||||||
|
|
||||||
//codec:gen
|
//codec:gen
|
||||||
type CustomModelData struct {
|
type CustomModelData struct {
|
@ -1,7 +1,7 @@
|
|||||||
package component
|
package component
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"git.konjactw.dev/patyhank/minego/codec/slot"
|
"git.konjactw.dev/patyhank/minego/pkg/protocol/slot"
|
||||||
"github.com/Tnze/go-mc/chat"
|
"github.com/Tnze/go-mc/chat"
|
||||||
)
|
)
|
||||||
|
|
@ -1,6 +1,8 @@
|
|||||||
package component
|
package component
|
||||||
|
|
||||||
import "git.konjactw.dev/patyhank/minego/codec/slot"
|
import (
|
||||||
|
"git.konjactw.dev/patyhank/minego/pkg/protocol/slot"
|
||||||
|
)
|
||||||
|
|
||||||
//codec:gen
|
//codec:gen
|
||||||
type Damage struct {
|
type Damage struct {
|
@ -1,7 +1,7 @@
|
|||||||
package component
|
package component
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"git.konjactw.dev/patyhank/minego/codec/slot"
|
"git.konjactw.dev/patyhank/minego/pkg/protocol/slot"
|
||||||
pk "github.com/Tnze/go-mc/net/packet"
|
pk "github.com/Tnze/go-mc/net/packet"
|
||||||
)
|
)
|
||||||
|
|
@ -1,6 +1,8 @@
|
|||||||
package component
|
package component
|
||||||
|
|
||||||
import "git.konjactw.dev/patyhank/minego/codec/slot"
|
import (
|
||||||
|
"git.konjactw.dev/patyhank/minego/pkg/protocol/slot"
|
||||||
|
)
|
||||||
|
|
||||||
//codec:gen
|
//codec:gen
|
||||||
type DeathProtection struct {
|
type DeathProtection struct {
|
@ -1,7 +1,7 @@
|
|||||||
package component
|
package component
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"git.konjactw.dev/patyhank/minego/codec/slot"
|
"git.konjactw.dev/patyhank/minego/pkg/protocol/slot"
|
||||||
"github.com/Tnze/go-mc/nbt"
|
"github.com/Tnze/go-mc/nbt"
|
||||||
)
|
)
|
||||||
|
|
@ -1,6 +1,8 @@
|
|||||||
package component
|
package component
|
||||||
|
|
||||||
import "git.konjactw.dev/patyhank/minego/codec/slot"
|
import (
|
||||||
|
"git.konjactw.dev/patyhank/minego/pkg/protocol/slot"
|
||||||
|
)
|
||||||
|
|
||||||
//codec:gen
|
//codec:gen
|
||||||
type DyedColor struct {
|
type DyedColor struct {
|
@ -1,6 +1,8 @@
|
|||||||
package component
|
package component
|
||||||
|
|
||||||
import "git.konjactw.dev/patyhank/minego/codec/slot"
|
import (
|
||||||
|
"git.konjactw.dev/patyhank/minego/pkg/protocol/slot"
|
||||||
|
)
|
||||||
|
|
||||||
//codec:gen
|
//codec:gen
|
||||||
type Enchantable struct {
|
type Enchantable struct {
|
@ -1,6 +1,8 @@
|
|||||||
package component
|
package component
|
||||||
|
|
||||||
import "git.konjactw.dev/patyhank/minego/codec/slot"
|
import (
|
||||||
|
"git.konjactw.dev/patyhank/minego/pkg/protocol/slot"
|
||||||
|
)
|
||||||
|
|
||||||
//codec:gen
|
//codec:gen
|
||||||
type EnchantmentGlintOverride struct {
|
type EnchantmentGlintOverride struct {
|
@ -1,6 +1,8 @@
|
|||||||
package component
|
package component
|
||||||
|
|
||||||
import "git.konjactw.dev/patyhank/minego/codec/slot"
|
import (
|
||||||
|
"git.konjactw.dev/patyhank/minego/pkg/protocol/slot"
|
||||||
|
)
|
||||||
|
|
||||||
//codec:gen
|
//codec:gen
|
||||||
type Enchantments struct {
|
type Enchantments struct {
|
@ -1,7 +1,7 @@
|
|||||||
package component
|
package component
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"git.konjactw.dev/patyhank/minego/codec/slot"
|
"git.konjactw.dev/patyhank/minego/pkg/protocol/slot"
|
||||||
"github.com/Tnze/go-mc/nbt"
|
"github.com/Tnze/go-mc/nbt"
|
||||||
)
|
)
|
||||||
|
|
@ -1,7 +1,7 @@
|
|||||||
package component
|
package component
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"git.konjactw.dev/patyhank/minego/codec/slot"
|
"git.konjactw.dev/patyhank/minego/pkg/protocol/slot"
|
||||||
pk "github.com/Tnze/go-mc/net/packet"
|
pk "github.com/Tnze/go-mc/net/packet"
|
||||||
)
|
)
|
||||||
|
|
@ -1,6 +1,8 @@
|
|||||||
package component
|
package component
|
||||||
|
|
||||||
import "git.konjactw.dev/patyhank/minego/codec/slot"
|
import (
|
||||||
|
"git.konjactw.dev/patyhank/minego/pkg/protocol/slot"
|
||||||
|
)
|
||||||
|
|
||||||
//codec:gen
|
//codec:gen
|
||||||
type FireworkExplosion struct {
|
type FireworkExplosion struct {
|
@ -1,6 +1,8 @@
|
|||||||
package component
|
package component
|
||||||
|
|
||||||
import "git.konjactw.dev/patyhank/minego/codec/slot"
|
import (
|
||||||
|
"git.konjactw.dev/patyhank/minego/pkg/protocol/slot"
|
||||||
|
)
|
||||||
|
|
||||||
//codec:gen
|
//codec:gen
|
||||||
type Fireworks struct {
|
type Fireworks struct {
|
@ -1,6 +1,8 @@
|
|||||||
package component
|
package component
|
||||||
|
|
||||||
import "git.konjactw.dev/patyhank/minego/codec/slot"
|
import (
|
||||||
|
"git.konjactw.dev/patyhank/minego/pkg/protocol/slot"
|
||||||
|
)
|
||||||
|
|
||||||
//codec:gen
|
//codec:gen
|
||||||
type Food struct {
|
type Food struct {
|
@ -1,6 +1,8 @@
|
|||||||
package component
|
package component
|
||||||
|
|
||||||
import "git.konjactw.dev/patyhank/minego/codec/slot"
|
import (
|
||||||
|
"git.konjactw.dev/patyhank/minego/pkg/protocol/slot"
|
||||||
|
)
|
||||||
|
|
||||||
//codec:gen
|
//codec:gen
|
||||||
type FoxVariant struct {
|
type FoxVariant struct {
|
@ -1,6 +1,8 @@
|
|||||||
package component
|
package component
|
||||||
|
|
||||||
import "git.konjactw.dev/patyhank/minego/codec/slot"
|
import (
|
||||||
|
"git.konjactw.dev/patyhank/minego/pkg/protocol/slot"
|
||||||
|
)
|
||||||
|
|
||||||
//codec:gen
|
//codec:gen
|
||||||
type FrogVariant struct {
|
type FrogVariant struct {
|
@ -1,6 +1,8 @@
|
|||||||
package component
|
package component
|
||||||
|
|
||||||
import "git.konjactw.dev/patyhank/minego/codec/slot"
|
import (
|
||||||
|
"git.konjactw.dev/patyhank/minego/pkg/protocol/slot"
|
||||||
|
)
|
||||||
|
|
||||||
//codec:gen
|
//codec:gen
|
||||||
type Glider struct {
|
type Glider struct {
|
@ -1,6 +1,8 @@
|
|||||||
package component
|
package component
|
||||||
|
|
||||||
import "git.konjactw.dev/patyhank/minego/codec/slot"
|
import (
|
||||||
|
"git.konjactw.dev/patyhank/minego/pkg/protocol/slot"
|
||||||
|
)
|
||||||
|
|
||||||
//codec:gen
|
//codec:gen
|
||||||
type HorseVariant struct {
|
type HorseVariant struct {
|
@ -1,7 +1,7 @@
|
|||||||
package component
|
package component
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"git.konjactw.dev/patyhank/minego/codec/slot"
|
"git.konjactw.dev/patyhank/minego/pkg/protocol/slot"
|
||||||
"github.com/Tnze/go-mc/chat"
|
"github.com/Tnze/go-mc/chat"
|
||||||
"github.com/Tnze/go-mc/net/packet"
|
"github.com/Tnze/go-mc/net/packet"
|
||||||
)
|
)
|
@ -1,7 +1,7 @@
|
|||||||
package component
|
package component
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"git.konjactw.dev/patyhank/minego/codec/slot"
|
"git.konjactw.dev/patyhank/minego/pkg/protocol/slot"
|
||||||
"github.com/Tnze/go-mc/nbt"
|
"github.com/Tnze/go-mc/nbt"
|
||||||
)
|
)
|
||||||
|
|
@ -1,7 +1,7 @@
|
|||||||
package component
|
package component
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"git.konjactw.dev/patyhank/minego/codec/slot"
|
"git.konjactw.dev/patyhank/minego/pkg/protocol/slot"
|
||||||
"github.com/Tnze/go-mc/net/packet"
|
"github.com/Tnze/go-mc/net/packet"
|
||||||
)
|
)
|
||||||
|
|
@ -1,7 +1,7 @@
|
|||||||
package component
|
package component
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"git.konjactw.dev/patyhank/minego/codec/slot"
|
"git.konjactw.dev/patyhank/minego/pkg/protocol/slot"
|
||||||
"github.com/Tnze/go-mc/chat"
|
"github.com/Tnze/go-mc/chat"
|
||||||
)
|
)
|
||||||
|
|
@ -3,7 +3,7 @@ package component
|
|||||||
import (
|
import (
|
||||||
"io"
|
"io"
|
||||||
|
|
||||||
"git.konjactw.dev/patyhank/minego/codec/slot"
|
"git.konjactw.dev/patyhank/minego/pkg/protocol/slot"
|
||||||
"github.com/Tnze/go-mc/chat"
|
"github.com/Tnze/go-mc/chat"
|
||||||
"github.com/Tnze/go-mc/net/packet"
|
"github.com/Tnze/go-mc/net/packet"
|
||||||
)
|
)
|
@ -1,6 +1,8 @@
|
|||||||
package component
|
package component
|
||||||
|
|
||||||
import "git.konjactw.dev/patyhank/minego/codec/slot"
|
import (
|
||||||
|
"git.konjactw.dev/patyhank/minego/pkg/protocol/slot"
|
||||||
|
)
|
||||||
|
|
||||||
//codec:gen
|
//codec:gen
|
||||||
type LlamaVariant struct {
|
type LlamaVariant struct {
|
@ -1,7 +1,7 @@
|
|||||||
package component
|
package component
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"git.konjactw.dev/patyhank/minego/codec/slot"
|
"git.konjactw.dev/patyhank/minego/pkg/protocol/slot"
|
||||||
"github.com/Tnze/go-mc/nbt"
|
"github.com/Tnze/go-mc/nbt"
|
||||||
)
|
)
|
||||||
|
|
@ -1,7 +1,7 @@
|
|||||||
package component
|
package component
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"git.konjactw.dev/patyhank/minego/codec/slot"
|
"git.konjactw.dev/patyhank/minego/pkg/protocol/slot"
|
||||||
"github.com/Tnze/go-mc/net/packet"
|
"github.com/Tnze/go-mc/net/packet"
|
||||||
pk "github.com/Tnze/go-mc/net/packet"
|
pk "github.com/Tnze/go-mc/net/packet"
|
||||||
)
|
)
|
@ -1,7 +1,7 @@
|
|||||||
package component
|
package component
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"git.konjactw.dev/patyhank/minego/codec/slot"
|
"git.konjactw.dev/patyhank/minego/pkg/protocol/slot"
|
||||||
"github.com/Tnze/go-mc/chat"
|
"github.com/Tnze/go-mc/chat"
|
||||||
)
|
)
|
||||||
|
|
@ -1,6 +1,8 @@
|
|||||||
package component
|
package component
|
||||||
|
|
||||||
import "git.konjactw.dev/patyhank/minego/codec/slot"
|
import (
|
||||||
|
"git.konjactw.dev/patyhank/minego/pkg/protocol/slot"
|
||||||
|
)
|
||||||
|
|
||||||
//codec:gen
|
//codec:gen
|
||||||
type MapColor struct {
|
type MapColor struct {
|
@ -1,7 +1,7 @@
|
|||||||
package component
|
package component
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"git.konjactw.dev/patyhank/minego/codec/slot"
|
"git.konjactw.dev/patyhank/minego/pkg/protocol/slot"
|
||||||
"github.com/Tnze/go-mc/nbt"
|
"github.com/Tnze/go-mc/nbt"
|
||||||
)
|
)
|
||||||
|
|
@ -1,6 +1,8 @@
|
|||||||
package component
|
package component
|
||||||
|
|
||||||
import "git.konjactw.dev/patyhank/minego/codec/slot"
|
import (
|
||||||
|
"git.konjactw.dev/patyhank/minego/pkg/protocol/slot"
|
||||||
|
)
|
||||||
|
|
||||||
//codec:gen
|
//codec:gen
|
||||||
type MapID struct {
|
type MapID struct {
|
@ -1,6 +1,8 @@
|
|||||||
package component
|
package component
|
||||||
|
|
||||||
import "git.konjactw.dev/patyhank/minego/codec/slot"
|
import (
|
||||||
|
"git.konjactw.dev/patyhank/minego/pkg/protocol/slot"
|
||||||
|
)
|
||||||
|
|
||||||
//codec:gen
|
//codec:gen
|
||||||
type MapPostProcessing struct {
|
type MapPostProcessing struct {
|
@ -1,6 +1,8 @@
|
|||||||
package component
|
package component
|
||||||
|
|
||||||
import "git.konjactw.dev/patyhank/minego/codec/slot"
|
import (
|
||||||
|
"git.konjactw.dev/patyhank/minego/pkg/protocol/slot"
|
||||||
|
)
|
||||||
|
|
||||||
//codec:gen
|
//codec:gen
|
||||||
type MaxDamage struct {
|
type MaxDamage struct {
|
@ -1,6 +1,8 @@
|
|||||||
package component
|
package component
|
||||||
|
|
||||||
import "git.konjactw.dev/patyhank/minego/codec/slot"
|
import (
|
||||||
|
"git.konjactw.dev/patyhank/minego/pkg/protocol/slot"
|
||||||
|
)
|
||||||
|
|
||||||
//codec:gen
|
//codec:gen
|
||||||
type MaxStackSize struct {
|
type MaxStackSize struct {
|
@ -1,6 +1,8 @@
|
|||||||
package component
|
package component
|
||||||
|
|
||||||
import "git.konjactw.dev/patyhank/minego/codec/slot"
|
import (
|
||||||
|
"git.konjactw.dev/patyhank/minego/pkg/protocol/slot"
|
||||||
|
)
|
||||||
|
|
||||||
//codec:gen
|
//codec:gen
|
||||||
type MooshroomVariant struct {
|
type MooshroomVariant struct {
|
@ -1,7 +1,7 @@
|
|||||||
package component
|
package component
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"git.konjactw.dev/patyhank/minego/codec/slot"
|
"git.konjactw.dev/patyhank/minego/pkg/protocol/slot"
|
||||||
"github.com/Tnze/go-mc/net/packet"
|
"github.com/Tnze/go-mc/net/packet"
|
||||||
)
|
)
|
||||||
|
|
@ -1,6 +1,8 @@
|
|||||||
package component
|
package component
|
||||||
|
|
||||||
import "git.konjactw.dev/patyhank/minego/codec/slot"
|
import (
|
||||||
|
"git.konjactw.dev/patyhank/minego/pkg/protocol/slot"
|
||||||
|
)
|
||||||
|
|
||||||
//codec:gen
|
//codec:gen
|
||||||
type OminousBottleAmplifier struct {
|
type OminousBottleAmplifier struct {
|
@ -1,7 +1,7 @@
|
|||||||
package component
|
package component
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"git.konjactw.dev/patyhank/minego/codec/slot"
|
"git.konjactw.dev/patyhank/minego/pkg/protocol/slot"
|
||||||
"github.com/Tnze/go-mc/chat"
|
"github.com/Tnze/go-mc/chat"
|
||||||
pk "github.com/Tnze/go-mc/net/packet"
|
pk "github.com/Tnze/go-mc/net/packet"
|
||||||
)
|
)
|
@ -1,6 +1,8 @@
|
|||||||
package component
|
package component
|
||||||
|
|
||||||
import "git.konjactw.dev/patyhank/minego/codec/slot"
|
import (
|
||||||
|
"git.konjactw.dev/patyhank/minego/pkg/protocol/slot"
|
||||||
|
)
|
||||||
|
|
||||||
//codec:gen
|
//codec:gen
|
||||||
type ParrotVariant struct {
|
type ParrotVariant struct {
|
@ -1,6 +1,8 @@
|
|||||||
package component
|
package component
|
||||||
|
|
||||||
import "git.konjactw.dev/patyhank/minego/codec/slot"
|
import (
|
||||||
|
"git.konjactw.dev/patyhank/minego/pkg/protocol/slot"
|
||||||
|
)
|
||||||
|
|
||||||
//codec:gen
|
//codec:gen
|
||||||
type PigVariant struct {
|
type PigVariant struct {
|
@ -1,6 +1,8 @@
|
|||||||
package component
|
package component
|
||||||
|
|
||||||
import "git.konjactw.dev/patyhank/minego/codec/slot"
|
import (
|
||||||
|
"git.konjactw.dev/patyhank/minego/pkg/protocol/slot"
|
||||||
|
)
|
||||||
|
|
||||||
//codec:gen
|
//codec:gen
|
||||||
type PotDecorations struct {
|
type PotDecorations struct {
|
@ -1,7 +1,7 @@
|
|||||||
package component
|
package component
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"git.konjactw.dev/patyhank/minego/codec/slot"
|
"git.konjactw.dev/patyhank/minego/pkg/protocol/slot"
|
||||||
)
|
)
|
||||||
|
|
||||||
//codec:gen
|
//codec:gen
|
@ -1,6 +1,8 @@
|
|||||||
package component
|
package component
|
||||||
|
|
||||||
import "git.konjactw.dev/patyhank/minego/codec/slot"
|
import (
|
||||||
|
"git.konjactw.dev/patyhank/minego/pkg/protocol/slot"
|
||||||
|
)
|
||||||
|
|
||||||
//codec:gen
|
//codec:gen
|
||||||
type PotionDurationScale struct {
|
type PotionDurationScale struct {
|
@ -1,7 +1,7 @@
|
|||||||
package component
|
package component
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"git.konjactw.dev/patyhank/minego/codec/slot"
|
"git.konjactw.dev/patyhank/minego/pkg/protocol/slot"
|
||||||
pk "github.com/Tnze/go-mc/net/packet"
|
pk "github.com/Tnze/go-mc/net/packet"
|
||||||
)
|
)
|
||||||
|
|
@ -1,7 +1,7 @@
|
|||||||
package component
|
package component
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"git.konjactw.dev/patyhank/minego/codec/slot"
|
"git.konjactw.dev/patyhank/minego/pkg/protocol/slot"
|
||||||
"github.com/Tnze/go-mc/net/packet"
|
"github.com/Tnze/go-mc/net/packet"
|
||||||
)
|
)
|
||||||
|
|
@ -3,7 +3,7 @@ package component
|
|||||||
import (
|
import (
|
||||||
"io"
|
"io"
|
||||||
|
|
||||||
"git.konjactw.dev/patyhank/minego/codec/slot"
|
"git.konjactw.dev/patyhank/minego/pkg/protocol/slot"
|
||||||
"github.com/Tnze/go-mc/net/packet"
|
"github.com/Tnze/go-mc/net/packet"
|
||||||
)
|
)
|
||||||
|
|
@ -1,6 +1,8 @@
|
|||||||
package component
|
package component
|
||||||
|
|
||||||
import "git.konjactw.dev/patyhank/minego/codec/slot"
|
import (
|
||||||
|
"git.konjactw.dev/patyhank/minego/pkg/protocol/slot"
|
||||||
|
)
|
||||||
|
|
||||||
//codec:gen
|
//codec:gen
|
||||||
type RabbitVariant struct {
|
type RabbitVariant struct {
|
@ -1,6 +1,8 @@
|
|||||||
package component
|
package component
|
||||||
|
|
||||||
import "git.konjactw.dev/patyhank/minego/codec/slot"
|
import (
|
||||||
|
"git.konjactw.dev/patyhank/minego/pkg/protocol/slot"
|
||||||
|
)
|
||||||
|
|
||||||
//codec:gen
|
//codec:gen
|
||||||
type Rarity struct {
|
type Rarity struct {
|
@ -1,7 +1,7 @@
|
|||||||
package component
|
package component
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"git.konjactw.dev/patyhank/minego/codec/slot"
|
"git.konjactw.dev/patyhank/minego/pkg/protocol/slot"
|
||||||
"github.com/Tnze/go-mc/nbt"
|
"github.com/Tnze/go-mc/nbt"
|
||||||
)
|
)
|
||||||
|
|
@ -1,6 +1,8 @@
|
|||||||
package component
|
package component
|
||||||
|
|
||||||
import "git.konjactw.dev/patyhank/minego/codec/slot"
|
import (
|
||||||
|
"git.konjactw.dev/patyhank/minego/pkg/protocol/slot"
|
||||||
|
)
|
||||||
|
|
||||||
//codec:gen
|
//codec:gen
|
||||||
type RepairCost struct {
|
type RepairCost struct {
|
@ -1,7 +1,7 @@
|
|||||||
package component
|
package component
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"git.konjactw.dev/patyhank/minego/codec/slot"
|
"git.konjactw.dev/patyhank/minego/pkg/protocol/slot"
|
||||||
pk "github.com/Tnze/go-mc/net/packet"
|
pk "github.com/Tnze/go-mc/net/packet"
|
||||||
)
|
)
|
||||||
|
|
@ -1,6 +1,8 @@
|
|||||||
package component
|
package component
|
||||||
|
|
||||||
import "git.konjactw.dev/patyhank/minego/codec/slot"
|
import (
|
||||||
|
"git.konjactw.dev/patyhank/minego/pkg/protocol/slot"
|
||||||
|
)
|
||||||
|
|
||||||
//codec:gen
|
//codec:gen
|
||||||
type SalmonSize struct {
|
type SalmonSize struct {
|
@ -1,6 +1,8 @@
|
|||||||
package component
|
package component
|
||||||
|
|
||||||
import "git.konjactw.dev/patyhank/minego/codec/slot"
|
import (
|
||||||
|
"git.konjactw.dev/patyhank/minego/pkg/protocol/slot"
|
||||||
|
)
|
||||||
|
|
||||||
//codec:gen
|
//codec:gen
|
||||||
type SheepColor struct {
|
type SheepColor struct {
|
@ -1,6 +1,8 @@
|
|||||||
package component
|
package component
|
||||||
|
|
||||||
import "git.konjactw.dev/patyhank/minego/codec/slot"
|
import (
|
||||||
|
"git.konjactw.dev/patyhank/minego/pkg/protocol/slot"
|
||||||
|
)
|
||||||
|
|
||||||
//codec:gen
|
//codec:gen
|
||||||
type ShulkerColor struct {
|
type ShulkerColor struct {
|
@ -1,6 +1,8 @@
|
|||||||
package component
|
package component
|
||||||
|
|
||||||
import "git.konjactw.dev/patyhank/minego/codec/slot"
|
import (
|
||||||
|
"git.konjactw.dev/patyhank/minego/pkg/protocol/slot"
|
||||||
|
)
|
||||||
|
|
||||||
//codec:gen
|
//codec:gen
|
||||||
type StoredEnchantments struct {
|
type StoredEnchantments struct {
|
@ -1,6 +1,8 @@
|
|||||||
package component
|
package component
|
||||||
|
|
||||||
import "git.konjactw.dev/patyhank/minego/codec/slot"
|
import (
|
||||||
|
"git.konjactw.dev/patyhank/minego/pkg/protocol/slot"
|
||||||
|
)
|
||||||
|
|
||||||
//codec:gen
|
//codec:gen
|
||||||
type SuspiciousStewEffects struct {
|
type SuspiciousStewEffects struct {
|
@ -1,7 +1,7 @@
|
|||||||
package component
|
package component
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"git.konjactw.dev/patyhank/minego/codec/slot"
|
"git.konjactw.dev/patyhank/minego/pkg/protocol/slot"
|
||||||
pk "github.com/Tnze/go-mc/net/packet"
|
pk "github.com/Tnze/go-mc/net/packet"
|
||||||
)
|
)
|
||||||
|
|
@ -1,6 +1,8 @@
|
|||||||
package component
|
package component
|
||||||
|
|
||||||
import "git.konjactw.dev/patyhank/minego/codec/slot"
|
import (
|
||||||
|
"git.konjactw.dev/patyhank/minego/pkg/protocol/slot"
|
||||||
|
)
|
||||||
|
|
||||||
//codec:gen
|
//codec:gen
|
||||||
type TooltipDisplay struct {
|
type TooltipDisplay struct {
|
@ -1,7 +1,7 @@
|
|||||||
package component
|
package component
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"git.konjactw.dev/patyhank/minego/codec/slot"
|
"git.konjactw.dev/patyhank/minego/pkg/protocol/slot"
|
||||||
pk "github.com/Tnze/go-mc/net/packet"
|
pk "github.com/Tnze/go-mc/net/packet"
|
||||||
)
|
)
|
||||||
|
|
@ -1,7 +1,7 @@
|
|||||||
package component
|
package component
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"git.konjactw.dev/patyhank/minego/codec/slot"
|
"git.konjactw.dev/patyhank/minego/pkg/protocol/slot"
|
||||||
"github.com/Tnze/go-mc/chat"
|
"github.com/Tnze/go-mc/chat"
|
||||||
pk "github.com/Tnze/go-mc/net/packet"
|
pk "github.com/Tnze/go-mc/net/packet"
|
||||||
)
|
)
|
@ -1,6 +1,8 @@
|
|||||||
package component
|
package component
|
||||||
|
|
||||||
import "git.konjactw.dev/patyhank/minego/codec/slot"
|
import (
|
||||||
|
"git.konjactw.dev/patyhank/minego/pkg/protocol/slot"
|
||||||
|
)
|
||||||
|
|
||||||
//codec:gen
|
//codec:gen
|
||||||
type TropicalFishBaseColor struct {
|
type TropicalFishBaseColor struct {
|
@ -1,6 +1,8 @@
|
|||||||
package component
|
package component
|
||||||
|
|
||||||
import "git.konjactw.dev/patyhank/minego/codec/slot"
|
import (
|
||||||
|
"git.konjactw.dev/patyhank/minego/pkg/protocol/slot"
|
||||||
|
)
|
||||||
|
|
||||||
//codec:gen
|
//codec:gen
|
||||||
type TropicalFishPattern struct {
|
type TropicalFishPattern struct {
|
@ -1,6 +1,8 @@
|
|||||||
package component
|
package component
|
||||||
|
|
||||||
import "git.konjactw.dev/patyhank/minego/codec/slot"
|
import (
|
||||||
|
"git.konjactw.dev/patyhank/minego/pkg/protocol/slot"
|
||||||
|
)
|
||||||
|
|
||||||
//codec:gen
|
//codec:gen
|
||||||
type TropicalFishPatternColor struct {
|
type TropicalFishPatternColor struct {
|
@ -1,6 +1,8 @@
|
|||||||
package component
|
package component
|
||||||
|
|
||||||
import "git.konjactw.dev/patyhank/minego/codec/slot"
|
import (
|
||||||
|
"git.konjactw.dev/patyhank/minego/pkg/protocol/slot"
|
||||||
|
)
|
||||||
|
|
||||||
//codec:gen
|
//codec:gen
|
||||||
type Unbreakable struct {
|
type Unbreakable struct {
|
@ -1,7 +1,7 @@
|
|||||||
package component
|
package component
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"git.konjactw.dev/patyhank/minego/codec/slot"
|
"git.konjactw.dev/patyhank/minego/pkg/protocol/slot"
|
||||||
pk "github.com/Tnze/go-mc/net/packet"
|
pk "github.com/Tnze/go-mc/net/packet"
|
||||||
)
|
)
|
||||||
|
|
@ -1,13 +1,15 @@
|
|||||||
package component
|
package component
|
||||||
|
|
||||||
import "git.konjactw.dev/patyhank/minego/codec/slot"
|
import (
|
||||||
|
slot2 "git.konjactw.dev/patyhank/minego/pkg/protocol/slot"
|
||||||
|
)
|
||||||
|
|
||||||
//codec:gen
|
//codec:gen
|
||||||
type UseRemainder struct {
|
type UseRemainder struct {
|
||||||
Remainder slot.Slot
|
Remainder slot2.Slot
|
||||||
}
|
}
|
||||||
|
|
||||||
func (*UseRemainder) Type() slot.ComponentID {
|
func (*UseRemainder) Type() slot2.ComponentID {
|
||||||
return 22
|
return 22
|
||||||
}
|
}
|
||||||
|
|
@ -1,6 +1,8 @@
|
|||||||
package component
|
package component
|
||||||
|
|
||||||
import "git.konjactw.dev/patyhank/minego/codec/slot"
|
import (
|
||||||
|
"git.konjactw.dev/patyhank/minego/pkg/protocol/slot"
|
||||||
|
)
|
||||||
|
|
||||||
//codec:gen
|
//codec:gen
|
||||||
type VillagerVariant struct {
|
type VillagerVariant struct {
|
@ -1,6 +1,8 @@
|
|||||||
package component
|
package component
|
||||||
|
|
||||||
import "git.konjactw.dev/patyhank/minego/codec/slot"
|
import (
|
||||||
|
"git.konjactw.dev/patyhank/minego/pkg/protocol/slot"
|
||||||
|
)
|
||||||
|
|
||||||
//codec:gen
|
//codec:gen
|
||||||
type Weapon struct {
|
type Weapon struct {
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user