use of forestry.core.models.ModelManager 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);
}
}
use of forestry.core.models.ModelManager 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);
}
Aggregations