Documentation

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

Methods

__construct()

public __construct(string $path) : mixed
Parameters
$path : string
Return values
mixed

getAllChunks()

public getAllChunks([bool $skipCorrupted = false ][, Logger|null $logger = null ]) : Generator
Parameters
$skipCorrupted : bool = false
$logger : Logger|null = null
Return values
Generator

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

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

getPcWorldFormatVersion()

Returns the storage version as per Minecraft PC world formats.

protected static getPcWorldFormatVersion() : int
Return values
int

getRegionFileExtension()

Returns the file extension used for regions in this region-based format.

protected static getRegionFileExtension() : string
Return values
string

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
Return values
RegexIterator

Search results