Move apiculture blocks to PluginApiculture.blocks

This commit is contained in:
mezz committed 2015-11-19 01:04:37 -08:00
1 parent 358522b2af
commit 18a0ae3643
31 files changed
+471 -386

No files matched your search

@@ -21,7 +21,6 @@ import java.util.Random;
import java.util.Set;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
@@ -55,7 +54,6 @@ import forestry.api.apiculture.FlowerManager;
import forestry.api.apiculture.IBeekeepingMode;
import forestry.api.apiculture.hives.HiveManager;
import forestry.api.core.ForestryAPI;
import forestry.api.core.Tabs;
import forestry.api.genetics.AlleleManager;
import forestry.api.genetics.IClassification;
import forestry.api.genetics.IClassification.EnumClassLevel;
@@ -69,9 +67,9 @@ import forestry.apiculture.GuiHandlerApiculture;
import forestry.apiculture.SaveEventHandlerApiculture;
import forestry.apiculture.VillageHandlerApiculture;
import forestry.apiculture.blocks.BlockAlveary;
import forestry.apiculture.blocks.BlockBeehives;
import forestry.apiculture.blocks.BlockApiculture;
import forestry.apiculture.blocks.BlockCandle;
import forestry.apiculture.blocks.BlockStump;
import forestry.apiculture.blocks.BlockRegistryApiculture;
import forestry.apiculture.commands.CommandBee;
import forestry.apiculture.entities.EntityMinecartApiary;
import forestry.apiculture.entities.EntityMinecartBeehouse;
@@ -88,9 +86,7 @@ import forestry.apiculture.genetics.alleles.AlleleEffect;
import forestry.apiculture.items.EnumHoneyComb;
import forestry.apiculture.items.EnumPollenCluster;
import forestry.apiculture.items.EnumPropolis;
import forestry.apiculture.items.ItemBlockCandle;
import forestry.apiculture.items.ItemRegistryApiculture;
import forestry.apiculture.multiblock.TileAlveary;
import forestry.apiculture.multiblock.TileAlvearyFan;
import forestry.apiculture.multiblock.TileAlvearyHeater;
import forestry.apiculture.multiblock.TileAlvearyHygroregulator;
@@ -112,20 +108,16 @@ import forestry.apiculture.worldgen.HiveGenHelper;
import forestry.apiculture.worldgen.HiveRegistry;
import forestry.core.GuiHandlerBase;
import forestry.core.ISaveEventHandler;
import forestry.core.blocks.BlockBase;
import forestry.core.blocks.BlockCore;
import forestry.core.config.Config;
import forestry.core.config.Constants;
import forestry.core.config.ForestryBlock;
import forestry.core.config.LocalizedConfiguration;
import forestry.core.entities.EntityFXSnow;
import forestry.core.fluids.Fluids;
import forestry.core.items.EnumElectronTube;
import forestry.core.items.ItemBlockForestry;
import forestry.core.network.IPacketRegistry;
import forestry.core.proxy.Proxies;
import forestry.core.recipes.RecipeUtil;
import forestry.core.recipes.ShapedRecipeCustom;
import forestry.core.tiles.MachineDefinition;
import forestry.core.utils.EntityUtil;
import forestry.core.utils.Log;
@@ -145,6 +137,7 @@ public class PluginApiculture extends ForestryPlugin {
public static boolean fancyRenderedBees = false;
public static ItemRegistryApiculture items;
public static BlockRegistryApiculture blocks;
public static HiveRegistry hiveRegistry;
@@ -188,24 +181,7 @@ public class PluginApiculture extends ForestryPlugin {
@Override
protected void registerItemsAndBlocks() {
items = new ItemRegistryApiculture();
ForestryBlock.apiculture.registerBlock(new BlockBase(Material.iron), ItemBlockForestry.class, "apiculture");
ForestryBlock.apiculture.block().setCreativeTab(Tabs.tabApiculture);
ForestryBlock.apiculture.block().setHarvestLevel("axe", 0);
ForestryBlock.apicultureChest.registerBlock(new BlockBase(Material.iron, true), ItemBlockForestry.class, "apicultureChest");
ForestryBlock.apicultureChest.block().setCreativeTab(Tabs.tabApiculture);
ForestryBlock.apicultureChest.block().setHarvestLevel("axe", 0);
ForestryBlock.beehives.registerBlock(new BlockBeehives(), ItemBlockForestry.class, "beehives");
// Candles
ForestryBlock.candle.registerBlock(new BlockCandle(), ItemBlockCandle.class, "candle");
ForestryBlock.stump.registerBlock(new BlockStump(), ItemBlockForestry.class, "stump");
// Alveary and Components
ForestryBlock.alveary.registerBlock(new BlockAlveary(), ItemBlockForestry.class, "alveary");
ForestryBlock.alveary.block().setHarvestLevel("axe", 0);
blocks = new BlockRegistryApiculture();
}
@Override
@@ -214,37 +190,21 @@ public class PluginApiculture extends ForestryPlugin {
MinecraftForge.EVENT_BUS.register(this);
definitionApiary = ((BlockBase) ForestryBlock.apiculture.block()).addDefinition(new MachineDefinition(Constants.DEFINITION_APIARY_META, "forestry.Apiary", TileApiary.class,
ShapedRecipeCustom.createShapedRecipe(ForestryBlock.apiculture.getItemStack(1, Constants.DEFINITION_APIARY_META),
"XXX",
"#C#",
"###",
'X', "slabWood",
'#', "plankWood",
'C', PluginCore.items.impregnatedCasing))
.setFaces(0, 1, 2, 2, 4, 4, 0, 7));
definitionApiary = new MachineDefinition(BlockApiculture.Type.APIARY.ordinal(), "forestry.Apiary", TileApiary.class)
.setFaces(0, 1, 2, 2, 4, 4, 0, 7);
blocks.apiculture.addDefinition(definitionApiary);
definitionChestLegacy = ((BlockBase) ForestryBlock.apiculture.block()).addDefinition(new MachineDefinition(Constants.DEFINITION_APIARISTCHEST_LEGACY_META, "forestry.ApiaristChest", TileApiaristChest.class).setLegacy());
definitionChestLegacy = new MachineDefinition(BlockApiculture.Type.APIARIST_CHEST_LEGACY.ordinal(), "forestry.ApiaristChest", TileApiaristChest.class)
.setLegacy();
blocks.apiculture.addDefinition(definitionChestLegacy);
definitionChest = ((BlockBase) ForestryBlock.apicultureChest.block()).addDefinition(new MachineDefinition(Constants.DEFINITION_APIARISTCHEST_META, "forestry.ApiaristChestNew", TileApiaristChest.class, Proxies.render.getRenderChest("apiaristchest"),
ShapedRecipeCustom.createShapedRecipe(ForestryBlock.apicultureChest.getItemStack(1, Constants.DEFINITION_APIARISTCHEST_META),
" # ",
"XYX",
"XXX",
'#', "blockGlass",
'X', "beeComb",
'Y', "chestWood"))
.setBoundingBox(0.0625F, 0.0F, 0.0625F, 0.9375F, 0.875F, 0.9375F));
definitionBeehouse = new MachineDefinition(BlockApiculture.Type.BEEHOUSE.ordinal(), "forestry.Beehouse", TileBeehouse.class)
.setFaces(0, 1, 2, 2, 4, 4, 0, 7);
blocks.apiculture.addDefinition(definitionBeehouse);
definitionBeehouse = ((BlockBase) ForestryBlock.apiculture.block()).addDefinition(new MachineDefinition(Constants.DEFINITION_BEEHOUSE_META, "forestry.Beehouse", TileBeehouse.class,
ShapedRecipeCustom.createShapedRecipe(ForestryBlock.apiculture.getItemStack(1, Constants.DEFINITION_BEEHOUSE_META),
"XXX",
"#C#",
"###",
'X', "slabWood",
'#', "plankWood",
'C', "beeComb"))
.setFaces(0, 1, 2, 2, 4, 4, 0, 7));
definitionChest = new MachineDefinition(0, "forestry.ApiaristChestNew", TileApiaristChest.class, Proxies.render.getRenderChest("apiaristchest"))
.setBoundingBox(0.0625F, 0.0F, 0.0625F, 0.9375F, 0.875F, 0.9375F);
blocks.apicultureChest.addDefinition(definitionChest);
// Add triggers
if (PluginManager.Module.BUILDCRAFT_STATEMENTS.isEnabled()) {
@@ -365,6 +325,11 @@ public class PluginApiculture extends ForestryPlugin {
}
proxy.initializeRendering();
definitionApiary.register();
definitionBeehouse.register();
definitionChestLegacy.register();
definitionChest.register();
}
@Override
@@ -522,12 +487,12 @@ public class PluginApiculture extends ForestryPlugin {
RecipeUtil.addRecipe(items.minecartBeehouse.getBeeHouseMinecart(),
"B",
"C",
'B', ForestryBlock.apiculture.getItemStack(1, Constants.DEFINITION_BEEHOUSE_META),
'B', blocks.apiculture.get(BlockApiculture.Type.BEEHOUSE, 1),
'C', Items.minecart);
RecipeUtil.addRecipe(items.minecartBeehouse.getApiaryMinecart(),
"B",
"C",
'B', ForestryBlock.apiculture.getItemStack(1, Constants.DEFINITION_APIARY_META),
'B', blocks.apiculture.get(BlockApiculture.Type.APIARY, 1),
'C', Items.minecart);
// FOOD STUFF
@@ -578,57 +543,57 @@ public class PluginApiculture extends ForestryPlugin {
'#', PluginCore.items.beeswax);
// / ALVEARY
RecipeUtil.addRecipe(ForestryBlock.alveary.getItemStack(1, TileAlveary.PLAIN_META),
RecipeUtil.addRecipe(blocks.alveary.get(BlockAlveary.Type.PLAIN, 1),
"###",
"#X#",
"###",
'X', PluginCore.items.impregnatedCasing,
'#', PluginCore.items.craftingMaterial.getScentedPaneling());
// SWARMER
RecipeUtil.addRecipe(ForestryBlock.alveary.getItemStack(1, TileAlveary.SWARMER_META),
RecipeUtil.addRecipe(blocks.alveary.get(BlockAlveary.Type.SWARMER, 1),
"#G#",
" X ",
"#G#",
'#', PluginCore.items.tubes.get(EnumElectronTube.DIAMOND, 1),
'X', ForestryBlock.alveary,
'X', blocks.alveary,
'G', "ingotGold");
// FAN
RecipeUtil.addRecipe(ForestryBlock.alveary.getItemStack(1, TileAlveary.FAN_META),
RecipeUtil.addRecipe(blocks.alveary.get(BlockAlveary.Type.FAN, 1),
"I I",
" X ",
"I#I",
'#', PluginCore.items.tubes.get(EnumElectronTube.GOLD, 1),
'X', ForestryBlock.alveary,
'X', blocks.alveary,
'I', "ingotIron");
// HEATER
RecipeUtil.addRecipe(ForestryBlock.alveary.getItemStack(1, TileAlveary.HEATER_META),
RecipeUtil.addRecipe(blocks.alveary.get(BlockAlveary.Type.HEATER, 1),
"#I#",
" X ",
"YYY",
'#', PluginCore.items.tubes.get(EnumElectronTube.GOLD, 1),
'X', ForestryBlock.alveary,
'X', blocks.alveary,
'I', "ingotIron", 'Y', "stone");
// HYGROREGULATOR
RecipeUtil.addRecipe(ForestryBlock.alveary.getItemStack(1, TileAlveary.HYGRO_META),
RecipeUtil.addRecipe(blocks.alveary.get(BlockAlveary.Type.HYGRO, 1),
"GIG",
"GXG",
"GIG",
'X', ForestryBlock.alveary,
'X', blocks.alveary,
'I', "ingotIron",
'G', "blockGlass");
// STABILISER
RecipeUtil.addRecipe(ForestryBlock.alveary.getItemStack(1, TileAlveary.STABILIZER_META),
RecipeUtil.addRecipe(blocks.alveary.get(BlockAlveary.Type.STABILIZER, 1),
"G G",
"GXG",
"G G",
'X', ForestryBlock.alveary,
'X', blocks.alveary,
'G', "gemQuartz");
// SIEVE
RecipeUtil.addRecipe(ForestryBlock.alveary.getItemStack(1, TileAlveary.SIEVE_META),
RecipeUtil.addRecipe(blocks.alveary.get(BlockAlveary.Type.SIEVE, 1),
"III",
" X ",
"WWW",
'X', ForestryBlock.alveary,
'X', blocks.alveary,
'I', "ingotIron",
'W', PluginCore.items.craftingMaterial.getWovenSilk());
@@ -657,18 +622,18 @@ public class PluginApiculture extends ForestryPlugin {
'W', PluginCore.items.beeswax,
'P', items.pollenCluster.get(EnumPollenCluster.NORMAL, 1));
RecipeManagers.carpenterManager.addRecipe(30, Fluids.WATER.getFluid(600), null, ForestryBlock.candle.getItemStack(24),
RecipeManagers.carpenterManager.addRecipe(30, Fluids.WATER.getFluid(600), null, blocks.candle.getUnlitCandle(24),
" X ",
"###",
"###",
'#', PluginCore.items.beeswax,
'X', Items.string);
RecipeManagers.carpenterManager.addRecipe(10, Fluids.WATER.getFluid(200), null, ForestryBlock.candle.getItemStack(6),
RecipeManagers.carpenterManager.addRecipe(10, Fluids.WATER.getFluid(200), null, blocks.candle.getUnlitCandle(6),
"#X#",
'#', PluginCore.items.beeswax,
'X', PluginCore.items.craftingMaterial.getSilkWisp());
RecipeUtil.addShapelessRecipe(ForestryBlock.candle.getItemStack(), ForestryBlock.candle.getItemStack());
RecipeUtil.addShapelessRecipe(ForestryBlock.candle.getItemStack(1, 1), ForestryBlock.candle.getItemStack(1, 1));
RecipeUtil.addShapelessRecipe(blocks.candle.getUnlitCandle(1), blocks.candle.getUnlitCandle(1));
RecipeUtil.addShapelessRecipe(blocks.candle.getLitCandle(1), blocks.candle.getLitCandle(1));
// / CENTRIFUGE
// Honey combs
@@ -769,18 +734,37 @@ public class PluginApiculture extends ForestryPlugin {
}
// ANALYZER
PluginCore.definitionAnalyzer.recipes.add(ShapedRecipeCustom.createShapedRecipe(PluginCore.blocks.core.get(BlockCore.Type.ANALYZER, 1),
RecipeUtil.addRecipe(PluginCore.blocks.core.get(BlockCore.Type.ANALYZER, 1),
"XTX",
" Y ",
"X X",
'Y', PluginCore.items.sturdyCasing,
'T', items.beealyzer,
'X', "ingotBronze"));
'X', "ingotBronze");
definitionApiary.register();
definitionBeehouse.register();
definitionChestLegacy.register();
definitionChest.register();
RecipeUtil.addRecipe(blocks.apiculture.get(BlockApiculture.Type.APIARY, 1),
"XXX",
"#C#",
"###",
'X', "slabWood",
'#', "plankWood",
'C', PluginCore.items.impregnatedCasing);
RecipeUtil.addRecipe(new ItemStack(blocks.apicultureChest),
" # ",
"XYX",
"XXX",
'#', "blockGlass",
'X', "beeComb",
'Y', "chestWood");
RecipeUtil.addRecipe(blocks.apiculture.get(BlockApiculture.Type.BEEHOUSE, 1),
"XXX",
"#C#",
"###",
'X', "slabWood",
'#', "plankWood",
'C', "beeComb");
}
private static void registerBeehiveDrops() {
@@ -836,7 +820,7 @@ public class PluginApiculture extends ForestryPlugin {
ChestGenHooks.addItem(ChestGenHooks.DUNGEON_CHEST, new WeightedRandomChestContent(BeeDefinition.STEADFAST.getMemberStack(EnumBeeType.DRONE), 1, 1, rarity));
ItemStack stack = ForestryBlock.candle.getItemStack();
ItemStack stack = blocks.candle.getUnlitCandle(1);
NBTTagCompound tag = new NBTTagCompound();
tag.setInteger(BlockCandle.colourTagName, 0xffffff);
stack.setTagCompound(tag);
@@ -138,16 +138,10 @@ public class PluginArboriculture extends ForestryPlugin {
WoodItemAccess.registerStairs(blocks.stairsFireproof, woodType, true);
}
definitionChest = blocks.arboriculture.addDefinition(new MachineDefinition(BlockArboriculture.Type.ARBCHEST.ordinal(),
"forestry.ArbChest", TileArboristChest.class, Proxies.render.getRenderChest("arbchest"),
ShapedRecipeCustom.createShapedRecipe(blocks.arboriculture.get(BlockArboriculture.Type.ARBCHEST, 1),
" # ",
"XYX",
"XXX",
'#', "blockGlass",
'X', "treeSapling",
'Y', "chestWood"))
.setBoundingBox(0.0625F, 0.0F, 0.0625F, 0.9375F, 0.875F, 0.9375F));
definitionChest = new MachineDefinition(BlockArboriculture.Type.ARBCHEST.ordinal(),
"forestry.ArbChest", TileArboristChest.class, Proxies.render.getRenderChest("arbchest"))
.setBoundingBox(0.0625F, 0.0F, 0.0625F, 0.9375F, 0.875F, 0.9375F);
blocks.arboriculture.addDefinition(definitionChest);
// Init rendering
proxy.initializeRendering();
@@ -326,13 +320,21 @@ public class PluginArboriculture extends ForestryPlugin {
'#', "stickWood");
// ANALYZER
PluginCore.definitionAnalyzer.recipes.add(ShapedRecipeCustom.createShapedRecipe(PluginCore.blocks.core.get(BlockCore.Type.ANALYZER, 1),
RecipeUtil.addRecipe(PluginCore.blocks.core.get(BlockCore.Type.ANALYZER, 1),
"XTX",
" Y ",
"X X",
'Y', PluginCore.items.sturdyCasing,
'T', items.treealyzer,
'X', "ingotBronze"));
'X', "ingotBronze");
RecipeUtil.addRecipe(blocks.arboriculture.get(BlockArboriculture.Type.ARBCHEST, 1),
" # ",
"XYX",
"XXX",
'#', "blockGlass",
'X', "treeSapling",
'Y', "chestWood");
}
private static void createAlleles() {
@@ -22,7 +22,7 @@ import forestry.core.blocks.BlockBase;
import forestry.core.config.Constants;
import forestry.core.config.ForestryBlock;
import forestry.core.items.ItemBlockForestry;
import forestry.core.recipes.ShapedRecipeCustom;
import forestry.core.recipes.RecipeUtil;
import forestry.core.tiles.MachineDefinition;
import forestry.energy.GuiHandlerEnergy;
import forestry.energy.blocks.BlockEngine;
@@ -53,42 +53,11 @@ public class PluginEnergy extends ForestryPlugin {
super.preInit();
definitionEnginePeat = ((BlockBase) ForestryBlock.engine.block()).addDefinition(new EngineDefinition(Constants.DEFINITION_ENGINE_PEAT_META, "forestry.EngineCopper", TileEnginePeat.class,
PluginEnergy.proxy.getRenderDefaultEngine(Constants.TEXTURE_PATH_BLOCKS + "/engine_copper_"), ShapedRecipeCustom.createShapedRecipe(
ForestryBlock.engine.getItemStack(1, Constants.DEFINITION_ENGINE_PEAT_META),
"###",
" X ",
"YVY",
'#', "ingotCopper",
'X', "blockGlass",
'Y', "gearCopper",
'V', Blocks.piston)));
PluginEnergy.proxy.getRenderDefaultEngine(Constants.TEXTURE_PATH_BLOCKS + "/engine_copper_")));
definitionEngineBiogas = ((BlockBase) ForestryBlock.engine.block()).addDefinition(new EngineDefinition(Constants.DEFINITION_ENGINE_BIOGAS_META, "forestry.EngineBronze", TileEngineBiogas.class,
PluginEnergy.proxy.getRenderDefaultEngine(Constants.TEXTURE_PATH_BLOCKS + "/engine_bronze_"), ShapedRecipeCustom.createShapedRecipe(
ForestryBlock.engine.getItemStack(1, Constants.DEFINITION_ENGINE_BIOGAS_META),
"###",
" X ",
"YVY",
'#', "ingotBronze",
'X', "blockGlass",
'Y', "gearBronze",
'V', Blocks.piston)));
ShapedRecipeCustom clockworkRecipe = null;
if (ForestryAPI.activeMode.getBooleanSetting("energy.engine.clockwork")) {
clockworkRecipe = ShapedRecipeCustom.createShapedRecipe(
ForestryBlock.engine.getItemStack(1, Constants.DEFINITION_ENGINE_CLOCKWORK_META),
"###",
" X ",
"ZVY",
'#', "plankWood",
'X', "blockGlass",
'Y', Items.clock,
'Z', "gearCopper",
'V', Blocks.piston);
}
PluginEnergy.proxy.getRenderDefaultEngine(Constants.TEXTURE_PATH_BLOCKS + "/engine_bronze_")));
definitionEngineClockwork = ((BlockBase) ForestryBlock.engine.block()).addDefinition(new EngineDefinition(Constants.DEFINITION_ENGINE_CLOCKWORK_META, "forestry.EngineClockwork", TileEngineClockwork.class,
PluginEnergy.proxy.getRenderDefaultEngine(Constants.TEXTURE_PATH_BLOCKS + "/engine_clock_"), clockworkRecipe));
PluginEnergy.proxy.getRenderDefaultEngine(Constants.TEXTURE_PATH_BLOCKS + "/engine_clock_")));
}
@Override
@@ -100,6 +69,41 @@ public class PluginEnergy extends ForestryPlugin {
definitionEngineClockwork.register();
}
@Override
protected void registerRecipes() {
super.registerRecipes();
RecipeUtil.addRecipe(ForestryBlock.engine.getItemStack(1, Constants.DEFINITION_ENGINE_PEAT_META),
"###",
" X ",
"YVY",
'#', "ingotCopper",
'X', "blockGlass",
'Y', "gearCopper",
'V', Blocks.piston);
RecipeUtil.addRecipe(ForestryBlock.engine.getItemStack(1, Constants.DEFINITION_ENGINE_BIOGAS_META),
"###",
" X ",
"YVY",
'#', "ingotBronze",
'X', "blockGlass",
'Y', "gearBronze",
'V', Blocks.piston);
if (ForestryAPI.activeMode.getBooleanSetting("energy.engine.clockwork")) {
RecipeUtil.addRecipe(ForestryBlock.engine.getItemStack(1, Constants.DEFINITION_ENGINE_CLOCKWORK_META),
"###",
" X ",
"ZVY",
'#', "plankWood",
'X', "blockGlass",
'Y', Items.clock,
'Z', "gearCopper",
'V', Blocks.piston);
}
}
@Override
public GuiHandlerBase getGuiHandler() {
return new GuiHandlerEnergy();
+100 -91
View File
@@ -52,7 +52,6 @@ import forestry.core.items.ItemRegistryCore;
import forestry.core.network.IPacketRegistry;
import forestry.core.proxy.Proxies;
import forestry.core.recipes.RecipeUtil;
import forestry.core.recipes.ShapedRecipeCustom;
import forestry.core.recipes.craftguide.CraftGuideIntegration;
import forestry.core.tiles.MachineDefinition;
import forestry.core.utils.Log;
@@ -212,117 +211,38 @@ public class PluginFactory extends ForestryPlugin {
BlockBase factoryTESR = ((BlockBase) ForestryBlock.factoryTESR.block());
definitionBottler = factoryTESR.addDefinition(new MachineDefinition(Constants.DEFINITION_BOTTLER_META, "forestry.Bottler", TileBottler.class,
Proxies.render.getRenderDefaultMachine(Constants.TEXTURE_PATH_BLOCKS + "/bottler_"), ShapedRecipeCustom.createShapedRecipe(
ForestryBlock.factoryTESR.getItemStack(1, Constants.DEFINITION_BOTTLER_META),
"X#X",
"#Y#",
"X#X",
'#', "blockGlass",
'X', PluginFluids.items.canEmpty,
'Y', coreItems.sturdyCasing)));
Proxies.render.getRenderDefaultMachine(Constants.TEXTURE_PATH_BLOCKS + "/bottler_")));
definitionCarpenter = factoryTESR.addDefinition(new MachineDefinition(Constants.DEFINITION_CARPENTER_META, "forestry.Carpenter", TileCarpenter.class,
Proxies.render.getRenderDefaultMachine(Constants.TEXTURE_PATH_BLOCKS + "/carpenter_"), ShapedRecipeCustom.createShapedRecipe(
ForestryBlock.factoryTESR.getItemStack(1, Constants.DEFINITION_CARPENTER_META),
"X#X",
"XYX",
"X#X",
'#', "blockGlass",
'X', "ingotBronze",
'Y', coreItems.sturdyCasing)));
Proxies.render.getRenderDefaultMachine(Constants.TEXTURE_PATH_BLOCKS + "/carpenter_")));
definitionCentrifuge = factoryTESR.addDefinition(new MachineDefinition(Constants.DEFINITION_CENTRIFUGE_META, "forestry.Centrifuge", TileCentrifuge.class,
Proxies.render.getRenderDefaultMachine(Constants.TEXTURE_PATH_BLOCKS + "/centrifuge_"), ShapedRecipeCustom.createShapedRecipe(
ForestryBlock.factoryTESR.getItemStack(1, Constants.DEFINITION_CENTRIFUGE_META),
"X#X",
"XYX",
"X#X",
'#', "blockGlass",
'X', "ingotCopper",
'Y', coreItems.sturdyCasing)));
Proxies.render.getRenderDefaultMachine(Constants.TEXTURE_PATH_BLOCKS + "/centrifuge_")));
definitionFermenter = factoryTESR.addDefinition(new MachineDefinition(Constants.DEFINITION_FERMENTER_META, "forestry.Fermenter", TileFermenter.class,
Proxies.render.getRenderDefaultMachine(Constants.TEXTURE_PATH_BLOCKS + "/fermenter_"), ShapedRecipeCustom.createShapedRecipe(
ForestryBlock.factoryTESR.getItemStack(1, Constants.DEFINITION_FERMENTER_META),
"X#X",
"#Y#",
"X#X",
'#', "blockGlass",
'X', "gearBronze",
'Y', coreItems.sturdyCasing)));
Proxies.render.getRenderDefaultMachine(Constants.TEXTURE_PATH_BLOCKS + "/fermenter_")));
definitionMoistener = factoryTESR.addDefinition(new MachineDefinition(Constants.DEFINITION_MOISTENER_META, "forestry.Moistener", TileMoistener.class,
Proxies.render.getRenderDefaultMachine(Constants.TEXTURE_PATH_BLOCKS + "/moistener_"), ShapedRecipeCustom.createShapedRecipe(
ForestryBlock.factoryTESR.getItemStack(1, Constants.DEFINITION_MOISTENER_META),
"X#X",
"#Y#",
"X#X",
'#', "blockGlass",
'X', "gearCopper",
'Y', coreItems.sturdyCasing)));
Proxies.render.getRenderDefaultMachine(Constants.TEXTURE_PATH_BLOCKS + "/moistener_")));
definitionSqueezer = factoryTESR.addDefinition(new MachineDefinition(Constants.DEFINITION_SQUEEZER_META, "forestry.Squeezer", TileSqueezer.class,
Proxies.render.getRenderDefaultMachine(Constants.TEXTURE_PATH_BLOCKS + "/squeezer_"), ShapedRecipeCustom.createShapedRecipe(
ForestryBlock.factoryTESR.getItemStack(1, Constants.DEFINITION_SQUEEZER_META),
"X#X",
"XYX",
"X#X",
'#', "blockGlass",
'X', "ingotTin",
'Y', coreItems.sturdyCasing)));
Proxies.render.getRenderDefaultMachine(Constants.TEXTURE_PATH_BLOCKS + "/squeezer_")));
definitionStill = factoryTESR.addDefinition(new MachineDefinition(Constants.DEFINITION_STILL_META, "forestry.Still", TileStill.class,
Proxies.render.getRenderDefaultMachine(Constants.TEXTURE_PATH_BLOCKS + "/still_"), ShapedRecipeCustom.createShapedRecipe(
ForestryBlock.factoryTESR.getItemStack(1, Constants.DEFINITION_STILL_META),
"X#X",
"#Y#",
"X#X",
'#', "blockGlass",
'X', "dustRedstone",
'Y', coreItems.sturdyCasing)));
Proxies.render.getRenderDefaultMachine(Constants.TEXTURE_PATH_BLOCKS + "/still_")));
definitionRainmaker = factoryTESR.addDefinition(new MachineDefinition(Constants.DEFINITION_RAINMAKER_META, "forestry.Rainmaker", TileMillRainmaker.class,
Proxies.render.getRenderMill(Constants.TEXTURE_PATH_BLOCKS + "/rainmaker_"), ShapedRecipeCustom.createShapedRecipe(
ForestryBlock.factoryTESR.getItemStack(1, Constants.DEFINITION_RAINMAKER_META),
"X#X",
"#Y#",
"X#X",
'#', "blockGlass",
'X', "gearTin",
'Y', coreItems.hardenedCasing)));
Proxies.render.getRenderMill(Constants.TEXTURE_PATH_BLOCKS + "/rainmaker_")));
BlockBase factoryPlain = ((BlockBase) ForestryBlock.factoryPlain.block());
definitionFabricator = factoryPlain.addDefinition(new MachineDefinition(Constants.DEFINITION_FABRICATOR_META, "forestry.Fabricator", TileFabricator.class,
ShapedRecipeCustom.createShapedRecipe(
ForestryBlock.factoryPlain.getItemStack(1, Constants.DEFINITION_FABRICATOR_META),
"X#X",
"#Y#",
"XZX",
'#', "blockGlass",
'X', "ingotGold",
'Y', coreItems.sturdyCasing,
'Z', "chestWood"))
definitionFabricator = factoryPlain.addDefinition(new MachineDefinition(Constants.DEFINITION_FABRICATOR_META, "forestry.Fabricator", TileFabricator.class)
.setFaces(0, 1, 2, 3, 4, 4));
definitionRaintank = factoryPlain.addDefinition(new MachineDefinition(Constants.DEFINITION_RAINTANK_META, "forestry.Raintank", TileRaintank.class,
ShapedRecipeCustom.createShapedRecipe(ForestryBlock.factoryPlain.getItemStack(1, Constants.DEFINITION_RAINTANK_META),
"X#X",
"XYX",
"X#X",
'#', "blockGlass",
'X', "ingotIron",
'Y', coreItems.sturdyCasing))
definitionRaintank = factoryPlain.addDefinition(new MachineDefinition(Constants.DEFINITION_RAINTANK_META, "forestry.Raintank", TileRaintank.class)
.setFaces(0, 1, 0, 0, 0, 0));
definitionWorktable = factoryPlain.addDefinition(new MachineDefinition(Constants.DEFINITION_WORKTABLE_META, "forestry.Worktable", TileWorktable.class,
ShapedRecipeCustom.createShapedRecipe(ForestryBlock.factoryPlain.getItemStack(1, Constants.DEFINITION_WORKTABLE_META),
"B",
"W",
"C",
'B', Items.book,
'W', "craftingTableWood",
'C', "chestWood"))
definitionWorktable = factoryPlain.addDefinition(new MachineDefinition(Constants.DEFINITION_WORKTABLE_META, "forestry.Worktable", TileWorktable.class)
.setFaces(0, 1, 2, 3, 4, 4));
ICircuitLayout layoutMachineUpgrade = new CircuitLayout("machine.upgrade", CircuitSocketType.MACHINE);
@@ -578,6 +498,95 @@ public class PluginFactory extends ForestryPlugin {
ChipsetManager.solderManager.addRecipe(layout, PluginCore.items.tubes.get(EnumElectronTube.EMERALD, 1), Circuit.machineSpeedUpgrade1);
ChipsetManager.solderManager.addRecipe(layout, PluginCore.items.tubes.get(EnumElectronTube.BLAZE, 1), Circuit.machineSpeedUpgrade2);
ChipsetManager.solderManager.addRecipe(layout, PluginCore.items.tubes.get(EnumElectronTube.GOLD, 1), Circuit.machineEfficiencyUpgrade1);
RecipeUtil.addRecipe(ForestryBlock.factoryTESR.getItemStack(1, Constants.DEFINITION_BOTTLER_META),
"X#X",
"#Y#",
"X#X",
'#', "blockGlass",
'X', PluginFluids.items.canEmpty,
'Y', PluginCore.items.sturdyCasing);
RecipeUtil.addRecipe(ForestryBlock.factoryTESR.getItemStack(1, Constants.DEFINITION_CARPENTER_META),
"X#X",
"XYX",
"X#X",
'#', "blockGlass",
'X', "ingotBronze",
'Y', PluginCore.items.sturdyCasing);
RecipeUtil.addRecipe(ForestryBlock.factoryTESR.getItemStack(1, Constants.DEFINITION_CENTRIFUGE_META),
"X#X",
"XYX",
"X#X",
'#', "blockGlass",
'X', "ingotCopper",
'Y', PluginCore.items.sturdyCasing);
RecipeUtil.addRecipe(ForestryBlock.factoryTESR.getItemStack(1, Constants.DEFINITION_FERMENTER_META),
"X#X",
"#Y#",
"X#X",
'#', "blockGlass",
'X', "gearBronze",
'Y', PluginCore.items.sturdyCasing);
RecipeUtil.addRecipe(ForestryBlock.factoryTESR.getItemStack(1, Constants.DEFINITION_MOISTENER_META),
"X#X",
"#Y#",
"X#X",
'#', "blockGlass",
'X', "gearCopper",
'Y', PluginCore.items.sturdyCasing);
RecipeUtil.addRecipe(ForestryBlock.factoryTESR.getItemStack(1, Constants.DEFINITION_SQUEEZER_META),
"X#X",
"XYX",
"X#X",
'#', "blockGlass",
'X', "ingotTin",
'Y', PluginCore.items.sturdyCasing);
RecipeUtil.addRecipe(ForestryBlock.factoryTESR.getItemStack(1, Constants.DEFINITION_STILL_META),
"X#X",
"#Y#",
"X#X",
'#', "blockGlass",
'X', "dustRedstone",
'Y', PluginCore.items.sturdyCasing);
RecipeUtil.addRecipe(ForestryBlock.factoryTESR.getItemStack(1, Constants.DEFINITION_RAINMAKER_META),
"X#X",
"#Y#",
"X#X",
'#', "blockGlass",
'X', "gearTin",
'Y', PluginCore.items.hardenedCasing);
RecipeUtil.addRecipe(ForestryBlock.factoryPlain.getItemStack(1, Constants.DEFINITION_FABRICATOR_META),
"X#X",
"#Y#",
"XZX",
'#', "blockGlass",
'X', "ingotGold",
'Y', PluginCore.items.sturdyCasing,
'Z', "chestWood");
RecipeUtil.addRecipe(ForestryBlock.factoryPlain.getItemStack(1, Constants.DEFINITION_RAINTANK_META),
"X#X",
"XYX",
"X#X",
'#', "blockGlass",
'X', "ingotIron",
'Y', PluginCore.items.sturdyCasing);
RecipeUtil.addRecipe(ForestryBlock.factoryPlain.getItemStack(1, Constants.DEFINITION_WORKTABLE_META),
"B",
"W",
"C",
'B', Items.book,
'W', "craftingTableWood",
'C', "chestWood");
}
@Override
@@ -36,7 +36,7 @@ import forestry.core.config.LocalizedConfiguration;
import forestry.core.fluids.Fluids;
import forestry.core.items.ItemBlockForestry;
import forestry.core.proxy.Proxies;
import forestry.core.recipes.ShapedRecipeCustom;
import forestry.core.recipes.RecipeUtil;
import forestry.core.tiles.MachineDefinition;
import forestry.core.utils.EntityUtil;
import forestry.lepidopterology.ButterflySpawner;
@@ -111,15 +111,7 @@ public class PluginLepidopterology extends ForestryPlugin {
ButterflyDefinition.initButterflies();
BlockBase lepidopterology = ((BlockBase) ForestryBlock.lepidopterology.block());
MachineDefinition definitionChest = lepidopterology.addDefinition(new MachineDefinition(Constants.DEFINITION_LEPICHEST_META, "forestry.LepiChest", TileLepidopteristChest.class, Proxies.render.getRenderChest("lepichest"),
ShapedRecipeCustom.createShapedRecipe(
ForestryBlock.lepidopterology.getItemStack(1, Constants.DEFINITION_LEPICHEST_META),
" # ",
"XYX",
"XXX",
'#', "blockGlass",
'X', new ItemStack(items.butterflyGE, 1, OreDictionary.WILDCARD_VALUE),
'Y', "chestWood"))
MachineDefinition definitionChest = lepidopterology.addDefinition(new MachineDefinition(Constants.DEFINITION_LEPICHEST_META, "forestry.LepiChest", TileLepidopteristChest.class, Proxies.render.getRenderChest("lepichest"))
.setBoundingBox(0.0625F, 0.0F, 0.0625F, 0.9375F, 0.875F, 0.9375F));
definitionChest.register();
@@ -146,6 +138,14 @@ public class PluginLepidopterology extends ForestryPlugin {
RecipeManagers.carpenterManager.addRecipe(100, Fluids.WATER.getFluid(2000), null, items.flutterlyzer.getItemStack(),
"X#X", "X#X", "RDR", '#', "paneGlass", 'X', "ingotBronze", 'R',
"dustRedstone", 'D', "gemDiamond");
RecipeUtil.addRecipe(ForestryBlock.lepidopterology.getItemStack(1, Constants.DEFINITION_LEPICHEST_META),
" # ",
"XYX",
"XXX",
'#', "blockGlass",
'X', new ItemStack(items.butterflyGE, 1, OreDictionary.WILDCARD_VALUE),
'Y', "chestWood");
}
@Override
+27 -21
View File
@@ -34,7 +34,6 @@ import forestry.core.items.EnumElectronTube;
import forestry.core.items.ItemBlockForestry;
import forestry.core.network.IPacketRegistry;
import forestry.core.recipes.RecipeUtil;
import forestry.core.recipes.ShapedRecipeCustom;
import forestry.core.tiles.MachineDefinition;
import forestry.mail.GuiHandlerMail;
import forestry.mail.PostRegistry;
@@ -85,30 +84,19 @@ public class PluginMail extends ForestryPlugin {
FMLCommonHandler.instance().bus().register(new TickHandlerMailClient());
}
ShapedRecipeCustom recipe = ShapedRecipeCustom.createShapedRecipe(ForestryBlock.mail.getItemStack(1, Constants.DEFINITION_MAILBOX_META),
" # ", "#Y#", "XXX",
'#', "ingotTin",
'X', "chestWood",
'Y', PluginCore.items.sturdyCasing);
BlockBase mail = ((BlockBase) ForestryBlock.mail.block());
definitionMailbox = mail.addDefinition(new MachineDefinition(Constants.DEFINITION_MAILBOX_META, "forestry.Mailbox", TileMailbox.class, recipe).setFaces(0, 1, 2, 2, 2, 2, 0, 7));
definitionMailbox = new MachineDefinition(Constants.DEFINITION_MAILBOX_META, "forestry.Mailbox", TileMailbox.class)
.setFaces(0, 1, 2, 2, 2, 2, 0, 7);
mail.addDefinition(definitionMailbox);
recipe = ShapedRecipeCustom.createShapedRecipe(
ForestryBlock.mail.getItemStack(1, Constants.DEFINITION_TRADESTATION_META),
"Z#Z",
"#Y#",
"XWX",
'#', PluginCore.items.tubes.get(EnumElectronTube.BRONZE, 1),
'X', "chestWood",
'Y', PluginCore.items.sturdyCasing,
'Z', PluginCore.items.tubes.get(EnumElectronTube.IRON, 1),
'W', PluginCore.items.circuitboards.getCircuitboard(EnumCircuitBoardType.REFINED));
definitionTradestation = mail.addDefinition(new MachineDefinition(Constants.DEFINITION_TRADESTATION_META, "forestry.Tradestation", TileTrader.class, recipe).setFaces(0, 1, 2, 3, 4, 4, 0, 7));
definitionTradestation = new MachineDefinition(Constants.DEFINITION_TRADESTATION_META, "forestry.Tradestation", TileTrader.class)
.setFaces(0, 1, 2, 3, 4, 4, 0, 7);
mail.addDefinition(definitionTradestation);
definitionPhilatelist = mail.addDefinition(new MachineDefinition(Constants.DEFINITION_PHILATELIST_META, "forestry.Philatelist", TilePhilatelist.class)
.setFaces(0, 1, 2, 3, 2, 2, 0, 7));
definitionPhilatelist = new MachineDefinition(Constants.DEFINITION_PHILATELIST_META, "forestry.Philatelist", TilePhilatelist.class)
.setFaces(0, 1, 2, 3, 2, 2, 0, 7);
mail.addDefinition(definitionPhilatelist);
}
@Override
@@ -176,6 +164,24 @@ public class PluginMail extends ForestryPlugin {
RecipeManagers.carpenterManager.addRecipe(10, Fluids.WATER.getFluid(250), null, items.letters.getItemStack(), "###", "###", '#', PluginCore.items.woodPulp);
RecipeUtil.addShapelessRecipe(items.catalogue.getItemStack(), new ItemStack(items.stamps, 1, OreDictionary.WILDCARD_VALUE), new ItemStack(Items.book));
RecipeUtil.addRecipe(ForestryBlock.mail.getItemStack(1, Constants.DEFINITION_MAILBOX_META),
" # ",
"#Y#",
"XXX",
'#', "ingotTin",
'X', "chestWood",
'Y', PluginCore.items.sturdyCasing);
RecipeUtil.addRecipe(ForestryBlock.mail.getItemStack(1, Constants.DEFINITION_TRADESTATION_META),
"Z#Z",
"#Y#",
"XWX",
'#', PluginCore.items.tubes.get(EnumElectronTube.BRONZE, 1),
'X', "chestWood",
'Y', PluginCore.items.sturdyCasing,
'Z', PluginCore.items.tubes.get(EnumElectronTube.IRON, 1),
'W', PluginCore.items.circuitboards.getCircuitboard(EnumCircuitBoardType.REFINED));
}
@Override
@@ -55,6 +55,7 @@ import forestry.api.recipes.RecipeManagers;
import forestry.api.storage.BackpackManager;
import forestry.api.storage.IBackpackDefinition;
import forestry.api.storage.StorageManager;
import forestry.apiculture.blocks.BlockRegistryApiculture;
import forestry.core.GuiHandlerBase;
import forestry.core.IPickupHandler;
import forestry.core.IResupplyHandler;
@@ -371,9 +372,10 @@ public class PluginStorage extends ForestryPlugin {
new ItemStack(Items.item_frame)
));
if (PluginManager.Module.APICULTURE.isEnabled()) {
builder.addValidItem(ForestryBlock.candle.getWildcard());
builder.addValidItem(ForestryBlock.stump.getWildcard());
BlockRegistryApiculture beeBlocks = PluginApiculture.blocks;
if (beeBlocks != null) {
builder.addValidItem(new ItemStack(beeBlocks.candle, 1, OreDictionary.WILDCARD_VALUE));
builder.addValidItem(new ItemStack(beeBlocks.stump, 1, OreDictionary.WILDCARD_VALUE));
}
}
@@ -495,9 +497,9 @@ public class PluginStorage extends ForestryPlugin {
@Override
protected void registerRecipes() {
if (items.apiaristBackpack != null) {
ItemStack chest = ForestryBlock.apicultureChest.getItemStack(1, Constants.DEFINITION_APIARISTCHEST_META);
addBackpackRecipe(items.apiaristBackpack, "stickWood", chest);
BlockRegistryApiculture beeBlocks = PluginApiculture.blocks;
if (items.apiaristBackpack != null && beeBlocks != null) {
addBackpackRecipe(items.apiaristBackpack, "stickWood", beeBlocks.apicultureChest);
}
if (items.lepidopteristBackpack != null) {
@@ -46,7 +46,6 @@ import forestry.core.fluids.Fluids;
import forestry.core.items.EnumElectronTube;
import forestry.core.proxy.Proxies;
import forestry.core.recipes.RecipeUtil;
import forestry.core.recipes.ShapedRecipeCustom;
import forestry.core.tiles.MachineDefinition;
import forestry.core.utils.ItemStackUtil;
import forestry.core.utils.Log;
@@ -129,25 +128,10 @@ public class PluginIC2 extends ForestryPlugin {
super.preInit();
definitionEngineElectric = ((BlockBase) ForestryBlock.engine.block()).addDefinition(new EngineDefinition(Constants.DEFINITION_ENGINE_ELECTRIC_META, "forestry.EngineTin", TileEngineElectric.class,
PluginEnergy.proxy.getRenderDefaultEngine(Constants.TEXTURE_PATH_BLOCKS + "/engine_tin_"), ShapedRecipeCustom.createShapedRecipe(
ForestryBlock.engine.getItemStack(1, Constants.DEFINITION_ENGINE_ELECTRIC_META),
"###",
" X ",
"YVY",
'#', "ingotTin",
'X', "blockGlass",
'Y', "gearTin",
'V', Blocks.piston)));
PluginEnergy.proxy.getRenderDefaultEngine(Constants.TEXTURE_PATH_BLOCKS + "/engine_tin_")));
definitionGenerator = ((BlockBase) ForestryBlock.engine.block()).addDefinition(new MachineDefinition(Constants.DEFINITION_GENERATOR_META, "forestry.Generator", TileGenerator.class,
Proxies.render.getRenderDefaultMachine(Constants.TEXTURE_PATH_BLOCKS + "/generator_"), ShapedRecipeCustom.createShapedRecipe(
ForestryBlock.engine.getItemStack(1, Constants.DEFINITION_GENERATOR_META),
"X#X",
"XYX",
"X#X",
'#', "blockGlass",
'X', "ingotGold",
'Y', PluginCore.items.sturdyCasing)));
Proxies.render.getRenderDefaultMachine(Constants.TEXTURE_PATH_BLOCKS + "/generator_")));
emptyCell = IC2Items.getItem("cell");
if (emptyCell != null) {
@@ -326,6 +310,22 @@ public class PluginIC2 extends ForestryPlugin {
ICircuitLayout layoutManual = ChipsetManager.circuitRegistry.getLayout("forestry.farms.manual");
ChipsetManager.solderManager.addRecipe(layoutManual, PluginCore.items.tubes.get(EnumElectronTube.RUBBER, 1), Circuit.farmRubberManual);
}
}
RecipeUtil.addRecipe(ForestryBlock.engine.getItemStack(1, Constants.DEFINITION_GENERATOR_META),
"X#X",
"XYX",
"X#X",
'#', "blockGlass",
'X', "ingotGold",
'Y', PluginCore.items.sturdyCasing);
RecipeUtil.addRecipe(ForestryBlock.engine.getItemStack(1, Constants.DEFINITION_ENGINE_ELECTRIC_META),
"###",
" X ",
"YVY",
'#', "ingotTin",
'X', "blockGlass",
'Y', "gearTin",
'V', Blocks.piston);
}
}