mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 10:22:56 +00:00
Centralize all conversion-related stuff under TypeConverter
instead of having singletons for everything, which are a nightmare to manage for multi version
This commit is contained in:
@ -26,7 +26,7 @@ namespace pocketmine\world\sound;
|
||||
use pocketmine\block\Block;
|
||||
use pocketmine\entity\Entity;
|
||||
use pocketmine\math\Vector3;
|
||||
use pocketmine\network\mcpe\convert\RuntimeBlockMapping;
|
||||
use pocketmine\network\mcpe\convert\TypeConverter;
|
||||
use pocketmine\network\mcpe\protocol\LevelSoundEventPacket;
|
||||
use pocketmine\network\mcpe\protocol\types\LevelSoundEvent;
|
||||
|
||||
@ -43,7 +43,7 @@ class EntityLandSound implements Sound{
|
||||
return [LevelSoundEventPacket::create(
|
||||
LevelSoundEvent::LAND,
|
||||
$pos,
|
||||
RuntimeBlockMapping::getInstance()->toRuntimeId($this->blockLandedOn->getStateId()),
|
||||
TypeConverter::getInstance()->getBlockTranslator()->toRuntimeId($this->blockLandedOn->getStateId()),
|
||||
$this->entity::getNetworkTypeId(),
|
||||
false, //TODO: does isBaby have any relevance here?
|
||||
false
|
||||
|
Reference in New Issue
Block a user