Search in sources :

Example 1 with ModelEntry

use of forestry.core.models.ModelEntry in project ForestryMC by ForestryMC.

the class ProxyGreenhouseClient method initializeModels.

@Override
public void initializeModels() {
    BlockRegistryGreenhouse blocks = ModuleGreenhouse.getBlocks();
    Preconditions.checkState(blocks != null);
    ModelManager modelManager = ModelManager.getInstance();
    Block greenhouseBlock = blocks.greenhouseBlock;
    if (greenhouseBlock != null) {
        ModelResourceLocation blockModelLocation = new ModelResourceLocation("forestry:greenhouse");
        ModelResourceLocation itemModelLocation = new ModelResourceLocation("forestry:greenhouse", "inventory");
        BlockModelEntry blockModelIndex = new BlockModelEntry(blockModelLocation, itemModelLocation, new ModelCamouflaged(BlockGreenhouse.class), greenhouseBlock);
        modelManager.registerCustomBlockModel(blockModelIndex);
    }
    Block climatiserBlock = blocks.climatiserBlock;
    if (climatiserBlock != null) {
        ModelResourceLocation blockModelLocation = new ModelResourceLocation("forestry:climatiser");
        ModelResourceLocation itemModelLocation = new ModelResourceLocation("forestry:climatiser", "inventory");
        BlockModelEntry blockModelIndex = new BlockModelEntry(blockModelLocation, itemModelLocation, new ModelCamouflaged(BlockClimatiser.class), climatiserBlock);
        modelManager.registerCustomBlockModel(blockModelIndex);
    }
    {
        ModelResourceLocation blockModelLocation = new ModelResourceLocation("forestry:greenhouse.window");
        ModelResourceLocation itemModelLocation = new ModelResourceLocation("forestry:greenhouse_window", "inventory");
        BlockModelEntry blockModelIndex = new BlockModelEntry(blockModelLocation, itemModelLocation, new ModelGreenhouseWindow(), ModuleGreenhouse.getBlocks().window);
        modelManager.registerCustomBlockModel(blockModelIndex);
    }
    {
        ModelResourceLocation blockModelLocation = new ModelResourceLocation("forestry:greenhouse.window_up");
        ModelResourceLocation itemModelLocation = new ModelResourceLocation("forestry:greenhouse_window_up", "inventory");
        BlockModelEntry blockModelIndex = new BlockModelEntry(blockModelLocation, itemModelLocation, new ModelGreenhouseWindow(), ModuleGreenhouse.getBlocks().roofWindow);
        modelManager.registerCustomBlockModel(blockModelIndex);
    }
    {
        ModelResourceLocation modelLocation = new ModelResourceLocation("forestry:camouflage_spray_can", "inventory");
        ModelEntry itemModelIndex = new ModelEntry(modelLocation, new ModelCamouflageSprayCan());
        modelManager.registerCustomModel(itemModelIndex);
    }
}
Also used : ModelEntry(forestry.core.models.ModelEntry) BlockModelEntry(forestry.core.models.BlockModelEntry) BlockModelEntry(forestry.core.models.BlockModelEntry) ModelCamouflaged(forestry.greenhouse.models.ModelCamouflaged) BlockClimatiser(forestry.greenhouse.blocks.BlockClimatiser) ModelCamouflageSprayCan(forestry.greenhouse.models.ModelCamouflageSprayCan) BlockGreenhouse(forestry.greenhouse.blocks.BlockGreenhouse) Block(net.minecraft.block.Block) IGreenhouseBlock(forestry.greenhouse.api.greenhouse.IGreenhouseBlock) BlockRegistryGreenhouse(forestry.greenhouse.blocks.BlockRegistryGreenhouse) ModelResourceLocation(net.minecraft.client.renderer.block.model.ModelResourceLocation) ModelManager(forestry.core.models.ModelManager) ModelGreenhouseWindow(forestry.greenhouse.models.ModelGreenhouseWindow)

Example 2 with ModelEntry

use of forestry.core.models.ModelEntry in project ForestryMC by ForestryMC.

the class ProxyLepidopterologyClient method preInitializeRendering.

@Override
public void preInitializeRendering() {
    RenderingRegistry.registerEntityRenderingHandler(EntityButterfly.class, new RenderButterflyEntity.Factory());
    ModelManager modelManager = ModelManager.getInstance();
    ModelResourceLocation butterflyGE = modelManager.getModelLocation("butterflyGE");
    ModelEntry modelEntry = new ModelEntry(butterflyGE, new ModelButterflyItem());
    modelManager.registerCustomModel(modelEntry);
}
Also used : ModelEntry(forestry.core.models.ModelEntry) ModelButterflyItem(forestry.lepidopterology.render.ModelButterflyItem) RenderButterflyEntity(forestry.lepidopterology.render.RenderButterflyEntity) ModelResourceLocation(net.minecraft.client.renderer.block.model.ModelResourceLocation) ModelManager(forestry.core.models.ModelManager)

Example 3 with ModelEntry

use of forestry.core.models.ModelEntry in project ForestryMC by ForestryMC.

the class ProxyStorageClient method registerCrateModel.

@Override
public void registerCrateModel() {
    ModelResourceLocation modelLocation = new ModelResourceLocation("forestry:crate-filled", "crate-filled");
    ModelEntry modelEntry = new ModelEntry(modelLocation, new ModelCrate());
    ModelManager.getInstance().registerCustomModel(modelEntry);
}
Also used : ModelEntry(forestry.core.models.ModelEntry) ModelCrate(forestry.storage.models.ModelCrate) ModelResourceLocation(net.minecraft.client.renderer.block.model.ModelResourceLocation)

Aggregations

ModelEntry (forestry.core.models.ModelEntry)3 ModelResourceLocation (net.minecraft.client.renderer.block.model.ModelResourceLocation)3 ModelManager (forestry.core.models.ModelManager)2 BlockModelEntry (forestry.core.models.BlockModelEntry)1 IGreenhouseBlock (forestry.greenhouse.api.greenhouse.IGreenhouseBlock)1 BlockClimatiser (forestry.greenhouse.blocks.BlockClimatiser)1 BlockGreenhouse (forestry.greenhouse.blocks.BlockGreenhouse)1 BlockRegistryGreenhouse (forestry.greenhouse.blocks.BlockRegistryGreenhouse)1 ModelCamouflageSprayCan (forestry.greenhouse.models.ModelCamouflageSprayCan)1 ModelCamouflaged (forestry.greenhouse.models.ModelCamouflaged)1 ModelGreenhouseWindow (forestry.greenhouse.models.ModelGreenhouseWindow)1 ModelButterflyItem (forestry.lepidopterology.render.ModelButterflyItem)1 RenderButterflyEntity (forestry.lepidopterology.render.RenderButterflyEntity)1 ModelCrate (forestry.storage.models.ModelCrate)1 Block (net.minecraft.block.Block)1