mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-11 16:29:40 +00:00
RuntimeBlockMapping: use SingletonTrait
This commit is contained in:
parent
3a42c21cc1
commit
a75241ef03
@ -30,6 +30,7 @@ use pocketmine\nbt\tag\CompoundTag;
|
||||
use pocketmine\nbt\tag\ListTag;
|
||||
use pocketmine\network\mcpe\protocol\types\CacheableNbt;
|
||||
use pocketmine\network\mcpe\serializer\NetworkNbtSerializer;
|
||||
use pocketmine\utils\SingletonTrait;
|
||||
use function file_get_contents;
|
||||
use function getmypid;
|
||||
use function mt_rand;
|
||||
@ -40,16 +41,7 @@ use function shuffle;
|
||||
* @internal
|
||||
*/
|
||||
final class RuntimeBlockMapping{
|
||||
/** @var self|null */
|
||||
private static $instance = null;
|
||||
|
||||
public static function getInstance() : self{
|
||||
if(self::$instance === null){
|
||||
self::$instance = new self;
|
||||
}
|
||||
|
||||
return self::$instance;
|
||||
}
|
||||
use SingletonTrait;
|
||||
|
||||
/** @var int[] */
|
||||
private $legacyToRuntimeMap = [];
|
||||
|
Loading…
x
Reference in New Issue
Block a user