Back to 9Minecraft
Wiki 9Minecraft Wiki 9Minecraft
Icommon Api Wiki › Guides › Monitor World and Chunk Loading Events

Monitor World and Chunk Loading Events

Understanding World Events

The iCommon API Mod exposes events that trigger when worlds and chunks load. Mods built on this library can hook into ServerWorldInitEvent and WorldChunkInitEvent to run custom logic—like spawning structures, initializing data, or logging activity.

What These Events Do

ServerWorldInitEvent fires when a world first loads on the server. This is ideal for one-time setup tasks that affect the entire world.

WorldChunkInitEvent fires each time a chunk loads or is generated. Use this for chunk-specific operations like populating custom features or tracking chunk state.

For Mod Developers

If you're creating a mod using iCommon API, you can listen to these events to:

  • Generate custom structures when chunks load
  • Initialize world data on server start
  • Track which chunks have been processed
  • Apply world-specific rules or modifications

Consult your mod's documentation to see if it exposes configuration options tied to these events. Some mods let you enable/disable features that depend on chunk or world initialization.