mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-13 17:29:44 +00:00
Fixed some field types
This commit is contained in:
parent
fe3b5bac51
commit
b41fef0276
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user