Merge remote-tracking branch 'origin/stable' into minor-next

This commit is contained in:
Dylan K. Taylor
2023-06-04 16:10:07 +01:00
19 changed files with 63 additions and 43 deletions

View File

@ -49,8 +49,4 @@ final class SporeBlossom extends Flowable{
$this->position->getWorld()->useBreakOn($this->position);
}
}
public function getDropsForCompatibleTool(Item $item) : array{
return [];
}
}

View File

@ -27,6 +27,7 @@ use pocketmine\item\Item;
use pocketmine\item\Record;
use pocketmine\nbt\tag\CompoundTag;
use pocketmine\network\mcpe\convert\TypeConverter;
use pocketmine\world\sound\RecordStopSound;
class Jukebox extends Spawnable{
private const TAG_RECORD = "RecordItem"; //Item CompoundTag
@ -62,4 +63,8 @@ class Jukebox extends Spawnable{
$nbt->setTag(self::TAG_RECORD, TypeConverter::getInstance()->getItemTranslator()->toNetworkNbt($this->record));
}
}
protected function onBlockDestroyedHook() : void{
$this->position->getWorld()->addSound($this->position, new RecordStopSound());
}
}