Closed MDouglas345 closed 2 years ago
Fixed. Needs testing. The solution I went with was to create a new cardinal components array that stored all pinned entities, and referred to that when recalling and when the entity loaded / died, the array would reflect the current state of that entity.
I had to use this approach because MC's entity retrieval system is finicky at best.
Whoops forgot description; the chunk needs to be fully loaded(?) to spawn in the entities for that chunk, which is why an entities cannot be accessed in unloaded chunks.
Solution idea : Create an interface mixin for the ServerChunkManager class that returns a completablefuture object, which will get the chunk and trigger my own code after that deals with entities in that chunk.