Fix Setting Packet
error in 1.17
This commit is contained in:
@ -86,6 +86,7 @@ func (p *Player) handleJoinGamePacket(packet pk.Packet) error {
|
|||||||
pk.Boolean(p.Settings.ChatColors),
|
pk.Boolean(p.Settings.ChatColors),
|
||||||
pk.UnsignedByte(p.Settings.DisplayedSkinParts),
|
pk.UnsignedByte(p.Settings.DisplayedSkinParts),
|
||||||
pk.VarInt(p.Settings.MainHand),
|
pk.VarInt(p.Settings.MainHand),
|
||||||
|
pk.Boolean(p.Settings.DisableTextFiltering),
|
||||||
))
|
))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return Error{err}
|
return Error{err}
|
||||||
|
@ -27,8 +27,9 @@ func (p *Player) handlePlayerPositionAndLook(packet pk.Packet) error {
|
|||||||
Yaw, Pitch pk.Float
|
Yaw, Pitch pk.Float
|
||||||
Flags pk.Byte
|
Flags pk.Byte
|
||||||
TeleportID pk.VarInt
|
TeleportID pk.VarInt
|
||||||
|
DismountVehicle pk.Boolean
|
||||||
)
|
)
|
||||||
if err := packet.Scan(&X, &Y, &Z, &Yaw, &Pitch, &Flags, &TeleportID); err != nil {
|
if err := packet.Scan(&X, &Y, &Z, &Yaw, &Pitch, &Flags, &TeleportID, &DismountVehicle); err != nil {
|
||||||
return Error{err}
|
return Error{err}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -9,6 +9,10 @@ type Settings struct {
|
|||||||
DisplayedSkinParts uint8 //皮肤显示
|
DisplayedSkinParts uint8 //皮肤显示
|
||||||
MainHand int //主手
|
MainHand int //主手
|
||||||
|
|
||||||
|
// Disables filtering of text on signs and written book titles.
|
||||||
|
// Currently always true in vanilla client (i.e. the filtering is disabled)
|
||||||
|
DisableTextFiltering bool
|
||||||
|
|
||||||
Brand string // The brand string presented to the server.
|
Brand string // The brand string presented to the server.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user