mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-23 03:16:35 +00:00
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:
parent
3af18917f0
commit
5844b59b12
@ -64,7 +64,7 @@ class NpcDialoguePacket extends DataPacket/* implements ClientboundPacket*/{
|
|||||||
public function getActionJson() : string{ return $this->actionJson; }
|
public function getActionJson() : string{ return $this->actionJson; }
|
||||||
|
|
||||||
protected function decodePayload() : void{
|
protected function decodePayload() : void{
|
||||||
$this->npcActorUniqueId = $this->getEntityUniqueId();
|
$this->npcActorUniqueId = $this->getLLong(); //WHY NOT USING STANDARD METHODS, MOJANG
|
||||||
$this->actionType = $this->getVarInt();
|
$this->actionType = $this->getVarInt();
|
||||||
$this->dialogue = $this->getString();
|
$this->dialogue = $this->getString();
|
||||||
$this->sceneName = $this->getString();
|
$this->sceneName = $this->getString();
|
||||||
@ -73,7 +73,7 @@ class NpcDialoguePacket extends DataPacket/* implements ClientboundPacket*/{
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected function encodePayload() : void{
|
protected function encodePayload() : void{
|
||||||
$this->putEntityUniqueId($this->npcActorUniqueId);
|
$this->putLLong($this->npcActorUniqueId);
|
||||||
$this->putVarInt($this->actionType);
|
$this->putVarInt($this->actionType);
|
||||||
$this->putString($this->dialogue);
|
$this->putString($this->dialogue);
|
||||||
$this->putString($this->sceneName);
|
$this->putString($this->sceneName);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user