Fixed ender chest sounds, closes #2611

This commit is contained in:
Dylan K. Taylor
2018-12-26 22:33:51 +00:00
parent 98f903783c
commit 93dd05a03e
2 changed files with 21 additions and 2 deletions

View File

@@ -24,6 +24,7 @@ declare(strict_types=1);
namespace pocketmine\inventory;
use pocketmine\level\Position;
use pocketmine\network\mcpe\protocol\LevelSoundEventPacket;
use pocketmine\network\mcpe\protocol\types\WindowTypes;
use pocketmine\tile\EnderChest;
@@ -58,6 +59,14 @@ class EnderChestInventory extends ChestInventory{
$this->holder->setLevel($enderChest->getLevel());
}
protected function getOpenSound() : int{
return LevelSoundEventPacket::SOUND_ENDERCHEST_OPEN;
}
protected function getCloseSound() : int{
return LevelSoundEventPacket::SOUND_ENDERCHEST_CLOSED;
}
/**
* This override is here for documentation and code completion purposes only.
* @return Position