Updated BedrockProtocol

This commit is contained in:
Dylan K. Taylor
2021-10-23 23:54:49 +01:00
parent 701a71a4ee
commit 04aedc6494
71 changed files with 175 additions and 104 deletions

View File

@ -28,6 +28,7 @@ use pocketmine\entity\Entity;
use pocketmine\math\Vector3;
use pocketmine\network\mcpe\convert\RuntimeBlockMapping;
use pocketmine\network\mcpe\protocol\LevelSoundEventPacket;
use pocketmine\network\mcpe\protocol\types\LevelSoundEvent;
/**
* Played when an entity hits the ground after falling a distance that doesn't cause damage, e.g. due to jumping.
@ -46,7 +47,7 @@ class EntityLandSound implements Sound{
public function encode(Vector3 $pos) : array{
return [LevelSoundEventPacket::create(
LevelSoundEventPacket::SOUND_LAND,
LevelSoundEvent::LAND,
$pos,
RuntimeBlockMapping::getInstance()->toRuntimeId($this->blockLandedOn->getFullId()),
$this->entity::getNetworkTypeId(),