Skip to content

Commit

Permalink
packet/correct_player_move_prediction.go: Add missing PredictionType …
Browse files Browse the repository at this point in the history
…field
  • Loading branch information
TwistedAsylumMC committed Apr 18, 2024
1 parent 9d2874c commit 8b18f24
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions minecraft/protocol/packet/correct_player_move_prediction.go
Expand Up @@ -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.
Expand All @@ -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 ...
Expand All @@ -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)
}

0 comments on commit 8b18f24

Please sign in to comment.