From b41fef0276ad75ba3b1fabf0a678cd6411a9ca0c Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Mon, 15 May 2017 16:38:02 +0100 Subject: [PATCH] Fixed some field types --- .../mcpe/protocol/ClientboundMapItemDataPacket.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/pocketmine/network/mcpe/protocol/ClientboundMapItemDataPacket.php b/src/pocketmine/network/mcpe/protocol/ClientboundMapItemDataPacket.php index d1a94d9a8..316abb376 100644 --- a/src/pocketmine/network/mcpe/protocol/ClientboundMapItemDataPacket.php +++ b/src/pocketmine/network/mcpe/protocol/ClientboundMapItemDataPacket.php @@ -49,13 +49,13 @@ class ClientboundMapItemDataPacket extends DataPacket{ public $colors = []; public function decode(){ - $this->mapId = $this->getVarInt(); + $this->mapId = $this->getEntityUniqueId(); $this->type = $this->getUnsignedVarInt(); if(($this->type & 0x08) !== 0){ $count = $this->getUnsignedVarInt(); for($i = 0; $i < $count; ++$i){ - $this->eids[] = $this->getVarInt(); //entity unique ID, signed var-int + $this->eids[] = $this->getEntityUniqueId(); } } @@ -93,7 +93,7 @@ class ClientboundMapItemDataPacket extends DataPacket{ public function encode(){ $this->reset(); - $this->putVarInt($this->mapId); //entity unique ID, signed var-int + $this->putEntityUniqueId($this->mapId); $type = 0; if(($eidsCount = count($this->eids)) > 0){ @@ -111,7 +111,7 @@ class ClientboundMapItemDataPacket extends DataPacket{ if(($type & 0x08) !== 0){ //TODO: find out what these are for $this->putUnsignedVarInt($eidsCount); foreach($this->eids as $eid){ - $this->putVarInt($eid); + $this->putEntityUniqueId($eid); } }