Convert ItemFactory to singleton

This commit is contained in:
Dylan K. Taylor
2020-04-24 00:18:31 +01:00
parent 13d784cd0c
commit 5a94af40e2
19 changed files with 546 additions and 546 deletions

View File

@ -130,7 +130,7 @@ class Leaves extends Transparent{
$drops = [];
if(mt_rand(1, 20) === 1){ //Saplings
$drops[] = ItemFactory::get(ItemIds::SAPLING, $this->treeType->getMagicNumber());
$drops[] = ItemFactory::getInstance()->get(ItemIds::SAPLING, $this->treeType->getMagicNumber());
}
if(($this->treeType->equals(TreeType::OAK()) or $this->treeType->equals(TreeType::DARK_OAK())) and mt_rand(1, 200) === 1){ //Apples
$drops[] = VanillaItems::APPLE();