From 5844b59b120c69465ae82f95d06d4395700a1ea3 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Fri, 23 Jul 2021 12:53:30 +0100 Subject: [PATCH] Fixed incorrect encoding of NpcDialoguePacket this is in fact an ActorUniqueID, but for some reason written as a uint64 instead of a varint. --- src/pocketmine/network/mcpe/protocol/NpcDialoguePacket.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pocketmine/network/mcpe/protocol/NpcDialoguePacket.php b/src/pocketmine/network/mcpe/protocol/NpcDialoguePacket.php index 7e2f88476..6aaa484f2 100644 --- a/src/pocketmine/network/mcpe/protocol/NpcDialoguePacket.php +++ b/src/pocketmine/network/mcpe/protocol/NpcDialoguePacket.php @@ -64,7 +64,7 @@ class NpcDialoguePacket extends DataPacket/* implements ClientboundPacket*/{ public function getActionJson() : string{ return $this->actionJson; } protected function decodePayload() : void{ - $this->npcActorUniqueId = $this->getEntityUniqueId(); + $this->npcActorUniqueId = $this->getLLong(); //WHY NOT USING STANDARD METHODS, MOJANG $this->actionType = $this->getVarInt(); $this->dialogue = $this->getString(); $this->sceneName = $this->getString(); @@ -73,7 +73,7 @@ class NpcDialoguePacket extends DataPacket/* implements ClientboundPacket*/{ } protected function encodePayload() : void{ - $this->putEntityUniqueId($this->npcActorUniqueId); + $this->putLLong($this->npcActorUniqueId); $this->putVarInt($this->actionType); $this->putString($this->dialogue); $this->putString($this->sceneName);