mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-13 13:25:16 +00:00
Implemented nametags
This commit is contained in:
parent
198a0e69de
commit
eaa3006d51
@ -515,6 +515,21 @@ class Player{
|
|||||||
$this->inventory[$s] = array(0, 0, 0);
|
$this->inventory[$s] = array(0, 0, 0);
|
||||||
}
|
}
|
||||||
$this->entity->setPosition($this->entity->x, $this->entity->y, $this->entity->z, 0, 0);
|
$this->entity->setPosition($this->entity->x, $this->entity->y, $this->entity->z, 0, 0);
|
||||||
|
/*
|
||||||
|
0x01 world_inmutable
|
||||||
|
0x02 ?
|
||||||
|
0x04 ?
|
||||||
|
0x08 ?
|
||||||
|
0x10 ?
|
||||||
|
0x20 nametags_visible
|
||||||
|
0x40 ?
|
||||||
|
0x80 ?
|
||||||
|
*/
|
||||||
|
$flags = 0;
|
||||||
|
$flags |= 0x20; //Nametags
|
||||||
|
$this->dataPacket(MC_ADVENTURE_SETTINGS, array(
|
||||||
|
"flags" => $flags,
|
||||||
|
));
|
||||||
break;
|
break;
|
||||||
case 2://Chunk loaded?
|
case 2://Chunk loaded?
|
||||||
break;
|
break;
|
||||||
|
@ -637,14 +637,9 @@ class CustomPacketHandler{
|
|||||||
break;
|
break;
|
||||||
case MC_ADVENTURE_SETTINGS:
|
case MC_ADVENTURE_SETTINGS:
|
||||||
if($this->c === false){
|
if($this->c === false){
|
||||||
$this->data["x"] = Utils::readShort($this->get(2));
|
$this->data["flags"] = Utils::readInt($this->get(4));
|
||||||
$this->data["y"] = ord($this->get(1));
|
|
||||||
$this->data["z"] = Utils::readShort($this->get(2));
|
|
||||||
for($i = 0; $i < 4; ++$i){
|
|
||||||
$this->data["line$i"] = $this->get(Utils::readLShort($this->get(2), false));
|
|
||||||
}
|
|
||||||
}else{
|
}else{
|
||||||
$this->raw .= "\xff";
|
$this->raw .= Utils::writeInt($this->data["flags"]);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user