Fixed incorrect encoding of NpcDialoguePacket

this is in fact an ActorUniqueID, but for some reason written as a uint64 instead of a varint.
This commit is contained in:
Dylan K. Taylor 2021-07-23 12:53:30 +01:00
parent 3af18917f0
commit 5844b59b12
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D

View File

@ -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);