Initialization orders

A mod has two initialization phases: Pre-initialization and initialization.

Registry is a special one that always happen between preinit and init.

Preinit is called when the Blocksworld environment isn't ready yet, no blocks exist yet, no script are registered, it's the start just after the mod being loaded.

Althought using the register function is recommended for registering stuff, pre_init can be used for most of them, like blocks, block items and models. However pre_init cannot be used for loading textures (due to internal reasons).

Init is more like a late init, it happens after everything else has been registered and is executed on the "Starting Blocksworld.." startup message.

Here is a table listing when something can be registered:

Last updated