Instance init

- So that simi can have his cogs.
 - Inheritance is painful when models are acquired in an instance's ctor
This commit is contained in:
Jozufozu 2021-11-09 15:03:52 -08:00
parent fe62302d25
commit af98782a89
2 changed files with 8 additions and 0 deletions

View file

@ -29,6 +29,13 @@ public abstract class AbstractInstance implements IInstance, ILightUpdateListene
this.world = world;
}
/**
* Initialize models here.
*/
public void init() {
}
/**
* Free any acquired resources.
*/

View file

@ -286,6 +286,7 @@ public abstract class InstanceManager<T> implements MaterialManagerImpl.OriginSh
AbstractInstance renderer = createRaw(obj);
if (renderer != null) {
renderer.init();
renderer.updateLight();
LightUpdater.get(renderer.world)
.addListener(renderer);