Avoid implicit ItemFactory reliance for blocks with special items

this hasn't yet been addressed for signs, since they are a bit of a pain in the ass.
This commit is contained in:
Dylan K. Taylor
2022-06-30 20:00:41 +01:00
parent db2b523762
commit ba079bd9aa
15 changed files with 56 additions and 33 deletions

View File

@ -29,6 +29,7 @@ use pocketmine\event\block\StructureGrowEvent;
use pocketmine\item\Bamboo as ItemBamboo;
use pocketmine\item\Fertilizer;
use pocketmine\item\Item;
use pocketmine\item\VanillaItems;
use pocketmine\math\Vector3;
use pocketmine\player\Player;
use pocketmine\world\BlockTransaction;
@ -126,6 +127,6 @@ final class BambooSapling extends Flowable{
}
public function asItem() : Item{
return VanillaBlocks::BAMBOO()->asItem();
return VanillaItems::BAMBOO();
}
}