diff --git a/minecraft/protocol/packet/correct_player_move_prediction.go b/minecraft/protocol/packet/correct_player_move_prediction.go index 546dfdf8..d9344a7d 100644 --- a/minecraft/protocol/packet/correct_player_move_prediction.go +++ b/minecraft/protocol/packet/correct_player_move_prediction.go @@ -5,6 +5,11 @@ import ( "github.com/sandertv/gophertunnel/minecraft/protocol" ) +const ( + PredictionTypePlayer = iota + PredictionTypeVehicle +) + // CorrectPlayerMovePrediction is sent by the server if and only if StartGame.ServerAuthoritativeMovementMode // is set to AuthoritativeMovementModeServerWithRewind. The packet is used to correct movement at a specific // point in time. @@ -19,6 +24,8 @@ type CorrectPlayerMovePrediction struct { OnGround bool // Tick is the tick of the movement which was corrected by this packet. Tick uint64 + // PredictionType is the type of prediction that was corrected. It is one of the constants above. + PredictionType byte } // ID ... @@ -31,4 +38,5 @@ func (pk *CorrectPlayerMovePrediction) Marshal(io protocol.IO) { io.Vec3(&pk.Delta) io.Bool(&pk.OnGround) io.Varuint64(&pk.Tick) + io.Uint8(&pk.PredictionType) }