Search in sources :

Example 6 with BlockBase

use of forestry.core.gadgets.BlockBase in project ForestryMC by ForestryMC.

the class PluginCore method preInit.

@Override
public void preInit() {
    super.preInit();
    rootCommand.addChildCommand(new CommandVersion());
    rootCommand.addChildCommand(new CommandPlugins());
    ForestryBlock.core.registerBlock(new BlockBase(Material.iron, true), ItemForestryBlock.class, "core");
    definitionEscritoire = ((BlockBase) ForestryBlock.core.block()).addDefinition(new MachineDefinition(Defaults.DEFINITION_ESCRITOIRE_META, "forestry.Escritoire", TileEscritoire.class, Proxies.render.getRenderEscritoire()));
    ForestryBlock.soil.registerBlock(new BlockSoil(), ItemTypedBlock.class, "soil");
    ForestryBlock.soil.block().setHarvestLevel("shovel", 0, 0);
    ForestryBlock.soil.block().setHarvestLevel("shovel", 0, 1);
    ForestryBlock.resources.registerBlock(new BlockResource(), ItemForestryBlock.class, "resources");
    ForestryBlock.resources.block().setHarvestLevel("pickaxe", 1);
    OreDictionary.registerOre("oreApatite", ForestryBlock.resources.getItemStack(1, 0));
    OreDictionary.registerOre("oreCopper", ForestryBlock.resources.getItemStack(1, 1));
    OreDictionary.registerOre("oreTin", ForestryBlock.resources.getItemStack(1, 2));
    ForestryBlock.resourceStorage.registerBlock(new BlockResourceStorageBlock(), ItemForestryBlock.class, "resourceStorage");
    ForestryBlock.resourceStorage.block().setHarvestLevel("pickaxe", 0);
    OreDictionary.registerOre("blockApatite", ForestryBlock.resourceStorage.getItemStack(1, 0));
    OreDictionary.registerOre("blockCopper", ForestryBlock.resourceStorage.getItemStack(1, 1));
    OreDictionary.registerOre("blockTin", ForestryBlock.resourceStorage.getItemStack(1, 2));
    OreDictionary.registerOre("blockBronze", ForestryBlock.resourceStorage.getItemStack(1, 3));
    ForestryBlock.glass.registerBlock(new BlockStainedGlass(), ItemForestryBlock.class, "stained");
}
Also used : CommandVersion(forestry.core.commands.CommandVersion) BlockStainedGlass(forestry.core.gadgets.BlockStainedGlass) BlockResource(forestry.core.gadgets.BlockResource) MachineDefinition(forestry.core.gadgets.MachineDefinition) BlockBase(forestry.core.gadgets.BlockBase) BlockResourceStorageBlock(forestry.core.gadgets.BlockResourceStorageBlock) CommandPlugins(forestry.core.commands.CommandPlugins) BlockSoil(forestry.core.gadgets.BlockSoil)

Example 7 with BlockBase

use of forestry.core.gadgets.BlockBase in project ForestryMC by ForestryMC.

the class PluginEnergy method preInit.

@Override
public void preInit() {
    super.preInit();
    ForestryBlock.engine.registerBlock(new BlockBase(Material.iron, true), ItemForestryBlock.class, "engine");
    definitionEngineCopper = ((BlockBase) ForestryBlock.engine.block()).addDefinition(new EngineDefinition(Defaults.DEFINITION_ENGINECOPPER_META, "forestry.EngineCopper", EngineCopper.class, PluginEnergy.proxy.getRenderDefaultEngine(Defaults.TEXTURE_PATH_BLOCKS + "/engine_copper_"), ShapedRecipeCustom.createShapedRecipe(ForestryBlock.engine.getItemStack(1, Defaults.DEFINITION_ENGINECOPPER_META), "###", " X ", "YVY", '#', "ingotCopper", 'X', "blockGlass", 'Y', "gearCopper", 'V', Blocks.piston)));
    definitionEngineBronze = ((BlockBase) ForestryBlock.engine.block()).addDefinition(new EngineDefinition(Defaults.DEFINITION_ENGINEBRONZE_META, "forestry.EngineBronze", EngineBronze.class, PluginEnergy.proxy.getRenderDefaultEngine(Defaults.TEXTURE_PATH_BLOCKS + "/engine_bronze_"), ShapedRecipeCustom.createShapedRecipe(ForestryBlock.engine.getItemStack(1, Defaults.DEFINITION_ENGINEBRONZE_META), "###", " X ", "YVY", '#', "ingotBronze", 'X', "blockGlass", 'Y', "gearBronze", 'V', Blocks.piston)));
    ShapedRecipeCustom clockworkRecipe = null;
    if (GameMode.getGameMode().getBooleanSetting("energy.engine.clockwork")) {
        clockworkRecipe = ShapedRecipeCustom.createShapedRecipe(ForestryBlock.engine.getItemStack(1, Defaults.DEFINITION_ENGINECLOCKWORK_META), "###", " X ", "ZVY", '#', "plankWood", 'X', "blockGlass", 'Y', Items.clock, 'Z', "gearCopper", 'V', Blocks.piston);
    }
    definitionEngineClockwork = ((BlockBase) ForestryBlock.engine.block()).addDefinition(new EngineDefinition(Defaults.DEFINITION_ENGINECLOCKWORK_META, "forestry.EngineClockwork", EngineClockwork.class, PluginEnergy.proxy.getRenderDefaultEngine(Defaults.TEXTURE_PATH_BLOCKS + "/engine_clock_"), clockworkRecipe));
}
Also used : BlockBase(forestry.core.gadgets.BlockBase) EngineDefinition(forestry.energy.gadgets.EngineDefinition) ShapedRecipeCustom(forestry.core.utils.ShapedRecipeCustom)

Example 8 with BlockBase

use of forestry.core.gadgets.BlockBase in project ForestryMC by ForestryMC.

the class PluginLepidopterology method preInit.

@Override
public void preInit() {
    ForestryBlock.lepidopterology.registerBlock(new BlockBase(Material.iron), ItemForestryBlock.class, "lepidopterology");
    ForestryBlock.lepidopterology.block().setCreativeTab(Tabs.tabLepidopterology);
    createAlleles();
}
Also used : BlockBase(forestry.core.gadgets.BlockBase)

Aggregations

BlockBase (forestry.core.gadgets.BlockBase)8 MachineDefinition (forestry.core.gadgets.MachineDefinition)6 ShapedRecipeCustom (forestry.core.utils.ShapedRecipeCustom)2 ITreeRoot (forestry.api.arboriculture.ITreeRoot)1 CommandBee (forestry.apiculture.commands.CommandBee)1 BlockAlveary (forestry.apiculture.gadgets.BlockAlveary)1 BlockBeehives (forestry.apiculture.gadgets.BlockBeehives)1 BlockCandle (forestry.apiculture.gadgets.BlockCandle)1 BlockStump (forestry.apiculture.gadgets.BlockStump)1 TileApiaristChest (forestry.apiculture.gadgets.TileApiaristChest)1 TileApiary (forestry.apiculture.gadgets.TileApiary)1 TileBeehouse (forestry.apiculture.gadgets.TileBeehouse)1 CommandTree (forestry.arboriculture.commands.CommandTree)1 BlockArbFence (forestry.arboriculture.gadgets.BlockArbFence)1 BlockArbStairs (forestry.arboriculture.gadgets.BlockArbStairs)1 BlockFireproofLog (forestry.arboriculture.gadgets.BlockFireproofLog)1 BlockFireproofPlanks (forestry.arboriculture.gadgets.BlockFireproofPlanks)1 BlockFruitPod (forestry.arboriculture.gadgets.BlockFruitPod)1 BlockLog (forestry.arboriculture.gadgets.BlockLog)1 BlockPlanks (forestry.arboriculture.gadgets.BlockPlanks)1