Search in sources :

Example 1 with BlockRegistryGreenhouse

use of forestry.greenhouse.blocks.BlockRegistryGreenhouse 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 BlockRegistryGreenhouse

use of forestry.greenhouse.blocks.BlockRegistryGreenhouse in project ForestryMC by ForestryMC.

the class ModuleGreenhouse method registerItemsAndBlocks.

@Override
public void registerItemsAndBlocks() {
    blocks = new BlockRegistryGreenhouse();
    items = new ItemRegistryGreenhouse();
}
Also used : ItemRegistryGreenhouse(forestry.greenhouse.items.ItemRegistryGreenhouse) BlockRegistryGreenhouse(forestry.greenhouse.blocks.BlockRegistryGreenhouse)

Example 3 with BlockRegistryGreenhouse

use of forestry.greenhouse.blocks.BlockRegistryGreenhouse in project ForestryMC by ForestryMC.

the class ModuleGreenhouse method registerRecipes.

@Override
public void registerRecipes() {
    ItemRegistryCore coreItems = ModuleCore.getItems();
    BlockRegistryGreenhouse blocks = getBlocks();
    ItemRegistryGreenhouse items = getItems();
    // / CAMOUFLAGE SPRAY CAN
    RecipeUtil.addRecipe("camouflage_spray_can", items.camouflageSprayCan, "TTT", "TCT", "TCT", 'T', OreDictUtil.INGOT_TIN, 'C', coreItems.craftingMaterial.getCamouflagedPaneling());
    ItemStack greenhousePlainBlock = new ItemStack(blocks.greenhouseBlock, 2, BlockGreenhouseType.PLAIN.ordinal());
    RecipeUtil.addRecipe("greenhouse_plain", greenhousePlainBlock.copy(), "#X#", "SIS", 'I', OreDictUtil.INGOT_IRON, 'S', OreDictUtil.SLAB_WOOD, 'X', GreenhouseController.createDefaultCamouflageBlock(), '#', coreItems.craftingMaterial.getCamouflagedPaneling());
    greenhousePlainBlock.setCount(1);
    RecipeUtil.addRecipe("greenhouse_control", new ItemStack(blocks.greenhouseBlock, 1, BlockGreenhouseType.CONTROL.ordinal()), " X ", "#T#", 'X', greenhousePlainBlock.copy(), '#', OreDictUtil.DUST_REDSTONE, 'T', coreItems.tubes.get(EnumElectronTube.GOLD, 1));
    RecipeUtil.addRecipe("greenhouse_gearbox", new ItemStack(blocks.greenhouseBlock, 1, BlockGreenhouseType.GEARBOX.ordinal()), " X ", "###", 'X', greenhousePlainBlock.copy(), '#', OreDictUtil.GEAR_TIN);
    RecipeUtil.addRecipe("greenhouse_hygro", new ItemStack(blocks.climatiserBlock, 1, BlockClimatiserType.HYGRO.ordinal()), "GIG", "GXG", "GIG", 'X', greenhousePlainBlock.copy(), 'I', OreDictUtil.INGOT_IRON, 'G', OreDictUtil.BLOCK_GLASS);
    RecipeUtil.addRecipe("greenhouse_heater", new ItemStack(blocks.climatiserBlock, 1, BlockClimatiserType.HEATER.ordinal()), "T#T", "#X#", "T#T", 'X', greenhousePlainBlock.copy(), '#', OreDictUtil.INGOT_TIN, 'T', coreItems.tubes.get(EnumElectronTube.GOLD, 1));
    RecipeUtil.addRecipe("greenhouse_fan", new ItemStack(blocks.climatiserBlock, 1, BlockClimatiserType.FAN.ordinal()), "T#T", "#X#", "T#T", 'X', greenhousePlainBlock.copy(), '#', OreDictUtil.INGOT_IRON, 'T', coreItems.tubes.get(EnumElectronTube.TIN, 1));
    RecipeUtil.addRecipe("greenhouse_dehumidifier", new ItemStack(blocks.climatiserBlock, 1, BlockClimatiserType.DEHUMIDIFIER.ordinal()), "T#T", "#X#", "T#T", 'X', greenhousePlainBlock.copy(), '#', OreDictUtil.INGOT_TIN, 'T', coreItems.tubes.get(EnumElectronTube.BLAZE, 1));
    RecipeUtil.addRecipe("greenhouse_humidifier", new ItemStack(blocks.climatiserBlock, 1, BlockClimatiserType.HUMIDIFIER.ordinal()), "T#T", "#X#", "T#T", 'X', greenhousePlainBlock.copy(), '#', OreDictUtil.INGOT_TIN, 'T', coreItems.tubes.get(EnumElectronTube.LAPIS, 1));
    for (String glassName : GreenhouseManager.helper.getWindowGlasses()) {
        ItemStack glassItem = GreenhouseManager.helper.getGlassItem(glassName);
        ItemStack window = blocks.window.getItem(glassName);
        ItemStack roodWindow = blocks.roofWindow.getItem(glassName);
        RecipeUtil.addRecipe("greenhouse_window_" + glassName, roodWindow, true, "SGS", "GGG", "GGG", 'G', glassItem, 'S', OreDictUtil.STICK_WOOD);
        RecipeUtil.addRecipe("greenhouse_window_roof_" + glassName, window, true, "SGG", "GGG", "SGG", 'G', glassItem, 'S', OreDictUtil.STICK_WOOD);
    }
    ICircuitLayout layout = ChipsetManager.circuitRegistry.getLayout("forestry.greenhouse.climatiser");
    ChipsetManager.solderManager.addRecipe(layout, coreItems.tubes.get(EnumElectronTube.GOLD, 1), Circuits.climatiserTemperature1);
    ChipsetManager.solderManager.addRecipe(layout, coreItems.tubes.get(EnumElectronTube.BLAZE, 1), Circuits.climatiserTemperature2);
    ChipsetManager.solderManager.addRecipe(layout, coreItems.tubes.get(EnumElectronTube.LAPIS, 1), Circuits.climatiserHumidity1);
    ChipsetManager.solderManager.addRecipe(layout, coreItems.tubes.get(EnumElectronTube.OBSIDIAN, 1), Circuits.climatiserHumidity2);
}
Also used : ItemRegistryGreenhouse(forestry.greenhouse.items.ItemRegistryGreenhouse) ICircuitLayout(forestry.api.circuits.ICircuitLayout) ItemRegistryCore(forestry.core.items.ItemRegistryCore) BlockRegistryGreenhouse(forestry.greenhouse.blocks.BlockRegistryGreenhouse) ItemStack(net.minecraft.item.ItemStack)

Aggregations

BlockRegistryGreenhouse (forestry.greenhouse.blocks.BlockRegistryGreenhouse)3 ItemRegistryGreenhouse (forestry.greenhouse.items.ItemRegistryGreenhouse)2 ICircuitLayout (forestry.api.circuits.ICircuitLayout)1 ItemRegistryCore (forestry.core.items.ItemRegistryCore)1 BlockModelEntry (forestry.core.models.BlockModelEntry)1 ModelEntry (forestry.core.models.ModelEntry)1 ModelManager (forestry.core.models.ModelManager)1 IGreenhouseBlock (forestry.greenhouse.api.greenhouse.IGreenhouseBlock)1 BlockClimatiser (forestry.greenhouse.blocks.BlockClimatiser)1 BlockGreenhouse (forestry.greenhouse.blocks.BlockGreenhouse)1 ModelCamouflageSprayCan (forestry.greenhouse.models.ModelCamouflageSprayCan)1 ModelCamouflaged (forestry.greenhouse.models.ModelCamouflaged)1 ModelGreenhouseWindow (forestry.greenhouse.models.ModelGreenhouseWindow)1 Block (net.minecraft.block.Block)1 ModelResourceLocation (net.minecraft.client.renderer.block.model.ModelResourceLocation)1 ItemStack (net.minecraft.item.ItemStack)1