Wizards of Lua

The Art of Spell Crafting


PopulateChunkEvent

The PopulateChunkEvent is the base class of the PostPopulateChunkEvent.

Please note that instances of these events could occur asynchronously to the game loop. Hence, if you use an event interceptor to handle them, make sure that your code is thread safe.

The PopulateChunkEvent class is a subtype of the Event class and inherits all its properties and functions.

Here is an overview of the PopulateChunkEvent properties:

Property Type read / write
chunkX number (int) r
chunkZ number (int) r
world World r

Properties

Below you find short descriptions about each of the properties and some examples about how to use them in your spells.


chunkX : number (int)

This is the x-component of the chunk coordinate.


chunkZ : number (int)

This is the z-component of the chunk coordinate.


world : World

This is the world where this event did occur.