Open leMaik opened 8 years ago
This could be solved by using entity.setRemoveWhenFarAway(true)
, but that will hit performance.
Note: That doesn't hit performance as chunks are still unloaded. :blush:
This is not fixed. Citizens2 tracks the entities that were despawned and need to be respawned, that may be a possible solution.
When a chunk with a managed entity is unloaded, the entity can't be controlled anymore when the chunk is loaded again. Also, the reference for that entity is not removed, resulting in a memory leak.
Managed entities should not
tick()
anymore when they are unloaded and the reference should be dropped.