use of net.minecraftforge.client.model.IModelState in project Galacticraft by micdoodle8.
the class ClientUtil method modelFromOBJ.
public static IBakedModel modelFromOBJ(ResourceLocation loc, List<String> visibleGroups, IModelState parentState) throws IOException {
IModel model = OBJLoaderGC.instance.loadModel(loc);
Function<ResourceLocation, TextureAtlasSprite> spriteFunction = location -> Minecraft.getMinecraft().getTextureMapBlocks().getAtlasSprite(location.toString());
return model.bake(new OBJModel.OBJState(visibleGroups, false, parentState), DefaultVertexFormats.ITEM, spriteFunction);
}
Aggregations