PocketMine-MP 5.23.3 git-f7687af337d001ddbcc47b8e773f014a33faa662
|
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 199 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 212 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 181 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 174 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 190 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 100 of file ChunkCache.php.