PMAnvil
        
        extends RegionWorldProvider
    
    
            
            in package
            
        
    
    
            
            Uses
                            LegacyAnvilChunkTrait                    
    
        
            This format is exactly the same as the PC Anvil format, with the only difference being that the stored data order is XZY instead of YZX for more performance loading and saving worlds.
Table of Contents
- $path : string
- $regions : array<string|int, RegionLoader>
- $worldData : WorldData
- __construct() : mixed
- calculateChunkCount() : int
- close() : void
- doGarbageCollection() : void
- getAllChunks() : Generator
- getPath() : string
- getRegionIndex() : void
- getWorldData() : WorldData
- Returns information about the world
- getWorldMaxY() : int
- getWorldMinY() : int
- isValid() : bool
- loadChunk() : ChunkData|null
- deserializeChunk() : ChunkData|null
- deserializeSubChunk() : SubChunk
- getCompoundList() : array<string|int, CompoundTag>
- getPcWorldFormatVersion() : int
- Returns the storage version as per Minecraft PC world formats.
- getRegion() : RegionLoader|null
- getRegionFileExtension() : string
- Returns the file extension used for regions in this region-based format.
- loadLevelData() : WorldData
- loadRegion() : RegionLoader
- pathToRegion() : string
- Returns the path to a specific region file based on its X/Z coordinates
- readFixedSizeByteArray() : string
- unloadRegion() : void
- createRegionIterator() : RegexIterator
Properties
$path
    protected
        string
    $path
    
    
    
    
$regions
    protected
        array<string|int, RegionLoader>
    $regions
     = []
    
    
    
$worldData
    protected
        WorldData
    $worldData
    
    
    
    
Methods
__construct()
    public
                    __construct(string $path) : mixed
        
        Parameters
- $path : string
Return values
mixed —calculateChunkCount()
    public
                    calculateChunkCount() : int
        
    
    
        Return values
int —close()
    public
                    close() : void
        
    
    
        Return values
void —doGarbageCollection()
    public
                    doGarbageCollection() : void
        
    
    
        Return values
void —getAllChunks()
    public
                    getAllChunks([bool $skipCorrupted = false ][, Logger|null $logger = null ]) : Generator
        
        Parameters
- $skipCorrupted : bool = false
- $logger : Logger|null = null
Return values
Generator —getPath()
    public
                    getPath() : string
        
    
    
        Return values
string —getRegionIndex()
    public
            static        getRegionIndex(int $chunkX, int $chunkZ, int &$regionX, int &$regionZ) : void
    
        Parameters
- $chunkX : int
- $chunkZ : int
- $regionX : int
- 
                    reference parameter 
- $regionZ : int
- 
                    reference parameter 
Return values
void —getWorldData()
Returns information about the world
    public
                    getWorldData() : WorldData
    
    
    
        Return values
WorldData —getWorldMaxY()
    public
                    getWorldMaxY() : int
        
    
    
        Return values
int —getWorldMinY()
    public
                    getWorldMinY() : int
        
    
    
        Return values
int —isValid()
    public
            static        isValid(string $path) : bool
        
        Parameters
- $path : string
Return values
bool —loadChunk()
    public
                    loadChunk(int $chunkX, int $chunkZ) : ChunkData|null
    
        Parameters
- $chunkX : int
- $chunkZ : int
Tags
Return values
ChunkData|null —deserializeChunk()
    protected
    abstract                deserializeChunk(string $data) : ChunkData|null
    
        Parameters
- $data : string
Tags
Return values
ChunkData|null —deserializeSubChunk()
    protected
                    deserializeSubChunk(CompoundTag $subChunk) : SubChunk
        
        Parameters
- $subChunk : CompoundTag
Return values
SubChunk —getCompoundList()
    protected
            static        getCompoundList(string $context, ListTag $list) : array<string|int, CompoundTag>
    
        Parameters
- $context : string
- $list : ListTag
Tags
Return values
array<string|int, CompoundTag> —getPcWorldFormatVersion()
Returns the storage version as per Minecraft PC world formats.
    protected
            static        getPcWorldFormatVersion() : int
    
    
    
        Return values
int —getRegion()
    protected
                    getRegion(int $regionX, int $regionZ) : RegionLoader|null
        
        Parameters
- $regionX : int
- $regionZ : int
Return values
RegionLoader|null —getRegionFileExtension()
Returns the file extension used for regions in this region-based format.
    protected
            static        getRegionFileExtension() : string
    
    
    
        Return values
string —loadLevelData()
    protected
    abstract                loadLevelData() : WorldData
    
    
    
    Tags
Return values
WorldData —loadRegion()
    protected
                    loadRegion(int $regionX, int $regionZ) : RegionLoader
        
        Parameters
- $regionX : int
- $regionZ : int
Return values
RegionLoader —pathToRegion()
Returns the path to a specific region file based on its X/Z coordinates
    protected
                    pathToRegion(int $regionX, int $regionZ) : string
    
        Parameters
- $regionX : int
- $regionZ : int
Return values
string —readFixedSizeByteArray()
    protected
            static        readFixedSizeByteArray(CompoundTag $chunk, string $tagName, int $length) : string
        
        Parameters
- $chunk : CompoundTag
- $tagName : string
- $length : int
Return values
string —unloadRegion()
    protected
                    unloadRegion(int $regionX, int $regionZ) : void
        
        Parameters
- $regionX : int
- $regionZ : int
Return values
void —createRegionIterator()
    private
                    createRegionIterator() : RegexIterator