PocketMine-MP 5.21.2 git-a6534ecbbbcf369264567d27e5ed70f7f5be9816
|
Public Member Functions | |
calculateCacheSize () | |
getHitPercentage () | |
onBlockChanged (Vector3 $block) | |
onBlockChanged as onChunkUnloaded as | onChunkChanged (int $chunkX, int $chunkZ, Chunk $chunk) |
onChunkLoaded (int $chunkX, int $chunkZ, Chunk $chunk) | |
onChunkPopulated (int $chunkX, int $chunkZ, Chunk $chunk) | |
onChunkUnloaded (int $chunkX, int $chunkZ, Chunk $chunk) | |
request (int $chunkX, int $chunkZ) | |
Static Public Member Functions | |
static | getInstance (World $world, Compressor $compressor) |
static | pruneCaches () |
This class is used by the current MCPE protocol system to store cached chunk packets for fast resending.
Definition at line 41 of file ChunkCache.php.
pocketmine\network\mcpe\cache\ChunkCache::calculateCacheSize | ( | ) |
Returns the number of bytes occupied by the cache data in this cache. This does not include the size of any promises referenced by the cache.
Definition at line 196 of file ChunkCache.php.
pocketmine\network\mcpe\cache\ChunkCache::getHitPercentage | ( | ) |
Returns the percentage of requests to the cache which resulted in a cache hit.
Definition at line 209 of file ChunkCache.php.
|
static |
Fetches the ChunkCache instance for the given world. This lazily creates cache systems as needed.
Definition at line 48 of file ChunkCache.php.
pocketmine\network\mcpe\cache\ChunkCache::onBlockChanged | ( | Vector3 | $block | ) |
Implements pocketmine\world\ChunkListener.
Definition at line 178 of file ChunkCache.php.
onBlockChanged as onChunkUnloaded as pocketmine\network\mcpe\cache\ChunkCache::onChunkChanged | ( | int | $chunkX, |
int | $chunkZ, | ||
Chunk | $chunk ) |
Implements pocketmine\world\ChunkListener.
Definition at line 171 of file ChunkCache.php.
|
inherited |
This method will be called when a registered chunk is loaded
|
inherited |
This method will be called when a registered chunk is populated Usually it'll be sent with another call to onChunkChanged()
pocketmine\network\mcpe\cache\ChunkCache::onChunkUnloaded | ( | int | $chunkX, |
int | $chunkZ, | ||
Chunk | $chunk ) |
Implements pocketmine\world\ChunkListener.
Definition at line 187 of file ChunkCache.php.
|
static |
Definition at line 68 of file ChunkCache.php.
pocketmine\network\mcpe\cache\ChunkCache::request | ( | int | $chunkX, |
int | $chunkZ ) |
Requests asynchronous preparation of the chunk at the given coordinates.
Definition at line 97 of file ChunkCache.php.