mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-20 15:41:33 +00:00
Convert EntityFactory to singleton
This commit is contained in:
@@ -257,7 +257,7 @@ class ItemFactory{
|
||||
$this->register(new SplashPotion(ItemIds::SPLASH_POTION, $type, "Splash Potion"));
|
||||
}
|
||||
|
||||
foreach(EntityFactory::getKnownTypes() as $className){
|
||||
foreach(EntityFactory::getInstance()->getKnownTypes() as $className){
|
||||
/** @var Living|string $className */
|
||||
if(is_a($className, Living::class, true) and $className::NETWORK_ID !== -1){
|
||||
$this->register(new SpawnEgg(ItemIds::SPAWN_EGG, $className::NETWORK_ID, "Spawn Egg", $className));
|
||||
|
||||
Reference in New Issue
Block a user