GenisysPro  for Minecraft PE/Windows 10 v1.1.x
Feature-rich server software for Minecraft PE and Windows 10 Edition
ChunkLoader Interface Reference

Public Member Functions

 getLoaderId ()
 
 isLoaderActive ()
 
 getPosition ()
 
 getX ()
 
 getZ ()
 
 getLevel ()
 
 onChunkChanged (Chunk $chunk)
 
 onChunkLoaded (Chunk $chunk)
 
 onChunkUnloaded (Chunk $chunk)
 
 onChunkPopulated (Chunk $chunk)
 
 onBlockChanged (Vector3 $block)
 

Detailed Description

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.

Member Function Documentation

◆ getLevel()

getLevel ( )
Returns
Level

◆ getLoaderId()

getLoaderId ( )

Returns the ChunkLoader id. Call Level::generateChunkLoaderId($this) to generate and save it

Returns
int

Implemented in Player.

◆ getPosition()

getPosition ( )
Returns
Position

◆ getX()

getX ( )
Returns
float

◆ getZ()

getZ ( )
Returns
float

◆ isLoaderActive()

isLoaderActive ( )

Returns if the chunk loader is currently active

Returns
bool

Implemented in Player.

◆ onBlockChanged()

onBlockChanged ( Vector3  $block)

This method will be called when a block changes in a registered chunk

Parameters
Block | Vector3$block

Implemented in Player.

◆ onChunkChanged()

onChunkChanged ( Chunk  $chunk)

This method will be called when a Chunk is replaced by a new one

Parameters
Chunk$chunk

Implemented in Player.

◆ onChunkLoaded()

onChunkLoaded ( Chunk  $chunk)

This method will be called when a registered chunk is loaded

Parameters
Chunk$chunk

Implemented in Player.

◆ onChunkPopulated()

onChunkPopulated ( Chunk  $chunk)

This method will be called when a registered chunk is populated Usually it'll be sent with another call to onChunkChanged()

Parameters
Chunk$chunk

Implemented in Player.

◆ onChunkUnloaded()

onChunkUnloaded ( Chunk  $chunk)

This method will be called when a registered chunk is unloaded

Parameters
Chunk$chunk

Implemented in Player.


The documentation for this interface was generated from the following file: