I have an entity which I do not want to be unloaded, I have checked the EntitiesUnloadEvent however it seems as if that is not cancellable and you can't exclude certain entities from being unloaded, exact same for ChunkUnloadEvent, now WorldUnloadEvent can be cancelled but that' not what I want, should I just try to reload the entities once their chunk unloads?
#Stopping entity from unloading
1 messages · Page 1 of 1 (latest)
run task timer delay 1 on chunkunload ?
to reload chunk i mean
wouldn't that technically cause weird issues n memo leaks
Like keeping a world in memory forever because of that 1 entity
I'd rather recreate the entity like all other entities have always done
Well, I could use force-loaded chunks
I really want to know why you don't want this entity to be unloaded
It's part of what I like to call "an entity amalgamation", if said entity is unloaded I could either store the chunk and load it once I need to move the entire "amalgamation" or stop it's chunk from unloading
Basically it would cause desyncs if the entity is unloaded and anything tries to happen with the "amalgamation"
Then I would say just forceload the chunks around the "entity amalgamation"
And un-forceload them once it leaves. (don't forget to keep the previous foce loaded state so you accidentally un-forceload something else)