Skip to content

Commit

Permalink
fix: remove unnecessary second null check
Browse files Browse the repository at this point in the history
  • Loading branch information
TobiasGrether committed Aug 13, 2024
1 parent ff3bdfb commit 82e97ff
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/CorrectPlayerMovePredictionPacket.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,7 @@ public static function create(Vector3 $position, Vector3 $delta, bool $onGround,
$result->onGround = $onGround;
$result->tick = $tick;
$result->predictionType = $predictionType;

if($predictionType === self::PREDICTION_TYPE_VEHICLE && $vehicleRotation == null) {
throw new \InvalidArgumentException("CorrectPlayerMovePredictionPackets with type VEHICLE require a vehicleRotation to be provided");
}
$result->vehicleRotation = $vehicleRotation;

return $result;
}
Expand Down

0 comments on commit 82e97ff

Please sign in to comment.