pk.Ary and pk.Array using generic now

This commit is contained in:
Tnze
2022-03-20 01:17:25 +08:00
parent 7997a5faea
commit 4c2510565d
15 changed files with 95 additions and 155 deletions

View File

@ -162,12 +162,11 @@ var dimensionSNBT string
func joinGame(conn net.Conn) error {
return conn.WritePacket(pk.Marshal(JoinGame,
pk.Int(0), // EntityID
pk.Boolean(false), // Is hardcore
pk.UnsignedByte(1), // Gamemode
pk.Byte(1), // Previous Gamemode
pk.VarInt(1), // World Count
pk.Ary{Len: 1, Ary: []pk.Identifier{"world"}}, // World Names
pk.Int(0), // EntityID
pk.Boolean(false), // Is hardcore
pk.UnsignedByte(1), // Gamemode
pk.Byte(1), // Previous Gamemode
pk.Array([]pk.Identifier{"world"}), // World Names
pk.NBT(nbt.StringifiedMessage(dimensionCodecSNBT)), // Dimension codec
pk.NBT(nbt.StringifiedMessage(dimensionSNBT)), // Dimension
pk.Identifier("world"), // World Name