diff --git a/src/block/RedMushroomBlock.php b/src/block/RedMushroomBlock.php index 17fced412..dfa50e265 100644 --- a/src/block/RedMushroomBlock.php +++ b/src/block/RedMushroomBlock.php @@ -32,11 +32,13 @@ class RedMushroomBlock extends Opaque{ protected MushroomBlockType $mushroomBlockType; public function __construct(BlockIdentifier $idInfo, string $name, BlockTypeInfo $typeInfo){ - $this->mushroomBlockType = MushroomBlockType::PORES(); + $this->mushroomBlockType = MushroomBlockType::ALL_CAP(); parent::__construct($idInfo, $name, $typeInfo); } - protected function describeState(RuntimeDataDescriber $w) : void{ + protected function describeType(RuntimeDataDescriber $w) : void{ + //these blocks always drop as all-cap, but may exist in other forms in the inventory (particularly creative), + //so this information needs to be kept in the type info $w->mushroomBlockType($this->mushroomBlockType); } @@ -57,4 +59,12 @@ class RedMushroomBlock extends Opaque{ public function isAffectedBySilkTouch() : bool{ return true; } + + public function getSilkTouchDrops(Item $item) : array{ + return [(clone $this)->setMushroomBlockType(MushroomBlockType::ALL_CAP())->asItem()]; + } + + public function getPickedItem(bool $addUserData = false) : Item{ + return (clone $this)->setMushroomBlockType(MushroomBlockType::ALL_CAP())->asItem(); + } }