Cardinal Components API

Cardinal Components API

21M Downloads

Early chunk component initialization

Stuff-Stuffs opened this issue ยท 2 comments

commented

Chunk components are initialized in MixinChunk#L47, this happens before the chunk constructor has ran. This causes any field access of the chunk, such as getWorld() or getPos(), to return null.

commented

Do you actually need those methods in your component's constructor ? In most cases, you can have lazy initialization. Still, I will try to change that for 1.16.

commented

Not really that big of an issue, I just wrap them in Lazy. Still it does catch you off guard, if not fixed it should just be documented.