Search in sources :

Example 1 with BakedChopperModel

use of se.gory_moon.horsepower.client.model.BakedChopperModel in project HorsePower by GoryMoon.

the class ModModelManager method replaceChoppingModel.

public static void replaceChoppingModel(ModelResourceLocation modelVariantLocation, ResourceLocation modelLocation, ModelBakeEvent event) {
    try {
        IModel model = ModelLoaderRegistry.getModel(modelLocation);
        IBakedModel standard = event.getModelRegistry().getObject(modelVariantLocation);
        if (standard != null) {
            IBakedModel finalModel = new BakedChopperModel(standard, model, DefaultVertexFormats.BLOCK);
            event.getModelRegistry().putObject(modelVariantLocation, finalModel);
        }
    } catch (Exception e) {
        e.printStackTrace();
    }
}
Also used : IModel(net.minecraftforge.client.model.IModel) IBakedModel(net.minecraft.client.renderer.block.model.IBakedModel) BakedChopperModel(se.gory_moon.horsepower.client.model.BakedChopperModel)

Aggregations

IBakedModel (net.minecraft.client.renderer.block.model.IBakedModel)1 IModel (net.minecraftforge.client.model.IModel)1 BakedChopperModel (se.gory_moon.horsepower.client.model.BakedChopperModel)1