mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-19 23:37:45 +00:00
Properly switch to string entity IDs
This commit is contained in:
@@ -23,11 +23,9 @@ declare(strict_types=1);
|
||||
|
||||
namespace pocketmine\world\sound;
|
||||
|
||||
use pocketmine\data\bedrock\LegacyEntityIdToStringIdMap;
|
||||
use pocketmine\entity\Entity;
|
||||
use pocketmine\math\Vector3;
|
||||
use pocketmine\network\mcpe\protocol\LevelSoundEventPacket;
|
||||
use pocketmine\player\Player;
|
||||
|
||||
/**
|
||||
* Played when an entity hits the ground after falling a short distance.
|
||||
@@ -46,7 +44,7 @@ class EntityShortFallSound implements Sound{
|
||||
LevelSoundEventPacket::SOUND_FALL_SMALL,
|
||||
$pos,
|
||||
-1,
|
||||
$this->entity instanceof Player ? "minecraft:player" : LegacyEntityIdToStringIdMap::getInstance()->legacyToString($this->entity::getNetworkTypeId()) //TODO: bad hack, stuff depends on players having a -1 network ID :(
|
||||
$this->entity::getNetworkTypeId()
|
||||
//TODO: does isBaby have any relevance here?
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user