Fixed FloatingTextParticles

This commit is contained in:
Stephen 2019-11-06 23:22:41 -05:00
parent dbd36d66ae
commit 7dec912d15
2 changed files with 6 additions and 1 deletions

View File

@ -75,6 +75,10 @@ class Skin{
$this->capeId = $capeId;
}
public static function convertToLegacyName(string $name){
return '{"geometry" : {"default" : "geometry.humanoid.custom"}}';
}
/**
* @deprecated
* @return bool

View File

@ -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();