diff --git a/config.toml b/config.toml index 75faa54..4c644df 100644 --- a/config.toml +++ b/config.toml @@ -1,4 +1,4 @@ [Connection] LocalAddress = "0.0.0.0:19132" - RemoteAddress = "play.venitymc.com:19132" \ No newline at end of file + RemoteAddress = "play.venitymc.com:19132" diff --git a/legacyver/legacypacket/client_movement_prediction_sync.go b/legacyver/legacypacket/client_movement_prediction_sync.go index bc81fdb..8dd311a 100644 --- a/legacyver/legacypacket/client_movement_prediction_sync.go +++ b/legacyver/legacypacket/client_movement_prediction_sync.go @@ -6,7 +6,10 @@ import ( "github.com/sandertv/gophertunnel/minecraft/protocol/packet" ) -const ClientMovementPredictionSyncBitsetSize = 123 +const ( + ClientMovementPredictionSyncBitsetSize786 = 123 + ClientMovementPredictionSyncBitsetSize898 = 124 +) // ClientMovementPredictionSync is sent by the client to the server periodically if the client has received // movement corrections from the server, containing information about client-predictions that are relevant @@ -45,11 +48,19 @@ func (*ClientMovementPredictionSync) ID() uint32 { } func (pk *ClientMovementPredictionSync) Marshal(io protocol.IO) { - if proto.IsProtoGTE(io, proto.ID786) { - io.Bitset(&pk.ActorFlags, ClientMovementPredictionSyncBitsetSize) + var bitsetSize int + if proto.IsProtoGTE(io, proto.ID898) { + bitsetSize = 127 + } else if proto.IsProtoGTE(io, proto.ID844) { + bitsetSize = 126 + } else if proto.IsProtoGTE(io, proto.ID818) { + bitsetSize = 125 + } else if proto.IsProtoGTE(io, proto.ID786) { + bitsetSize = 123 } else { - io.Bitset(&pk.ActorFlags, 120) + bitsetSize = 120 } + io.Bitset(&pk.ActorFlags, bitsetSize) io.Float32(&pk.BoundingBoxScale) io.Float32(&pk.BoundingBoxWidth) io.Float32(&pk.BoundingBoxHeight) diff --git a/legacyver/proto/command.go b/legacyver/proto/command.go index b730e05..995adc4 100644 --- a/legacyver/proto/command.go +++ b/legacyver/proto/command.go @@ -39,7 +39,7 @@ func (c *Command) Marshal(r protocol.IO) { if IsProtoGTE(r, ID898) { r.String(&c.PermissionLevel) } else { - permLevel := uint8(0) + permLevel := byte(0) r.Uint8(&permLevel) c.PermissionLevel = "any" }