From 8b18f24c57f0b2e4c56bd08d4be0c736f83aefdb Mon Sep 17 00:00:00 2001 From: TwistedAsylumMC Date: Thu, 18 Apr 2024 16:14:21 +0100 Subject: [PATCH] packet/correct_player_move_prediction.go: Add missing PredictionType field --- .../protocol/packet/correct_player_move_prediction.go | 8 ++++++++ 1 file changed, 8 insertions(+) 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) }