Skip to content

Commit

Permalink
Merge remote-tracking branch 'dries/bedrock-1.21.40'
Browse files Browse the repository at this point in the history
  • Loading branch information
dries-c committed Oct 24, 2024
2 parents b03df4c + 9be131e commit b1ad8fa
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 26 deletions.
2 changes: 2 additions & 0 deletions src/PacketPool.php
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,8 @@ public function __construct(){
$this->registerPacket(new ServerboundDiagnosticsPacket());
$this->registerPacket(new CameraAimAssistPacket());
$this->registerPacket(new ContainerRegistryCleanupPacket());
$this->registerPacket(new MovementEffectPacket());
$this->registerPacket(new SetMovementAuthorityPacket());
}

public function registerPacket(Packet $packet) : void{
Expand Down
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 b1ad8fa

Please sign in to comment.