You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I only wish to add a component to a chunk if it is a WorldChunk, however the register method requires me to always return a component to be attached, even if it is a ReadOnly chunk. The issue arises when I need to grab information from a chunk on registration, but the ReadOnlyChunk's wrapped chunk is not init-ed yet.
Register a chunk component and in the registering process try to cache the ChunkPos of the chunk.
The game should crash with "Cannot invoke getPos in ReadOnlyChunk because this.wrapped is null!"
The text was updated successfully, but these errors were encountered:
A workaround is to have a dummy implementation for your chunk component that you attach to anything that is not a WorldChunk. But this seems to be a fairly common problem, so a proper solution seems in order.
I only wish to add a component to a chunk if it is a WorldChunk, however the register method requires me to always return a component to be attached, even if it is a ReadOnly chunk. The issue arises when I need to grab information from a chunk on registration, but the ReadOnlyChunk's wrapped chunk is not init-ed yet.
The text was updated successfully, but these errors were encountered: