use of net.minecraftforge.client.model.obj.OBJModel in project ImmersiveEngineering by BluSunrize.
the class IEOBJLoader method loadModel.
@Override
public IModel loadModel(ResourceLocation modelLocation) throws Exception {
ResourceLocation file = new ResourceLocation(modelLocation.getResourceDomain(), modelLocation.getResourcePath());
if (!cache.containsKey(file)) {
IModel model = OBJLoader.INSTANCE.loadModel(modelLocation);
if (model instanceof OBJModel) {
IEOBJModel ieobj = new IEOBJModel(((OBJModel) model).getMatLib(), file);
cache.put(modelLocation, ieobj);
}
}
IEOBJModel model = cache.get(file);
if (model == null)
return ModelLoaderRegistry.getMissingModel();
return model;
}
Aggregations