mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-21 00:07:30 +00:00
Fixed FloatingTextParticle YET AGAIN
how many fucking ways can you break nametags Mojang???
This commit is contained in:
parent
2660448601
commit
3134fa2744
@ -91,19 +91,16 @@ class FloatingTextParticle extends Particle{
|
||||
if(!$this->invisible){
|
||||
$pk = new AddPlayerPacket();
|
||||
$pk->uuid = $uuid = UUID::fromRandom();
|
||||
$pk->username = "";
|
||||
$pk->username = $this->title . ($this->text !== "" ? "\n" . $this->text : "");
|
||||
$pk->entityRuntimeId = $this->entityId;
|
||||
$pk->position = $this->asVector3(); //TODO: check offset
|
||||
$pk->item = ItemFactory::get(Item::AIR, 0, 0);
|
||||
|
||||
$flags = (
|
||||
(1 << Entity::DATA_FLAG_CAN_SHOW_NAMETAG) |
|
||||
(1 << Entity::DATA_FLAG_ALWAYS_SHOW_NAMETAG) |
|
||||
(1 << Entity::DATA_FLAG_IMMOBILE)
|
||||
1 << Entity::DATA_FLAG_IMMOBILE
|
||||
);
|
||||
$pk->metadata = [
|
||||
Entity::DATA_FLAGS => [Entity::DATA_TYPE_LONG, $flags],
|
||||
Entity::DATA_NAMETAG => [Entity::DATA_TYPE_STRING, $this->title . ($this->text !== "" ? "\n" . $this->text : "")],
|
||||
Entity::DATA_SCALE => [Entity::DATA_TYPE_FLOAT, 0.01] //zero causes problems on debug builds
|
||||
];
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user