PHP Interface pocketmine\level\ChunkLoader

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.
Afficher le fichier Open project: ClearSkyTeam/ClearSky Interface Usage Examples

Méthodes publiques

Méthode Description
getLevel ( ) : Level
getLoaderId ( ) : integer Returns the ChunkLoader id.
getPosition ( ) : Position
getX ( ) : float
getZ ( ) : float
isLoaderActive ( ) : boolean Returns if the chunk loader is currently active
onBlockChanged ( Vector3 $block ) This method will be called when a block changes in a registered chunk
onChunkChanged ( pocketmine\level\format\FullChunk $chunk ) This method will be called when a Chunk is replaced by a new one
onChunkLoaded ( pocketmine\level\format\FullChunk $chunk ) This method will be called when a registered chunk is loaded
onChunkPopulated ( pocketmine\level\format\FullChunk $chunk ) This method will be called when a registered chunk is populated Usually it'll be sent with another call to onChunkChanged()
onChunkUnloaded ( pocketmine\level\format\FullChunk $chunk ) This method will be called when a registered chunk is unloaded

Method Details

getLevel() public méthode

public getLevel ( ) : Level
Résultat Level

getLoaderId() public méthode

Call Level::generateChunkLoaderId($this) to generate and save it
public getLoaderId ( ) : integer
Résultat integer

getPosition() public méthode

public getPosition ( ) : Position
Résultat Position

getX() public méthode

public getX ( ) : float
Résultat float

getZ() public méthode

public getZ ( ) : float
Résultat float

isLoaderActive() public méthode

Returns if the chunk loader is currently active
public isLoaderActive ( ) : boolean
Résultat boolean

onBlockChanged() public méthode

This method will be called when a block changes in a registered chunk
public onBlockChanged ( Vector3 $block )
$block pocketmine\math\Vector3

onChunkChanged() public méthode

This method will be called when a Chunk is replaced by a new one
public onChunkChanged ( pocketmine\level\format\FullChunk $chunk )
$chunk pocketmine\level\format\FullChunk

onChunkLoaded() public méthode

This method will be called when a registered chunk is loaded
public onChunkLoaded ( pocketmine\level\format\FullChunk $chunk )
$chunk pocketmine\level\format\FullChunk

onChunkPopulated() public méthode

This method will be called when a registered chunk is populated Usually it'll be sent with another call to onChunkChanged()
public onChunkPopulated ( pocketmine\level\format\FullChunk $chunk )
$chunk pocketmine\level\format\FullChunk

onChunkUnloaded() public méthode

This method will be called when a registered chunk is unloaded
public onChunkUnloaded ( pocketmine\level\format\FullChunk $chunk )
$chunk pocketmine\level\format\FullChunk