mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-09 11:16:57 +00:00
Fixed paintings not working in newly generated worlds
Paintings would not work unless at least one entity was loaded from disk (or saved).
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user