Merge branch 'release/3.5'

This commit is contained in:
Dylan K. Taylor
2018-12-12 19:51:41 +00:00
26 changed files with 532 additions and 44 deletions

View File

@ -28,9 +28,9 @@ use pocketmine\event\block\BlockFormEvent;
use pocketmine\event\block\BlockSpreadEvent;
use pocketmine\item\Item;
use pocketmine\level\Level;
use pocketmine\level\sound\FizzSound;
use pocketmine\math\AxisAlignedBB;
use pocketmine\math\Vector3;
use pocketmine\network\mcpe\protocol\LevelSoundEventPacket;
abstract class Liquid extends Transparent{
/** @var int */
@ -476,7 +476,7 @@ abstract class Liquid extends Transparent{
$ev->call();
if(!$ev->isCancelled()){
$this->level->setBlock($this, $ev->getNewState());
$this->level->broadcastLevelSoundEvent($this->add(0.5, 0.5, 0.5), LevelSoundEventPacket::SOUND_FIZZ, (int) ((2.6 + (lcg_value() - lcg_value()) * 0.8) * 1000));
$this->level->addSound(new FizzSound($this->add(0.5, 0.5, 0.5), 2.6 + (lcg_value() - lcg_value()) * 0.8));
}
return true;
}