20 public function __construct(
21 private ServerAuthMovementMode $movementType,
22 private int $rewindHistorySize,
23 private bool $serverAuthoritativeBlockBreaking
26 public function getMovementType() : ServerAuthMovementMode{
return $this->movementType; }
28 public function getRewindHistorySize() :
int{
return $this->rewindHistorySize; }
30 public function isServerAuthoritativeBlockBreaking() :
bool{
return $this->serverAuthoritativeBlockBreaking; }
33 $movementType = ServerAuthMovementMode::fromPacket($in->
getVarInt());
35 $serverAuthBlockBreaking = $in->
getBool();
36 return new self($movementType, $rewindHistorySize, $serverAuthBlockBreaking);
40 $out->
putVarInt($this->movementType->value);
41 $out->
putVarInt($this->rewindHistorySize);
42 $out->putBool($this->serverAuthoritativeBlockBreaking);