mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-12 00:39:45 +00:00
Fixed FloatingTextParticles
This commit is contained in:
parent
dbd36d66ae
commit
7dec912d15
@ -75,6 +75,10 @@ class Skin{
|
||||
$this->capeId = $capeId;
|
||||
}
|
||||
|
||||
public static function convertToLegacyName(string $name){
|
||||
return '{"geometry" : {"default" : "geometry.humanoid.custom"}}';
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @return bool
|
||||
|
@ -32,6 +32,7 @@ use pocketmine\network\mcpe\protocol\AddPlayerPacket;
|
||||
use pocketmine\network\mcpe\protocol\PlayerListPacket;
|
||||
use pocketmine\network\mcpe\protocol\RemoveActorPacket;
|
||||
use pocketmine\network\mcpe\protocol\types\PlayerListEntry;
|
||||
use pocketmine\utils\SerializedImage;
|
||||
use pocketmine\utils\UUID;
|
||||
use function str_repeat;
|
||||
|
||||
@ -96,7 +97,7 @@ class FloatingTextParticle extends Particle{
|
||||
|
||||
$add = new PlayerListPacket();
|
||||
$add->type = PlayerListPacket::TYPE_ADD;
|
||||
$add->entries = [PlayerListEntry::createAdditionEntry($uuid, $this->entityId, $name, new Skin("Standard_Custom", str_repeat("\x00", 8192)))];
|
||||
$add->entries = [PlayerListEntry::createAdditionEntry($uuid, $this->entityId, $name, new Skin("Standard_Custom", Skin::convertToLegacyName("geometry.humanoid.custom"), SerializedImage::fromLegacy(str_repeat("\x00", 8192))))];
|
||||
$p[] = $add;
|
||||
|
||||
$pk = new AddPlayerPacket();
|
||||
|
Loading…
x
Reference in New Issue
Block a user