Move farm blocks to PluginFarming.blocks

This commit is contained in:
mezz committed 2015-11-19 01:04:37 -08:00
1 parent 18a0ae3643
commit 6cfae1462f
13 files changed
+113 -117

No files matched your search

@@ -23,8 +23,6 @@ import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraftforge.common.MinecraftForge;
import cpw.mods.fml.common.SidedProxy;
import cpw.mods.fml.common.event.FMLInterModComms.IMCMessage;
import cpw.mods.fml.common.registry.GameData;
@@ -39,17 +37,14 @@ import forestry.core.GuiHandlerBase;
import forestry.core.circuits.Circuit;
import forestry.core.circuits.CircuitLayout;
import forestry.core.config.Constants;
import forestry.core.config.ForestryBlock;
import forestry.core.items.EnumElectronTube;
import forestry.core.items.ItemBlockTyped;
import forestry.core.recipes.RecipeUtil;
import forestry.core.recipes.ShapedRecipeCustom;
import forestry.core.utils.Log;
import forestry.farming.EventHandlerFarming;
import forestry.farming.GuiHandlerFarming;
import forestry.farming.blocks.BlockFarm;
import forestry.farming.blocks.BlockMushroom;
import forestry.farming.blocks.BlockFarmType;
import forestry.farming.blocks.BlockRegistryFarming;
import forestry.farming.circuits.CircuitFarmLogic;
import forestry.farming.items.ItemBlockFarm;
import forestry.farming.logic.FarmLogicArboreal;
import forestry.farming.logic.FarmLogicCereal;
import forestry.farming.logic.FarmLogicCocoa;
@@ -84,16 +79,12 @@ public class PluginFarming extends ForestryPlugin {
@SidedProxy(clientSide = "forestry.farming.proxy.ProxyFarmingClient", serverSide = "forestry.farming.proxy.ProxyFarming")
public static ProxyFarming proxy;
public static int modelIdFarmBlock;
public static ItemStack farmFertilizer;
public static BlockRegistryFarming blocks;
@Override
protected void registerItemsAndBlocks() {
super.registerItemsAndBlocks();
ForestryBlock.mushroom.registerBlock(new BlockMushroom(), ItemBlockTyped.class, "mushroom");
ForestryBlock.farm.registerBlock(new BlockFarm(), ItemBlockFarm.class, "ffarm");
ForestryBlock.farm.block().setHarvestLevel("pickaxe", 0);
blocks = new BlockRegistryFarming();
}
@Override
@@ -154,8 +145,6 @@ public class PluginFarming extends ForestryPlugin {
public void doInit() {
super.doInit();
farmFertilizer = PluginCore.items.fertilizerCompound.getItemStack();
GameRegistry.registerTileEntity(TileFarmPlain.class, "forestry.Farm");
GameRegistry.registerTileEntity(TileGearbox.class, "forestry.FarmGearbox");
GameRegistry.registerTileEntity(TileHatch.class, "forestry.FarmHatch");
@@ -179,8 +168,6 @@ public class PluginFarming extends ForestryPlugin {
Circuit.farmCocoaManual = new CircuitFarmLogic("manualCocoa", FarmLogicCocoa.class).setManual();
Circuit.farmOrchardManual = new CircuitFarmLogic("manualOrchard", FarmLogicOrchard.class);
MinecraftForge.EVENT_BUS.register(new EventHandlerFarming());
}
@Override
@@ -291,11 +278,11 @@ public class PluginFarming extends ForestryPlugin {
@Override
protected void registerRecipes() {
ItemStack basic = ForestryBlock.farm.getItemStack(1, 0);
ItemStack gearbox = ForestryBlock.farm.getItemStack(1, 2);
ItemStack hatch = ForestryBlock.farm.getItemStack(1, 3);
ItemStack valve = ForestryBlock.farm.getItemStack(1, 4);
ItemStack control = ForestryBlock.farm.getItemStack(1, 5);
ItemStack basic = blocks.farm.get(BlockFarmType.BASIC, 1);
ItemStack gearbox = blocks.farm.get(BlockFarmType.GEARBOX, 1);
ItemStack hatch = blocks.farm.get(BlockFarmType.HATCH, 1);
ItemStack valve = blocks.farm.get(BlockFarmType.VALVE, 1);
ItemStack control = blocks.farm.get(BlockFarmType.CONTROL, 1);
for (EnumFarmBlockTexture block : EnumFarmBlockTexture.values()) {
NBTTagCompound compound = new NBTTagCompound();
@@ -310,10 +297,10 @@ public class PluginFarming extends ForestryPlugin {
'C', PluginCore.items.tubes.get(EnumElectronTube.TIN, 1),
'I', "ingotCopper");
ShapedRecipeCustom.buildRecipe(gearbox, " # ", "TTT", '#', basic, 'T', "gearTin");
ShapedRecipeCustom.buildRecipe(hatch, " # ", "TDT", '#', basic, 'T', "gearTin", 'D', Blocks.trapdoor);
ShapedRecipeCustom.buildRecipe(valve, " # ", "XTX", '#', basic, 'T', "gearTin", 'X', "blockGlass");
ShapedRecipeCustom.buildRecipe(control, " # ", "XTX", '#', basic, 'T', PluginCore.items.tubes.get(EnumElectronTube.GOLD, 1), 'X', "dustRedstone");
RecipeUtil.addRecipe(gearbox, " # ", "TTT", '#', basic, 'T', "gearTin");
RecipeUtil.addRecipe(hatch, " # ", "TDT", '#', basic, 'T', "gearTin", 'D', Blocks.trapdoor);
RecipeUtil.addRecipe(valve, " # ", "XTX", '#', basic, 'T', "gearTin", 'X', "blockGlass");
RecipeUtil.addRecipe(control, " # ", "XTX", '#', basic, 'T', PluginCore.items.tubes.get(EnumElectronTube.GOLD, 1), 'X', "dustRedstone");
}
// Circuits