Awesome Thanks! I'm still trying to wrap my head around why using a WeakReference is necessary though.
So why I'm using a WeakReference variable in the entity rather than a StrongReference, such as,
private EntityLivingBase caster; Is because of possible memory leak. Does this mean that even if the entity is setDead() and in World::updateEntities() , I believe this is where the entity is removed if Entity::isDead, the entity is removed but may not be set up so it can be GC'd?
Another way to put this is, shouldn't any variables/references inside the entity, weak or strong, and the entity itself be set to be GC'd when it is removed?