Search in sources :

Example 1 with MimicBlock

use of logictechcorp.libraryex.block.MimicBlock in project NetherEx by LogicTechCorp.

the class MimicModelHandler method onModelBake.

@SubscribeEvent
public static void onModelBake(ModelBakeEvent event) {
    MimicBlock quartzOreBlock = (MimicBlock) NetherExBlocks.QUARTZ_ORE.get();
    if (quartzOreBlock != null) {
        ModelResourceLocation modelLocation = quartzOreBlock.getModelLocation();
        IBakedModel model = event.getModelRegistry().get(modelLocation);
        if (model != null) {
            event.getModelRegistry().put(modelLocation, new MimicBakedModel(model, quartzOreBlock.getMimicType()));
        }
    }
}
Also used : MimicBlock(logictechcorp.libraryex.block.MimicBlock) ModelResourceLocation(net.minecraft.client.renderer.model.ModelResourceLocation) IBakedModel(net.minecraft.client.renderer.model.IBakedModel) MimicBakedModel(logictechcorp.libraryex.client.render.model.MimicBakedModel) SubscribeEvent(net.minecraftforge.eventbus.api.SubscribeEvent)

Aggregations

MimicBlock (logictechcorp.libraryex.block.MimicBlock)1 MimicBakedModel (logictechcorp.libraryex.client.render.model.MimicBakedModel)1 IBakedModel (net.minecraft.client.renderer.model.IBakedModel)1 ModelResourceLocation (net.minecraft.client.renderer.model.ModelResourceLocation)1 SubscribeEvent (net.minecraftforge.eventbus.api.SubscribeEvent)1