Merge branch 'stable' into next-minor

This commit is contained in:
Dylan K. Taylor
2022-05-20 11:14:59 +01:00
7 changed files with 33 additions and 25 deletions

View File

@@ -173,8 +173,6 @@ final class EntityFactory{
$this->register(Human::class, function(World $world, CompoundTag $nbt) : Human{
return new Human(Helper::parseLocation($nbt, $world), Human::parseSkinNBT($nbt), $nbt);
}, ['Human']);
PaintingMotive::init();
}
/**

View File

@@ -24,6 +24,8 @@ declare(strict_types=1);
namespace pocketmine\entity\object;
class PaintingMotive{
private static bool $initialized = false;
/** @var PaintingMotive[] */
protected static $motives = [];
@@ -76,6 +78,9 @@ class PaintingMotive{
* @return PaintingMotive[]
*/
public static function getAll() : array{
if(!self::$initialized){
self::init();
}
return self::$motives;
}