PocketMine
|
Public Member Functions | |
getLoaderId () | |
isLoaderActive () | |
getPosition () | |
getX () | |
getZ () | |
getLevel () | |
onChunkChanged (FullChunk $chunk) | |
onChunkLoaded (FullChunk $chunk) | |
onChunkUnloaded (FullChunk $chunk) | |
onChunkPopulated (FullChunk $chunk) | |
onBlockChanged (Vector3 $block) | |
If you want to keep chunks loaded and receive notifications on a specific area, extend this class and register it into Level. This will also tick chunks.
Register Level->registerChunkLoader($this, $chunkX, $chunkZ) Unregister Level->unregisterChunkLoader($this, $chunkX, $chunkZ)
WARNING: When moving this object around in the world or destroying it, be sure to free the existing references from Level, otherwise you'll leak memory.
getLevel | ( | ) |
getLoaderId | ( | ) |
Returns the ChunkLoader id. Call Level::generateChunkLoaderId($this) to generate and save it
Implemented in Player.
getPosition | ( | ) |
getX | ( | ) |
getZ | ( | ) |
isLoaderActive | ( | ) |
onBlockChanged | ( | Vector3 | $block | ) |
This method will be called when a block changes in a registered chunk
Block | Vector3 | $block |
Implemented in Player.
onChunkChanged | ( | FullChunk | $chunk | ) |
This method will be called when a Chunk is replaced by a new one
FullChunk | $chunk |
Implemented in Player.
onChunkLoaded | ( | FullChunk | $chunk | ) |
This method will be called when a registered chunk is loaded
FullChunk | $chunk |
Implemented in Player.
onChunkPopulated | ( | FullChunk | $chunk | ) |
This method will be called when a registered chunk is populated Usually it'll be sent with another call to onChunkChanged()
FullChunk | $chunk |
Implemented in Player.
onChunkUnloaded | ( | FullChunk | $chunk | ) |
This method will be called when a registered chunk is unloaded
FullChunk | $chunk |
Implemented in Player.