Skip to content

RegionLoader ​

class · pocketmine\world\format\io\region\RegionLoader · source

Constants ​

COMPRESSION_GZIP ​

php
public const COMPRESSION_GZIP = 1

COMPRESSION_ZLIB ​

php
public const COMPRESSION_ZLIB = 2

FIRST_SECTOR ​

php
public const FIRST_SECTOR = 2

Properties ​

$filePointer protected ​

php
protected $filePointer

$garbageTable protected ​

php
protected \pocketmine\world\format\io\region\RegionGarbageMap $garbageTable

$lastUsed ​

php
public int $lastUsed

$locationTable protected ​

php
protected array $locationTable

$nextSector protected ​

php
protected int $nextSector

Methods ​

__destruct() ​

php
public function __destruct()

calculateChunkCount() ​

php
public function calculateChunkCount() : int

chunkExists() ​

php
public function chunkExists(int $x, int $z) : bool

close() ​

php
public function close() : void

Closes the file

createBlank() protected ​

php
protected function createBlank() : void

createNew() ​

php
public static function createNew(string $filePath) : self

generateSectorMap() ​

php
public function generateSectorMap(string $usedChar, string $freeChar) : string

getChunkCoords() protected ​

php
protected static function getChunkCoords(int $offset, ?int &$x, ?int &$z) : void

getChunkOffset() protected ​

php
protected static function getChunkOffset(int $x, int $z) : int

getFilePath() ​

php
public function getFilePath() : string

getProportionUnusedSpace() ​

php
public function getProportionUnusedSpace() : float

Returns a float between 0 and 1 indicating what fraction of the file is currently unused space.

isChunkGenerated() protected ​

php
protected function isChunkGenerated(int $index) : bool

loadExisting() ​

php
public static function loadExisting(string $filePath) : self

loadLocationTable() protected ​

php
protected function loadLocationTable() : void

readChunk() ​

php
public function readChunk(int $x, int $z) : ?string

removeChunk() ​

php
public function removeChunk(int $x, int $z) : void

writeChunk() ​

php
public function writeChunk(int $x, int $z, string $chunkData) : void

writeLocationIndex() protected ​

php
protected function writeLocationIndex(int $index) : void

VanillaMine is a fork of PocketMine-MP, maintained by Luxury Nodes. Not affiliated with the PMMP team or Mojang.