Skip to content

Commit cac5a16

Browse files
Added property getters in packets (#265)
A few packets (mostly new) don't have getters for certain private properties
1 parent e226413 commit cac5a16

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

src/CameraInstructionPacket.php

+2
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ public function getFade() : ?CameraFadeInstruction{ return $this->fade; }
4949

5050
public function getTarget() : ?CameraTargetInstruction{ return $this->target; }
5151

52+
public function getRemoveTarget() : ?bool{ return $this->removeTarget; }
53+
5254
protected function decodePayload(PacketSerializer $in) : void{
5355
$this->set = $in->readOptional(fn() => CameraSetInstruction::read($in));
5456
$this->clear = $in->readOptional($in->getBool(...));

src/ChangeDimensionPacket.php

+2
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ public static function create(int $dimension, Vector3 $position, bool $respawn,
3737
return $result;
3838
}
3939

40+
public function getLoadingScreenId() : ?int{ return $this->loadingScreenId; }
41+
4042
protected function decodePayload(PacketSerializer $in) : void{
4143
$this->dimension = $in->getVarInt();
4244
$this->position = $in->getVector3();

src/UpdateClientInputLocksPacket.php

+4
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ public static function create(int $flags, Vector3 $position) : self{
3333
return $result;
3434
}
3535

36+
public function getFlags() : int{ return $this->flags; }
37+
38+
public function getPosition() : Vector3{ return $this->position; }
39+
3640
protected function decodePayload(PacketSerializer $in) : void{
3741
$this->flags = $in->getUnsignedVarInt();
3842
$this->position = $in->getVector3();

0 commit comments

Comments
 (0)