Skip to content

Commit 45d7a7a

Browse files
committed
Fixes
1 parent 6ad631f commit 45d7a7a

16 files changed

Lines changed: 84 additions & 491 deletions

src/InventoryTransactionPacket.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,8 @@ protected function encodePayload(ByteBufferWriter $out, int $protocolId) : void{
105105

106106
Byte::writeUnsigned($out, 1);
107107
}elseif($this->requestId !== 0){
108-
VarInt::writeUnsignedInt($out, count($this->requestChangedSlots));
109-
foreach($this->requestChangedSlots as $changedSlots){
108+
VarInt::writeUnsignedInt($out, count($this->requestChangedSlots ?? []));
109+
foreach(($this->requestChangedSlots ?? []) as $changedSlots){
110110
$changedSlots->write($out);
111111
}
112112
}

src/PlayerAuthInputPacket.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ protected function decodePayload(ByteBufferReader $in, int $protocolId) : void{
298298
$this->tick = VarInt::readUnsignedLong($in);
299299
$this->delta = CommonTypes::getVector3($in);
300300
if($this->inputFlags->get(PlayerAuthInputFlags::PERFORM_ITEM_INTERACTION)){
301-
$this->itemInteractionData = ItemInteractionData::read($in, $protocolId);
301+
$this->itemInteractionData = ItemInteractionData::read($in);
302302
}
303303
if($this->inputFlags->get(PlayerAuthInputFlags::PERFORM_ITEM_STACK_REQUEST)){
304304
$this->itemStackRequest = ItemStackRequest::read($in, $protocolId);
@@ -354,7 +354,7 @@ protected function encodePayload(ByteBufferWriter $out, int $protocolId) : void{
354354
VarInt::writeUnsignedLong($out, $this->tick);
355355
CommonTypes::putVector3($out, $this->delta);
356356
if($this->itemInteractionData !== null){
357-
$this->itemInteractionData->write($out, $protocolId);
357+
$this->itemInteractionData->write($out);
358358
}
359359
if($this->itemStackRequest !== null){
360360
$this->itemStackRequest->write($out, $protocolId);

src/types/PrimitiveShapeArrowPayload.php

Lines changed: 0 additions & 59 deletions
This file was deleted.

src/types/PrimitiveShapeCircleOrSpherePayload.php

Lines changed: 0 additions & 39 deletions
This file was deleted.

src/types/PrimitiveShapeConePayload.php

Lines changed: 0 additions & 54 deletions
This file was deleted.

src/types/PrimitiveShapeCylinderPayload.php

Lines changed: 0 additions & 59 deletions
This file was deleted.

src/types/PrimitiveShapeEllipsoidPayload.php

Lines changed: 0 additions & 48 deletions
This file was deleted.

src/types/PrimitiveShapeLinePayload.php

Lines changed: 0 additions & 40 deletions
This file was deleted.

src/types/PrimitiveShapePayload.php

Lines changed: 0 additions & 27 deletions
This file was deleted.

0 commit comments

Comments
 (0)