Skip to content

Commit

Permalink
CameraTargetInstruction: Use little-endian long for ActorUniqueId (#271)
Browse files Browse the repository at this point in the history
thanks for the consistency mojang... :/
Co-authored-by: IvanCraft623 <[email protected]>
  • Loading branch information
nicholass003 authored Sep 18, 2024
1 parent 3a84e3e commit 440c807
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/types/camera/CameraTargetInstruction.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function getActorUniqueId() : int{ return $this->actorUniqueId; }

public static function read(PacketSerializer $in) : self{
$targetCenterOffset = $in->readOptional(fn() => $in->getVector3());
$actorUniqueId = $in->getActorUniqueId();
$actorUniqueId = $in->getLLong(); //why be consistent mojang ?????
return new self(
$targetCenterOffset,
$actorUniqueId
Expand All @@ -39,6 +39,6 @@ public static function read(PacketSerializer $in) : self{

public function write(PacketSerializer $out) : void{
$out->writeOptional($this->targetCenterOffset, fn(Vector3 $v) => $out->putVector3($v));
$out->putActorUniqueId($this->actorUniqueId);
$out->putLLong($this->actorUniqueId);
}
}

0 comments on commit 440c807

Please sign in to comment.