Skip to content

Commit

Permalink
Remove PlayerMovementType
Browse files Browse the repository at this point in the history
  • Loading branch information
dries-c committed Oct 24, 2024
1 parent 003c522 commit 9be131e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 26 deletions.
8 changes: 4 additions & 4 deletions src/types/PlayerMovementSettings.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,26 +18,26 @@

final class PlayerMovementSettings{
public function __construct(
private int $movementType,
private ServerAuthMovementMode $movementType,
private int $rewindHistorySize,
private bool $serverAuthoritativeBlockBreaking
){}

public function getMovementType() : int{ return $this->movementType; }
public function getMovementType() : ServerAuthMovementMode{ return $this->movementType; }

public function getRewindHistorySize() : int{ return $this->rewindHistorySize; }

public function isServerAuthoritativeBlockBreaking() : bool{ return $this->serverAuthoritativeBlockBreaking; }

public static function read(PacketSerializer $in) : self{
$movementType = $in->getVarInt();
$movementType = ServerAuthMovementMode::fromPacket($in->getVarInt());
$rewindHistorySize = $in->getVarInt();
$serverAuthBlockBreaking = $in->getBool();
return new self($movementType, $rewindHistorySize, $serverAuthBlockBreaking);
}

public function write(PacketSerializer $out) : void{
$out->putVarInt($this->movementType);
$out->putVarInt($this->movementType->value);
$out->putVarInt($this->rewindHistorySize);
$out->putBool($this->serverAuthoritativeBlockBreaking);
}
Expand Down
22 changes: 0 additions & 22 deletions src/types/PlayerMovementType.php

This file was deleted.

0 comments on commit 9be131e

Please sign in to comment.