Move some more code into the Blocks and Items classes, and fix the ObjectHolder annotations. Don't think it's going to be possible to make the Tools items work with ObjectHolder (they'd need to be final fields I think) because the material enums need to be initialised first.

This commit is contained in:
Ben Spiers 2014-08-03 20:21:07 +01:00
parent 2048083e11
commit 14852b0b5d
17 changed files with 388 additions and 369 deletions

View file

@ -351,7 +351,7 @@ public class ClientProxy extends CommonProxy
MinecraftForgeClient.registerItemRenderer(MekanismItems.GasMask, handler); MinecraftForgeClient.registerItemRenderer(MekanismItems.GasMask, handler);
MinecraftForgeClient.registerItemRenderer(MekanismItems.ScubaTank, handler); MinecraftForgeClient.registerItemRenderer(MekanismItems.ScubaTank, handler);
MinecraftForgeClient.registerItemRenderer(MekanismItems.Balloon, handler); MinecraftForgeClient.registerItemRenderer(MekanismItems.Balloon, handler);
MinecraftForgeClient.registerItemRenderer(MekanismItems.FreeRunners, handler); MinecraftForgeClient.registerItemRenderer(MekanismItems.FrictionBoots, handler);
MinecraftForgeClient.registerItemRenderer(MekanismItems.AtomicDisassembler, handler); MinecraftForgeClient.registerItemRenderer(MekanismItems.AtomicDisassembler, handler);
MinecraftForgeClient.registerItemRenderer(MekanismItems.GlowPanel, handler); MinecraftForgeClient.registerItemRenderer(MekanismItems.GlowPanel, handler);
MinecraftForgeClient.registerItemRenderer(MekanismItems.Flamethrower, handler); MinecraftForgeClient.registerItemRenderer(MekanismItems.Flamethrower, handler);

View file

@ -107,7 +107,7 @@ public class NEIMekanismConfig implements IConfigureNEI
API.registerNEIGuiHandler(new ElementBoundHandler()); API.registerNEIGuiHandler(new ElementBoundHandler());
API.hideItem(new ItemStack(MekanismBlocks.BoundingBlock)); API.hideItem(new ItemStack(MekanismBlocks.BoundingBlock));
API.hideItem(new ItemStack(MekanismItems.Proxy)); API.hideItem(new ItemStack(MekanismItems.ItemProxy));
} }
@Override @Override

View file

@ -44,13 +44,6 @@ import mekanism.common.entity.EntityObsidianTNT;
import mekanism.common.entity.EntityRobit; import mekanism.common.entity.EntityRobit;
import mekanism.common.integration.MekanismHooks; import mekanism.common.integration.MekanismHooks;
import mekanism.common.integration.OreDictManager; import mekanism.common.integration.OreDictManager;
import mekanism.common.item.ItemBlockBasic;
import mekanism.common.item.ItemBlockCardboardBox;
import mekanism.common.item.ItemBlockEnergyCube;
import mekanism.common.item.ItemBlockGasTank;
import mekanism.common.item.ItemBlockMachine;
import mekanism.common.item.ItemBlockOre;
import mekanism.common.item.ItemBlockPlastic;
import mekanism.common.multiblock.MultiblockManager; import mekanism.common.multiblock.MultiblockManager;
import mekanism.common.multipart.MultipartMekanism; import mekanism.common.multipart.MultipartMekanism;
import mekanism.common.network.PacketDataRequest.DataRequestMessage; import mekanism.common.network.PacketDataRequest.DataRequestMessage;
@ -88,7 +81,6 @@ import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.common.config.Configuration; import net.minecraftforge.common.config.Configuration;
import net.minecraftforge.event.world.ChunkDataEvent; import net.minecraftforge.event.world.ChunkDataEvent;
import net.minecraftforge.event.world.ChunkEvent; import net.minecraftforge.event.world.ChunkEvent;
import net.minecraftforge.fluids.FluidContainerRegistry;
import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fluids.FluidRegistry;
import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.oredict.OreDictionary; import net.minecraftforge.oredict.OreDictionary;
@ -412,7 +404,7 @@ public class Mekanism
CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MekanismBlocks.MachineBlock2, 1, 8), new Object[] { CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MekanismBlocks.MachineBlock2, 1, 8), new Object[] {
"CGC", "ASA", "CGC", Character.valueOf('G'), MekanismUtils.getEmptyGasTank(), Character.valueOf('C'), "circuitBasic", Character.valueOf('A'), MekanismItems.AtomicAlloy, Character.valueOf('S'), new ItemStack(MekanismBlocks.BasicBlock, 1, 8) "CGC", "ASA", "CGC", Character.valueOf('G'), MekanismUtils.getEmptyGasTank(), Character.valueOf('C'), "circuitBasic", Character.valueOf('A'), MekanismItems.AtomicAlloy, Character.valueOf('S'), new ItemStack(MekanismBlocks.BasicBlock, 1, 8)
})); }));
CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MekanismItems.FreeRunners), new Object[] { CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MekanismItems.FrictionBoots), new Object[] {
"C C", "A A", "T T", Character.valueOf('C'), "circuitBasic", Character.valueOf('A'), MekanismItems.EnrichedAlloy, Character.valueOf('T'), MekanismItems.EnergyTablet.getUnchargedItem() "C C", "A A", "T T", Character.valueOf('C'), "circuitBasic", Character.valueOf('A'), MekanismItems.EnrichedAlloy, Character.valueOf('T'), MekanismItems.EnergyTablet.getUnchargedItem()
})); }));
CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(MekanismItems.ArmoredJetpack.getEmptyItem(), new Object[] { CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(MekanismItems.ArmoredJetpack.getEmptyItem(), new Object[] {
@ -534,7 +526,7 @@ public class Mekanism
CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MekanismItems.Polyethene, 1, 3), new Object[] { CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MekanismItems.Polyethene, 1, 3), new Object[] {
"R", "R", Character.valueOf('R'), new ItemStack(MekanismItems.Polyethene, 1, 1) "R", "R", Character.valueOf('R'), new ItemStack(MekanismItems.Polyethene, 1, 1)
})); }));
CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MekanismBlocks.BlockHDPE, 4, 15), new Object[] { CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MekanismBlocks.PlasticBlock, 4, 15), new Object[] {
"SSS", "S S", "SSS", Character.valueOf('S'), new ItemStack(MekanismItems.Polyethene, 1, 2) "SSS", "S S", "SSS", Character.valueOf('S'), new ItemStack(MekanismItems.Polyethene, 1, 2)
})); }));
CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MekanismItems.GlowPanel, 2, 15), new Object[] { CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MekanismItems.GlowPanel, 2, 15), new Object[] {
@ -543,7 +535,7 @@ public class Mekanism
for(int i = 0; i < EnumColor.DYES.length-1; i++) for(int i = 0; i < EnumColor.DYES.length-1; i++)
{ {
CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MekanismBlocks.BlockHDPE, 4, i), new Object[] { CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MekanismBlocks.PlasticBlock, 4, i), new Object[] {
"SSS", "SDS", "SSS", Character.valueOf('S'), new ItemStack(MekanismItems.Polyethene, 1, 2), Character.valueOf('D'), "dye" + EnumColor.DYES[i].dyeName "SSS", "SDS", "SSS", Character.valueOf('S'), new ItemStack(MekanismItems.Polyethene, 1, 2), Character.valueOf('D'), "dye" + EnumColor.DYES[i].dyeName
})); }));
CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MekanismItems.GlowPanel, 2, i), new Object[] { CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MekanismItems.GlowPanel, 2, i), new Object[] {
@ -563,31 +555,31 @@ public class Mekanism
new ItemStack(MekanismItems.Balloon, 1, j), "dye" + EnumColor.DYES[i].dyeName new ItemStack(MekanismItems.Balloon, 1, j), "dye" + EnumColor.DYES[i].dyeName
})); }));
CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MekanismBlocks.BlockHDPE, 4, i), new Object[] { CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MekanismBlocks.PlasticBlock, 4, i), new Object[] {
" P ", "PDP", " P ", Character.valueOf('P'), new ItemStack(MekanismBlocks.BlockHDPE, 1, j), Character.valueOf('D'), "dye" + EnumColor.DYES[i].dyeName " P ", "PDP", " P ", Character.valueOf('P'), new ItemStack(MekanismBlocks.PlasticBlock, 1, j), Character.valueOf('D'), "dye" + EnumColor.DYES[i].dyeName
})); }));
CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MekanismBlocks.BlockSlickHDPE, 4, i), new Object[] { CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MekanismBlocks.SlickPlasticBlock, 4, i), new Object[] {
" P ", "PDP", " P ", Character.valueOf('P'), new ItemStack(MekanismBlocks.BlockSlickHDPE, 1, j), Character.valueOf('D'), "dye" + EnumColor.DYES[i].dyeName " P ", "PDP", " P ", Character.valueOf('P'), new ItemStack(MekanismBlocks.SlickPlasticBlock, 1, j), Character.valueOf('D'), "dye" + EnumColor.DYES[i].dyeName
})); }));
CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MekanismBlocks.BlockGlowHDPE, 4, i), new Object[] { CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MekanismBlocks.GlowPlasticBlock, 4, i), new Object[] {
" P ", "PDP", " P ", Character.valueOf('P'), new ItemStack(MekanismBlocks.BlockGlowHDPE, 1, j), Character.valueOf('D'), "dye" + EnumColor.DYES[i].dyeName " P ", "PDP", " P ", Character.valueOf('P'), new ItemStack(MekanismBlocks.GlowPlasticBlock, 1, j), Character.valueOf('D'), "dye" + EnumColor.DYES[i].dyeName
})); }));
CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MekanismBlocks.BlockReinforcedHDPE, 4, i), new Object[] { CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MekanismBlocks.ReinforcedPlasticBlock, 4, i), new Object[] {
" P ", "PDP", " P ", Character.valueOf('P'), new ItemStack(MekanismBlocks.BlockReinforcedHDPE, 1, j), Character.valueOf('D'), "dye" + EnumColor.DYES[i].dyeName " P ", "PDP", " P ", Character.valueOf('P'), new ItemStack(MekanismBlocks.ReinforcedPlasticBlock, 1, j), Character.valueOf('D'), "dye" + EnumColor.DYES[i].dyeName
})); }));
CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MekanismItems.GlowPanel, 4, i), new Object[] { CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MekanismItems.GlowPanel, 4, i), new Object[] {
" P ", "PDP", " P ", Character.valueOf('P'), new ItemStack(MekanismItems.GlowPanel, 1, j), Character.valueOf('D'), "dye" + EnumColor.DYES[i].dyeName " P ", "PDP", " P ", Character.valueOf('P'), new ItemStack(MekanismItems.GlowPanel, 1, j), Character.valueOf('D'), "dye" + EnumColor.DYES[i].dyeName
})); }));
} }
CraftingManager.getInstance().getRecipeList().add(new ShapelessOreRecipe(new ItemStack(MekanismBlocks.BlockGlowHDPE, 3, i), new Object[] { CraftingManager.getInstance().getRecipeList().add(new ShapelessOreRecipe(new ItemStack(MekanismBlocks.GlowPlasticBlock, 3, i), new Object[] {
new ItemStack(MekanismBlocks.BlockHDPE, 1, i), new ItemStack(MekanismBlocks.BlockHDPE, 1, i), new ItemStack(MekanismBlocks.BlockHDPE, 1, i), new ItemStack(Items.glowstone_dust) new ItemStack(MekanismBlocks.PlasticBlock, 1, i), new ItemStack(MekanismBlocks.PlasticBlock, 1, i), new ItemStack(MekanismBlocks.PlasticBlock, 1, i), new ItemStack(Items.glowstone_dust)
})); }));
CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MekanismBlocks.BlockReinforcedHDPE, 4, i), new Object[] { CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MekanismBlocks.ReinforcedPlasticBlock, 4, i), new Object[] {
" P ", "POP", " P ", Character.valueOf('P'), new ItemStack(MekanismBlocks.BlockHDPE, 1, i), Character.valueOf('O'), new ItemStack(MekanismItems.Dust, 1, 2) " P ", "POP", " P ", Character.valueOf('P'), new ItemStack(MekanismBlocks.PlasticBlock, 1, i), Character.valueOf('O'), new ItemStack(MekanismItems.Dust, 1, 2)
})); }));
CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MekanismBlocks.BlockRoadHDPE, 3, i), new Object[] { CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MekanismBlocks.RoadPlasticBlock, 3, i), new Object[] {
"SSS", "PPP", "SSS", Character.valueOf('S'), Blocks.sand, Character.valueOf('P'), new ItemStack(MekanismBlocks.BlockSlickHDPE, 1, i) "SSS", "PPP", "SSS", Character.valueOf('S'), Blocks.sand, Character.valueOf('P'), new ItemStack(MekanismBlocks.SlickPlasticBlock, 1, i)
})); }));
} }
@ -626,7 +618,7 @@ public class Mekanism
for(int i = 0; i < EnumColor.DYES.length; i++) for(int i = 0; i < EnumColor.DYES.length; i++)
{ {
RecipeHandler.addEnrichmentChamberRecipe(new ItemStack(MekanismBlocks.BlockHDPE, 1, i), new ItemStack(MekanismBlocks.BlockSlickHDPE, 1, i)); RecipeHandler.addEnrichmentChamberRecipe(new ItemStack(MekanismBlocks.PlasticBlock, 1, i), new ItemStack(MekanismBlocks.SlickPlasticBlock, 1, i));
} }
//Combiner recipes //Combiner recipes
@ -777,88 +769,6 @@ public class Mekanism
RecipeSorter.register("bin", BinRecipe.class, Category.SHAPELESS, ""); RecipeSorter.register("bin", BinRecipe.class, Category.SHAPELESS, "");
} }
/**
* Adds and registers all items.
*/
public void registerItems()
{
//Fluid Container stuff
FluidContainerRegistry.registerFluidContainer(FluidRegistry.getFluid("brine"), new ItemStack(MekanismItems.BrineBucket), FluidContainerRegistry.EMPTY_BUCKET);
//Registrations
GameRegistry.registerItem(MekanismItems.PartTransmitter, "PartTransmitter");
GameRegistry.registerItem(MekanismItems.ElectricBow, "ElectricBow");
GameRegistry.registerItem(MekanismItems.Dust, "Dust");
GameRegistry.registerItem(MekanismItems.Ingot, "Ingot");
GameRegistry.registerItem(MekanismItems.EnergyTablet, "EnergyTablet");
GameRegistry.registerItem(MekanismItems.SpeedUpgrade, "SpeedUpgrade");
GameRegistry.registerItem(MekanismItems.EnergyUpgrade, "EnergyUpgrade");
GameRegistry.registerItem(MekanismItems.Robit, "Robit");
GameRegistry.registerItem(MekanismItems.AtomicDisassembler, "AtomicDisassembler");
GameRegistry.registerItem(MekanismItems.EnrichedAlloy, "EnrichedAlloy");
GameRegistry.registerItem(MekanismItems.ReinforcedAlloy, "ReinforcedAlloy");
GameRegistry.registerItem(MekanismItems.AtomicAlloy, "AtomicAlloy");
GameRegistry.registerItem(MekanismItems.Proxy, "ItemProxy");
GameRegistry.registerItem(MekanismItems.ControlCircuit, "ControlCircuit");
GameRegistry.registerItem(MekanismItems.EnrichedIron, "EnrichedIron");
GameRegistry.registerItem(MekanismItems.CompressedCarbon, "CompressedCarbon");
GameRegistry.registerItem(MekanismItems.CompressedRedstone, "CompressedRedstone");
GameRegistry.registerItem(MekanismItems.CompressedDiamond, "CompressedDiamond");
GameRegistry.registerItem(MekanismItems.CompressedObsidian, "CompressedObsidian");
GameRegistry.registerItem(MekanismItems.PortableTeleporter, "PortableTeleporter");
GameRegistry.registerItem(MekanismItems.TeleportationCore, "TeleportationCore");
GameRegistry.registerItem(MekanismItems.Clump, "Clump");
GameRegistry.registerItem(MekanismItems.DirtyDust, "DirtyDust");
GameRegistry.registerItem(MekanismItems.Configurator, "Configurator");
GameRegistry.registerItem(MekanismItems.NetworkReader, "NetworkReader");
GameRegistry.registerItem(MekanismItems.WalkieTalkie, "WalkieTalkie");
GameRegistry.registerItem(MekanismItems.Jetpack, "Jetpack");
GameRegistry.registerItem(MekanismItems.Dictionary, "Dictionary");
GameRegistry.registerItem(MekanismItems.GasMask, "GasMask");
GameRegistry.registerItem(MekanismItems.ScubaTank, "ScubaTank");
GameRegistry.registerItem(MekanismItems.Balloon, "Balloon");
GameRegistry.registerItem(MekanismItems.Shard, "Shard");
GameRegistry.registerItem(MekanismItems.ElectrolyticCore, "ElectrolyticCore");
GameRegistry.registerItem(MekanismItems.Sawdust, "Sawdust");
GameRegistry.registerItem(MekanismItems.Salt, "Salt");
GameRegistry.registerItem(MekanismItems.BrineBucket, "BrineBucket");
GameRegistry.registerItem(MekanismItems.Crystal, "Crystal");
GameRegistry.registerItem(MekanismItems.FreeRunners, "FrictionBoots");
GameRegistry.registerItem(MekanismItems.ArmoredJetpack, "ArmoredJetpack");
GameRegistry.registerItem(MekanismItems.FilterCard, "FilterCard");
GameRegistry.registerItem(MekanismItems.SeismicReader, "SeismicReader");
GameRegistry.registerItem(MekanismItems.Substrate, "Substrate");
GameRegistry.registerItem(MekanismItems.Polyethene, "Polyethene");
GameRegistry.registerItem(MekanismItems.BioFuel, "BioFuel");
GameRegistry.registerItem(MekanismItems.GlowPanel, "GlowPanel");
GameRegistry.registerItem(MekanismItems.Flamethrower, "Flamethrower");
}
/**
* Adds and registers all blocks.
*/
public void registerBlocks()
{
//Registrations
GameRegistry.registerBlock(MekanismBlocks.BasicBlock, ItemBlockBasic.class, "BasicBlock");
GameRegistry.registerBlock(MekanismBlocks.BasicBlock2, ItemBlockBasic.class, "BasicBlock2");
GameRegistry.registerBlock(MekanismBlocks.MachineBlock, ItemBlockMachine.class, "MachineBlock");
GameRegistry.registerBlock(MekanismBlocks.MachineBlock2, ItemBlockMachine.class, "MachineBlock2");
GameRegistry.registerBlock(MekanismBlocks.OreBlock, ItemBlockOre.class, "OreBlock");
GameRegistry.registerBlock(MekanismBlocks.EnergyCube, ItemBlockEnergyCube.class, "EnergyCube");
GameRegistry.registerBlock(MekanismBlocks.ObsidianTNT, "ObsidianTNT");
GameRegistry.registerBlock(MekanismBlocks.BoundingBlock, "BoundingBlock");
GameRegistry.registerBlock(MekanismBlocks.GasTank, ItemBlockGasTank.class, "GasTank");
GameRegistry.registerBlock(MekanismBlocks.CardboardBox, ItemBlockCardboardBox.class, "CardboardBox");
GameRegistry.registerBlock(MekanismBlocks.BlockHDPE, ItemBlockPlastic.class, "PlasticBlock");
GameRegistry.registerBlock(MekanismBlocks.BlockSlickHDPE, ItemBlockPlastic.class, "SlickPlasticBlock");
GameRegistry.registerBlock(MekanismBlocks.BlockGlowHDPE, ItemBlockPlastic.class, "GlowPlasticBlock");
GameRegistry.registerBlock(MekanismBlocks.BlockReinforcedHDPE, ItemBlockPlastic.class, "ReinforcedPlasticBlock");
GameRegistry.registerBlock(MekanismBlocks.BlockRoadHDPE, ItemBlockPlastic.class, "RoadPlasticBlock");
GameRegistry.registerBlock(MekanismBlocks.BlockHDPEFence, "PlasticFence");
GameRegistry.registerBlock(MekanismBlocks.SaltBlock, "SaltBlock");
}
/** /**
* Registers specified items with the Ore Dictionary. * Registers specified items with the Ore Dictionary.
*/ */
@ -1123,6 +1033,10 @@ public class Mekanism
Mekanism.proxy.preInit(); Mekanism.proxy.preInit();
//Register blocks and items
MekanismItems.register();
MekanismBlocks.register();
//Register infuses //Register infuses
InfuseRegistry.registerInfuseType(new InfuseType("CARBON", MekanismUtils.getResource(ResourceType.INFUSE, "Infusions.png"), 0, 0).setUnlocalizedName("infuse.carbon")); InfuseRegistry.registerInfuseType(new InfuseType("CARBON", MekanismUtils.getResource(ResourceType.INFUSE, "Infusions.png"), 0, 0).setUnlocalizedName("infuse.carbon"));
InfuseRegistry.registerInfuseType(new InfuseType("TIN", MekanismUtils.getResource(ResourceType.INFUSE, "Infusions.png"), 4, 0).setUnlocalizedName("infuse.tin")); InfuseRegistry.registerInfuseType(new InfuseType("TIN", MekanismUtils.getResource(ResourceType.INFUSE, "Infusions.png"), 4, 0).setUnlocalizedName("infuse.tin"));
@ -1181,8 +1095,6 @@ public class Mekanism
} }
//Load this module //Load this module
registerItems();
registerBlocks();
addRecipes(); addRecipes();
addEntities(); addEntities();

View file

@ -11,8 +11,16 @@ import mekanism.common.block.BlockOre;
import mekanism.common.block.BlockPlastic; import mekanism.common.block.BlockPlastic;
import mekanism.common.block.BlockPlasticFence; import mekanism.common.block.BlockPlasticFence;
import mekanism.common.block.BlockSalt; import mekanism.common.block.BlockSalt;
import mekanism.common.item.ItemBlockBasic;
import mekanism.common.item.ItemBlockCardboardBox;
import mekanism.common.item.ItemBlockEnergyCube;
import mekanism.common.item.ItemBlockGasTank;
import mekanism.common.item.ItemBlockMachine;
import mekanism.common.item.ItemBlockOre;
import mekanism.common.item.ItemBlockPlastic;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.GameRegistry.ObjectHolder; import cpw.mods.fml.common.registry.GameRegistry.ObjectHolder;
@ObjectHolder("Mekanism") @ObjectHolder("Mekanism")
@ -28,11 +36,35 @@ public class MekanismBlocks
public static final Block BoundingBlock = (BlockBounding)new BlockBounding().setBlockName("BoundingBlock"); public static final Block BoundingBlock = (BlockBounding)new BlockBounding().setBlockName("BoundingBlock");
public static final Block GasTank = new BlockGasTank().setBlockName("GasTank"); public static final Block GasTank = new BlockGasTank().setBlockName("GasTank");
public static final Block CardboardBox = new BlockCardboardBox().setBlockName("CardboardBox"); public static final Block CardboardBox = new BlockCardboardBox().setBlockName("CardboardBox");
public static final Block BlockHDPE = new BlockPlastic().setBlockName("PlasticBlock"); public static final Block PlasticBlock = new BlockPlastic().setBlockName("PlasticBlock");
public static final Block BlockSlickHDPE = new BlockPlastic().setBlockName("SlickPlasticBlock"); public static final Block SlickPlasticBlock = new BlockPlastic().setBlockName("SlickPlasticBlock");
public static final Block BlockGlowHDPE = new BlockPlastic().setBlockName("GlowPlasticBlock"); public static final Block GlowPlasticBlock = new BlockPlastic().setBlockName("GlowPlasticBlock");
public static final Block BlockReinforcedHDPE = new BlockPlastic().setBlockName("ReinforcedPlasticBlock"); public static final Block ReinforcedPlasticBlock = new BlockPlastic().setBlockName("ReinforcedPlasticBlock");
public static final Block BlockRoadHDPE = new BlockPlastic().setBlockName("RoadPlasticBlock"); public static final Block RoadPlasticBlock = new BlockPlastic().setBlockName("RoadPlasticBlock");
public static final Block BlockHDPEFence = new BlockPlasticFence().setBlockName("PlasticFence"); public static final Block PlasticFence = new BlockPlasticFence().setBlockName("PlasticFence");
public static final Block SaltBlock = new BlockSalt().setBlockName("SaltBlock"); public static final Block SaltBlock = new BlockSalt().setBlockName("SaltBlock");
/**
* Adds and registers all blocks.
*/
public static void register()
{
GameRegistry.registerBlock(BasicBlock, ItemBlockBasic.class, "BasicBlock");
GameRegistry.registerBlock(BasicBlock2, ItemBlockBasic.class, "BasicBlock2");
GameRegistry.registerBlock(MachineBlock, ItemBlockMachine.class, "MachineBlock");
GameRegistry.registerBlock(MachineBlock2, ItemBlockMachine.class, "MachineBlock2");
GameRegistry.registerBlock(OreBlock, ItemBlockOre.class, "OreBlock");
GameRegistry.registerBlock(EnergyCube, ItemBlockEnergyCube.class, "EnergyCube");
GameRegistry.registerBlock(ObsidianTNT, "ObsidianTNT");
GameRegistry.registerBlock(BoundingBlock, "BoundingBlock");
GameRegistry.registerBlock(GasTank, ItemBlockGasTank.class, "GasTank");
GameRegistry.registerBlock(CardboardBox, ItemBlockCardboardBox.class, "CardboardBox");
GameRegistry.registerBlock(PlasticBlock, ItemBlockPlastic.class, "PlasticBlock");
GameRegistry.registerBlock(SlickPlasticBlock, ItemBlockPlastic.class, "SlickPlasticBlock");
GameRegistry.registerBlock(GlowPlasticBlock, ItemBlockPlastic.class, "GlowPlasticBlock");
GameRegistry.registerBlock(ReinforcedPlasticBlock, ItemBlockPlastic.class, "ReinforcedPlasticBlock");
GameRegistry.registerBlock(RoadPlasticBlock, ItemBlockPlastic.class, "RoadPlasticBlock");
GameRegistry.registerBlock(PlasticFence, "PlasticFence");
GameRegistry.registerBlock(SaltBlock, "SaltBlock");
}
} }

View file

@ -33,12 +33,17 @@ import mekanism.common.multipart.ItemPartTransmitter;
import net.minecraft.init.Items; import net.minecraft.init.Items;
import net.minecraft.item.Item; import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.fluids.FluidContainerRegistry;
import net.minecraftforge.fluids.FluidRegistry;
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.GameRegistry.ObjectHolder; import cpw.mods.fml.common.registry.GameRegistry.ObjectHolder;
@ObjectHolder("Mekanism") @ObjectHolder("Mekanism")
public class MekanismItems public class MekanismItems
{ {
//Items
public static final ItemElectricBow ElectricBow = (ItemElectricBow)new ItemElectricBow().setUnlocalizedName("ElectricBow"); public static final ItemElectricBow ElectricBow = (ItemElectricBow)new ItemElectricBow().setUnlocalizedName("ElectricBow");
public static final Item EnrichedAlloy = new ItemMekanism().setUnlocalizedName("EnrichedAlloy"); public static final Item EnrichedAlloy = new ItemMekanism().setUnlocalizedName("EnrichedAlloy");
public static final Item ReinforcedAlloy = new ItemMekanism().setUnlocalizedName("ReinforcedAlloy"); public static final Item ReinforcedAlloy = new ItemMekanism().setUnlocalizedName("ReinforcedAlloy");
@ -58,7 +63,7 @@ public class MekanismItems
public static final Item Configurator = new ItemConfigurator().setUnlocalizedName("Configurator"); public static final Item Configurator = new ItemConfigurator().setUnlocalizedName("Configurator");
public static final Item NetworkReader = new ItemNetworkReader().setUnlocalizedName("NetworkReader"); public static final Item NetworkReader = new ItemNetworkReader().setUnlocalizedName("NetworkReader");
public static final Item WalkieTalkie = new ItemWalkieTalkie().setUnlocalizedName("WalkieTalkie"); public static final Item WalkieTalkie = new ItemWalkieTalkie().setUnlocalizedName("WalkieTalkie");
public static final Item Proxy = new ItemProxy().setUnlocalizedName("ItemProxy"); public static final Item ItemProxy = new ItemProxy().setUnlocalizedName("ItemProxy");
public static final Item PartTransmitter = new ItemPartTransmitter().setUnlocalizedName("MultipartTransmitter"); public static final Item PartTransmitter = new ItemPartTransmitter().setUnlocalizedName("MultipartTransmitter");
public static final Item GlowPanel = new ItemGlowPanel().setUnlocalizedName("GlowPanel"); public static final Item GlowPanel = new ItemGlowPanel().setUnlocalizedName("GlowPanel");
public static final ItemJetpack Jetpack = (ItemJetpack)new ItemJetpack().setUnlocalizedName("Jetpack"); public static final ItemJetpack Jetpack = (ItemJetpack)new ItemJetpack().setUnlocalizedName("Jetpack");
@ -71,7 +76,7 @@ public class MekanismItems
public static final Item Sawdust = new ItemMekanism().setUnlocalizedName("Sawdust"); public static final Item Sawdust = new ItemMekanism().setUnlocalizedName("Sawdust");
public static final Item Salt = new ItemMekanism().setUnlocalizedName("Salt"); public static final Item Salt = new ItemMekanism().setUnlocalizedName("Salt");
public static final Item BrineBucket = new ItemMekanism().setMaxStackSize(1).setContainerItem(Items.bucket).setUnlocalizedName("BrineBucket"); public static final Item BrineBucket = new ItemMekanism().setMaxStackSize(1).setContainerItem(Items.bucket).setUnlocalizedName("BrineBucket");
public static final Item FreeRunners = new ItemFreeRunners().setUnlocalizedName("FreeRunners"); public static final Item FrictionBoots = new ItemFreeRunners().setUnlocalizedName("FreeRunners");
public static final ItemJetpack ArmoredJetpack = (ItemJetpack)new ItemJetpack().setUnlocalizedName("ArmoredJetpack"); public static final ItemJetpack ArmoredJetpack = (ItemJetpack)new ItemJetpack().setUnlocalizedName("ArmoredJetpack");
public static final Item FilterCard = new ItemFilterCard().setUnlocalizedName("FilterCard"); public static final Item FilterCard = new ItemFilterCard().setUnlocalizedName("FilterCard");
public static final ItemSeismicReader SeismicReader = (ItemSeismicReader)new ItemSeismicReader().setUnlocalizedName("SeismicReader"); public static final ItemSeismicReader SeismicReader = (ItemSeismicReader)new ItemSeismicReader().setUnlocalizedName("SeismicReader");
@ -87,4 +92,62 @@ public class MekanismItems
public static final Item Shard = new ItemShard(); public static final Item Shard = new ItemShard();
public static final Item Crystal = new ItemCrystal(); public static final Item Crystal = new ItemCrystal();
public static final Item ControlCircuit = new ItemControlCircuit(); public static final Item ControlCircuit = new ItemControlCircuit();
/**
* Adds and registers all items.
*/
public static void register()
{
GameRegistry.registerItem(PartTransmitter, "PartTransmitter");
GameRegistry.registerItem(ElectricBow, "ElectricBow");
GameRegistry.registerItem(Dust, "Dust");
GameRegistry.registerItem(Ingot, "Ingot");
GameRegistry.registerItem(EnergyTablet, "EnergyTablet");
GameRegistry.registerItem(SpeedUpgrade, "SpeedUpgrade");
GameRegistry.registerItem(EnergyUpgrade, "EnergyUpgrade");
GameRegistry.registerItem(Robit, "Robit");
GameRegistry.registerItem(AtomicDisassembler, "AtomicDisassembler");
GameRegistry.registerItem(EnrichedAlloy, "EnrichedAlloy");
GameRegistry.registerItem(ReinforcedAlloy, "ReinforcedAlloy");
GameRegistry.registerItem(AtomicAlloy, "AtomicAlloy");
GameRegistry.registerItem(ItemProxy, "ItemProxy");
GameRegistry.registerItem(ControlCircuit, "ControlCircuit");
GameRegistry.registerItem(EnrichedIron, "EnrichedIron");
GameRegistry.registerItem(CompressedCarbon, "CompressedCarbon");
GameRegistry.registerItem(CompressedRedstone, "CompressedRedstone");
GameRegistry.registerItem(CompressedDiamond, "CompressedDiamond");
GameRegistry.registerItem(CompressedObsidian, "CompressedObsidian");
GameRegistry.registerItem(PortableTeleporter, "PortableTeleporter");
GameRegistry.registerItem(TeleportationCore, "TeleportationCore");
GameRegistry.registerItem(Clump, "Clump");
GameRegistry.registerItem(DirtyDust, "DirtyDust");
GameRegistry.registerItem(Configurator, "Configurator");
GameRegistry.registerItem(NetworkReader, "NetworkReader");
GameRegistry.registerItem(WalkieTalkie, "WalkieTalkie");
GameRegistry.registerItem(Jetpack, "Jetpack");
GameRegistry.registerItem(Dictionary, "Dictionary");
GameRegistry.registerItem(GasMask, "GasMask");
GameRegistry.registerItem(ScubaTank, "ScubaTank");
GameRegistry.registerItem(Balloon, "Balloon");
GameRegistry.registerItem(Shard, "Shard");
GameRegistry.registerItem(ElectrolyticCore, "ElectrolyticCore");
GameRegistry.registerItem(Sawdust, "Sawdust");
GameRegistry.registerItem(Salt, "Salt");
GameRegistry.registerItem(BrineBucket, "BrineBucket");
GameRegistry.registerItem(Crystal, "Crystal");
GameRegistry.registerItem(FrictionBoots, "FrictionBoots");
GameRegistry.registerItem(ArmoredJetpack, "ArmoredJetpack");
GameRegistry.registerItem(FilterCard, "FilterCard");
GameRegistry.registerItem(SeismicReader, "SeismicReader");
GameRegistry.registerItem(Substrate, "Substrate");
GameRegistry.registerItem(Polyethene, "Polyethene");
GameRegistry.registerItem(BioFuel, "BioFuel");
GameRegistry.registerItem(GlowPanel, "GlowPanel");
GameRegistry.registerItem(Flamethrower, "Flamethrower");
FluidContainerRegistry.registerFluidContainer(FluidRegistry.getFluid("brine"), new ItemStack(BrineBucket), FluidContainerRegistry.EMPTY_BUCKET);
MinecraftForge.EVENT_BUS.register(GasMask);
MinecraftForge.EVENT_BUS.register(FrictionBoots);
}
} }

View file

@ -27,7 +27,7 @@ public class BlockPlastic extends Block
setHardness(5F); setHardness(5F);
setResistance(10F); setResistance(10F);
setCreativeTab(Mekanism.tabMekanism); setCreativeTab(Mekanism.tabMekanism);
if(this == MekanismBlocks.BlockSlickHDPE) if(this == MekanismBlocks.SlickPlasticBlock)
{ {
slipperiness = 0.98F; slipperiness = 0.98F;
} }
@ -37,23 +37,23 @@ public class BlockPlastic extends Block
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public void registerBlockIcons(IIconRegister register) public void registerBlockIcons(IIconRegister register)
{ {
if(this == MekanismBlocks.BlockHDPE) if(this == MekanismBlocks.PlasticBlock)
{ {
blockIcon = register.registerIcon("mekanism:PlasticBlock"); blockIcon = register.registerIcon("mekanism:PlasticBlock");
} }
else if(this == MekanismBlocks.BlockSlickHDPE) else if(this == MekanismBlocks.SlickPlasticBlock)
{ {
blockIcon = register.registerIcon("mekanism:SlickPlasticBlock"); blockIcon = register.registerIcon("mekanism:SlickPlasticBlock");
} }
else if(this == MekanismBlocks.BlockGlowHDPE) else if(this == MekanismBlocks.GlowPlasticBlock)
{ {
blockIcon = register.registerIcon("mekanism:GlowPlasticBlock"); blockIcon = register.registerIcon("mekanism:GlowPlasticBlock");
} }
else if(this == MekanismBlocks.BlockReinforcedHDPE) else if(this == MekanismBlocks.ReinforcedPlasticBlock)
{ {
blockIcon = register.registerIcon("mekanism:ReinforcedPlasticBlock"); blockIcon = register.registerIcon("mekanism:ReinforcedPlasticBlock");
} }
else if(this == MekanismBlocks.BlockRoadHDPE) else if(this == MekanismBlocks.RoadPlasticBlock)
{ {
blockIcon = register.registerIcon("mekanism:RoadPlasticBlock"); blockIcon = register.registerIcon("mekanism:RoadPlasticBlock");
} }
@ -62,7 +62,7 @@ public class BlockPlastic extends Block
@Override @Override
public void onEntityWalking(World world, int x, int y, int z, Entity e) public void onEntityWalking(World world, int x, int y, int z, Entity e)
{ {
if(this == MekanismBlocks.BlockRoadHDPE) if(this == MekanismBlocks.RoadPlasticBlock)
{ {
double boost = 1.6; double boost = 1.6;
@ -105,7 +105,7 @@ public class BlockPlastic extends Block
@Override @Override
public int getLightValue(IBlockAccess world, int x, int y, int z) public int getLightValue(IBlockAccess world, int x, int y, int z)
{ {
if(this == MekanismBlocks.BlockGlowHDPE) if(this == MekanismBlocks.GlowPlasticBlock)
{ {
return 10; return 10;
} }

View file

@ -21,6 +21,7 @@ public class ItemFlamethrower extends ItemMekanism implements IGasItem
public ItemFlamethrower() public ItemFlamethrower()
{ {
super();
setMaxStackSize(1); setMaxStackSize(1);
setMaxDamage(100); setMaxDamage(100);
setNoRepair(); setNoRepair();

View file

@ -52,7 +52,6 @@ public class ItemFreeRunners extends ItemArmor implements IEnergizedItem, ISpeci
setMaxDamage(100); setMaxDamage(100);
setNoRepair(); setNoRepair();
setCreativeTab(Mekanism.tabMekanism); setCreativeTab(Mekanism.tabMekanism);
MinecraftForge.EVENT_BUS.register(this);
} }
@Override @Override

View file

@ -23,7 +23,6 @@ public class ItemGasMask extends ItemArmor
{ {
super(EnumHelper.addArmorMaterial("GASMASK", 0, new int[] {0, 0, 0, 0}, 0), 0, 0); super(EnumHelper.addArmorMaterial("GASMASK", 0, new int[] {0, 0, 0, 0}, 0), 0, 0);
setCreativeTab(Mekanism.tabMekanism); setCreativeTab(Mekanism.tabMekanism);
MinecraftForge.EVENT_BUS.register(this);
} }
@Override @Override

View file

@ -20,6 +20,7 @@ public class ItemUpgrade extends ItemMekanism implements IUpgradeItem
public ItemUpgrade(Upgrade type) public ItemUpgrade(Upgrade type)
{ {
super();
upgrade = type; upgrade = type;
setMaxStackSize(type.getMax()); setMaxStackSize(type.getMax());
} }

View file

@ -164,7 +164,7 @@ public class BinRecipe implements IRecipe
if(testRemain != null && testRemain.stackSize > 0) if(testRemain != null && testRemain.stackSize > 0)
{ {
ItemStack proxy = new ItemStack(MekanismItems.Proxy); ItemStack proxy = new ItemStack(MekanismItems.ItemProxy);
((ItemProxy)proxy.getItem()).setSavedItem(proxy, testRemain.copy()); ((ItemProxy)proxy.getItem()).setSavedItem(proxy, testRemain.copy());
event.craftMatrix.setInventorySlotContents(other, proxy); event.craftMatrix.setInventorySlotContents(other, proxy);
} }

View file

@ -2,15 +2,24 @@ package mekanism.generators.common;
import mekanism.generators.common.block.BlockGenerator; import mekanism.generators.common.block.BlockGenerator;
import mekanism.generators.common.block.BlockReactor; import mekanism.generators.common.block.BlockReactor;
import mekanism.generators.common.item.ItemBlockGenerator;
import mekanism.generators.common.item.ItemBlockReactor;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.GameRegistry.ObjectHolder; import cpw.mods.fml.common.registry.GameRegistry.ObjectHolder;
@ObjectHolder("MekanismGenerators") @ObjectHolder("MekanismGenerators")
public class GeneratorsBlocks public class GeneratorsBlocks
{ {
//Blocks
public static final Block Generator = new BlockGenerator().setBlockName("Generator"); public static final Block Generator = new BlockGenerator().setBlockName("Generator");
public static final Block Reactor = new BlockReactor().setBlockName("Reactor"); public static final Block Reactor = new BlockReactor().setBlockName("Reactor");
public static final Block ReactorGlass = new BlockReactor().setBlockName("ReactorGlass"); public static final Block ReactorGlass = new BlockReactor().setBlockName("ReactorGlass");
public static void register()
{
GameRegistry.registerBlock(Generator, ItemBlockGenerator.class, "Generator");
GameRegistry.registerBlock(Reactor, ItemBlockReactor.class, "Reactor");
GameRegistry.registerBlock(ReactorGlass, ItemBlockReactor.class, "ReactorGlass");
}
} }

View file

@ -3,11 +3,16 @@ package mekanism.generators.common;
import mekanism.common.item.ItemMekanism; import mekanism.common.item.ItemMekanism;
import net.minecraft.item.Item; import net.minecraft.item.Item;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.GameRegistry.ObjectHolder; import cpw.mods.fml.common.registry.GameRegistry.ObjectHolder;
@ObjectHolder("MekanismGenerators") @ObjectHolder("MekanismGenerators")
public class GeneratorsItems public class GeneratorsItems
{ {
//Items public static final Item SolarPanel = new ItemMekanism().setUnlocalizedName("SolarPanel");
public static final Item SolarPanel = new ItemMekanism().setUnlocalizedName("SolarPanel");;
public static void register()
{
GameRegistry.registerItem(SolarPanel, "SolarPanel");
}
} }

View file

@ -14,12 +14,7 @@ import mekanism.common.Mekanism;
import mekanism.common.MekanismBlocks; import mekanism.common.MekanismBlocks;
import mekanism.common.MekanismItems; import mekanism.common.MekanismItems;
import mekanism.common.Version; import mekanism.common.Version;
import mekanism.common.item.ItemMekanism;
import mekanism.common.recipe.MekanismRecipe; import mekanism.common.recipe.MekanismRecipe;
import mekanism.generators.common.block.BlockGenerator;
import mekanism.generators.common.block.BlockReactor;
import mekanism.generators.common.item.ItemBlockGenerator;
import mekanism.generators.common.item.ItemBlockReactor;
import net.minecraft.init.Blocks; import net.minecraft.init.Blocks;
import net.minecraft.init.Items; import net.minecraft.init.Items;
@ -38,9 +33,9 @@ import cpw.mods.fml.common.ModAPIManager;
import cpw.mods.fml.common.SidedProxy; import cpw.mods.fml.common.SidedProxy;
import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLPostInitializationEvent; import cpw.mods.fml.common.event.FMLPostInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.eventhandler.SubscribeEvent; import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import cpw.mods.fml.common.network.NetworkRegistry; import cpw.mods.fml.common.network.NetworkRegistry;
import cpw.mods.fml.common.registry.GameRegistry;
@Mod(modid = "MekanismGenerators", name = "MekanismGenerators", version = "8.0.0", dependencies = "required-after:Mekanism", guiFactory = "mekanism.generators.client.gui.GeneratorsGuiFactory") @Mod(modid = "MekanismGenerators", name = "MekanismGenerators", version = "8.0.0", dependencies = "required-after:Mekanism", guiFactory = "mekanism.generators.client.gui.GeneratorsGuiFactory")
public class MekanismGenerators implements IModule public class MekanismGenerators implements IModule
@ -58,22 +53,10 @@ public class MekanismGenerators implements IModule
public static Version versionNumber = new Version(8, 0, 0); public static Version versionNumber = new Version(8, 0, 0);
@EventHandler @EventHandler
public void postInit(FMLPostInitializationEvent event) public void preInit(FMLPreInitializationEvent event)
{ {
if(ModAPIManager.INSTANCE.hasAPI("BuildCraftAPI|fuels")) GeneratorsBlocks.register();
{ GeneratorsItems.register();
for(String s : IronEngineFuel.fuels.keySet())
{
Fluid f = FluidRegistry.getFluid(s);
if(!(f == null || GasRegistry.containsGas(s)))
{
GasRegistry.register(new Gas(f));
}
}
IronEngineFuel.addFuel("ethene", (float) (240 * general.TO_BC), 40 * FluidContainerRegistry.BUCKET_VOLUME);
}
} }
@EventHandler @EventHandler
@ -94,15 +77,31 @@ public class MekanismGenerators implements IModule
proxy.registerSpecialTileEntities(); proxy.registerSpecialTileEntities();
proxy.registerRenderInformation(); proxy.registerRenderInformation();
//Load this module
registerBlocks();
addItems();
addRecipes(); addRecipes();
//Finalization //Finalization
Mekanism.logger.info("Loaded MekanismGenerators module."); Mekanism.logger.info("Loaded MekanismGenerators module.");
} }
@EventHandler
public void postInit(FMLPostInitializationEvent event)
{
if(ModAPIManager.INSTANCE.hasAPI("BuildCraftAPI|fuels"))
{
for(String s : IronEngineFuel.fuels.keySet())
{
Fluid f = FluidRegistry.getFluid(s);
if(!(f == null || GasRegistry.containsGas(s)))
{
GasRegistry.register(new Gas(f));
}
}
IronEngineFuel.addFuel("ethene", (float) (240 * general.TO_BC), 40 * FluidContainerRegistry.BUCKET_VOLUME);
}
}
public void addRecipes() public void addRecipes()
{ {
CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(GeneratorsBlocks.Generator, 1, 0), new Object[] { CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(GeneratorsBlocks.Generator, 1, 0), new Object[] {
@ -131,19 +130,6 @@ public class MekanismGenerators implements IModule
} }
public void registerBlocks()
{
GameRegistry.registerBlock(GeneratorsBlocks.Generator, ItemBlockGenerator.class, "Generator");
GameRegistry.registerBlock(GeneratorsBlocks.Reactor, ItemBlockReactor.class, "Reactor");
GameRegistry.registerBlock(GeneratorsBlocks.ReactorGlass, ItemBlockReactor.class, "ReactorGlass");
}
public void addItems()
{
//Registrations
GameRegistry.registerItem(GeneratorsItems.SolarPanel, "SolarPanel");
}
@Override @Override
public Version getVersion() public Version getVersion()
{ {

View file

@ -27,8 +27,8 @@ import cpw.mods.fml.common.Mod.EventHandler;
import cpw.mods.fml.common.Mod.Instance; import cpw.mods.fml.common.Mod.Instance;
import cpw.mods.fml.common.SidedProxy; import cpw.mods.fml.common.SidedProxy;
import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.eventhandler.SubscribeEvent; import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import cpw.mods.fml.common.registry.GameRegistry;
@Mod(modid = "MekanismTools", name = "MekanismTools", version = "8.0.0", dependencies = "required-after:Mekanism", guiFactory = "mekanism.tools.client.gui.ToolsGuiFactory") @Mod(modid = "MekanismTools", name = "MekanismTools", version = "8.0.0", dependencies = "required-after:Mekanism", guiFactory = "mekanism.tools.client.gui.ToolsGuiFactory")
public class MekanismTools implements IModule public class MekanismTools implements IModule
@ -64,6 +64,12 @@ public class MekanismTools implements IModule
public static ArmorMaterial armorGLOWSTONE; public static ArmorMaterial armorGLOWSTONE;
public static ArmorMaterial armorSTEEL; public static ArmorMaterial armorSTEEL;
@EventHandler
public void preInit(FMLPreInitializationEvent event)
{
addItems();
}
@EventHandler @EventHandler
public void init(FMLInitializationEvent event) public void init(FMLInitializationEvent event)
{ {
@ -78,7 +84,6 @@ public class MekanismTools implements IModule
proxy.loadConfiguration(); proxy.loadConfiguration();
//Load this module //Load this module
addItems();
addRecipes(); addRecipes();
//Finalization //Finalization
@ -89,211 +94,211 @@ public class MekanismTools implements IModule
{ {
//Crafting Recipes //Crafting Recipes
//Base //Base
CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MekanismToolsItems.WoodPaxel, 1), new Object[] { CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(ToolsItems.WoodPaxel, 1), new Object[] {
"XYZ", " T ", " T ", Character.valueOf('X'), Items.wooden_axe, Character.valueOf('Y'), Items.wooden_pickaxe, Character.valueOf('Z'), Items.wooden_shovel, Character.valueOf('T'), Items.stick "XYZ", " T ", " T ", Character.valueOf('X'), Items.wooden_axe, Character.valueOf('Y'), Items.wooden_pickaxe, Character.valueOf('Z'), Items.wooden_shovel, Character.valueOf('T'), Items.stick
})); }));
CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MekanismToolsItems.StonePaxel, 1), new Object[] { CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(ToolsItems.StonePaxel, 1), new Object[] {
"XYZ", " T ", " T ", Character.valueOf('X'), Items.stone_axe, Character.valueOf('Y'), Items.stone_pickaxe, Character.valueOf('Z'), Items.stone_shovel, Character.valueOf('T'), Items.stick "XYZ", " T ", " T ", Character.valueOf('X'), Items.stone_axe, Character.valueOf('Y'), Items.stone_pickaxe, Character.valueOf('Z'), Items.stone_shovel, Character.valueOf('T'), Items.stick
})); }));
CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MekanismToolsItems.IronPaxel, 1), new Object[] { CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(ToolsItems.IronPaxel, 1), new Object[] {
"XYZ", " T ", " T ", Character.valueOf('X'), Items.iron_axe, Character.valueOf('Y'), Items.iron_pickaxe, Character.valueOf('Z'), Items.iron_shovel, Character.valueOf('T'), Items.stick "XYZ", " T ", " T ", Character.valueOf('X'), Items.iron_axe, Character.valueOf('Y'), Items.iron_pickaxe, Character.valueOf('Z'), Items.iron_shovel, Character.valueOf('T'), Items.stick
})); }));
CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MekanismToolsItems.DiamondPaxel, 1), new Object[] { CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(ToolsItems.DiamondPaxel, 1), new Object[] {
"XYZ", " T ", " T ", Character.valueOf('X'), Items.diamond_axe, Character.valueOf('Y'), Items.diamond_pickaxe, Character.valueOf('Z'), Items.diamond_shovel, Character.valueOf('T'), Items.stick "XYZ", " T ", " T ", Character.valueOf('X'), Items.diamond_axe, Character.valueOf('Y'), Items.diamond_pickaxe, Character.valueOf('Z'), Items.diamond_shovel, Character.valueOf('T'), Items.stick
})); }));
CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MekanismToolsItems.GoldPaxel, 1), new Object[] { CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(ToolsItems.GoldPaxel, 1), new Object[] {
"XYZ", " T ", " T ", Character.valueOf('X'), Items.golden_axe, Character.valueOf('Y'), Items.golden_pickaxe, Character.valueOf('Z'), Items.golden_shovel, Character.valueOf('T'), Items.stick "XYZ", " T ", " T ", Character.valueOf('X'), Items.golden_axe, Character.valueOf('Y'), Items.golden_pickaxe, Character.valueOf('Z'), Items.golden_shovel, Character.valueOf('T'), Items.stick
})); }));
//Obsidian //Obsidian
CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MekanismToolsItems.ObsidianHelmet, 1), new Object[] { CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(ToolsItems.ObsidianHelmet, 1), new Object[] {
"***", "* *", Character.valueOf('*'), "ingotRefinedObsidian" "***", "* *", Character.valueOf('*'), "ingotRefinedObsidian"
})); }));
CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MekanismToolsItems.ObsidianChestplate, 1), new Object[] { CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(ToolsItems.ObsidianChestplate, 1), new Object[] {
"* *", "***", "***", Character.valueOf('*'), "ingotRefinedObsidian" "* *", "***", "***", Character.valueOf('*'), "ingotRefinedObsidian"
})); }));
CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MekanismToolsItems.ObsidianLeggings, 1), new Object[] { CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(ToolsItems.ObsidianLeggings, 1), new Object[] {
"***", "* *", "* *", Character.valueOf('*'), "ingotRefinedObsidian" "***", "* *", "* *", Character.valueOf('*'), "ingotRefinedObsidian"
})); }));
CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MekanismToolsItems.ObsidianBoots, 1), new Object[] { CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(ToolsItems.ObsidianBoots, 1), new Object[] {
"* *", "* *", Character.valueOf('*'), "ingotRefinedObsidian" "* *", "* *", Character.valueOf('*'), "ingotRefinedObsidian"
})); }));
CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MekanismToolsItems.ObsidianPaxel, 1), new Object[] { CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(ToolsItems.ObsidianPaxel, 1), new Object[] {
"XYZ", " T ", " T ", Character.valueOf('X'), MekanismToolsItems.ObsidianAxe, Character.valueOf('Y'), MekanismToolsItems.ObsidianPickaxe, Character.valueOf('Z'), MekanismToolsItems.ObsidianShovel, Character.valueOf('T'), Items.stick "XYZ", " T ", " T ", Character.valueOf('X'), ToolsItems.ObsidianAxe, Character.valueOf('Y'), ToolsItems.ObsidianPickaxe, Character.valueOf('Z'), ToolsItems.ObsidianShovel, Character.valueOf('T'), Items.stick
})); }));
CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MekanismToolsItems.ObsidianPickaxe, 1), new Object[] { CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(ToolsItems.ObsidianPickaxe, 1), new Object[] {
"XXX", " T ", " T ", Character.valueOf('X'), "ingotRefinedObsidian", Character.valueOf('T'), Items.stick "XXX", " T ", " T ", Character.valueOf('X'), "ingotRefinedObsidian", Character.valueOf('T'), Items.stick
})); }));
CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MekanismToolsItems.ObsidianAxe, 1), new Object[] { CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(ToolsItems.ObsidianAxe, 1), new Object[] {
"XX", "XT", " T", Character.valueOf('X'), "ingotRefinedObsidian", Character.valueOf('T'), Items.stick "XX", "XT", " T", Character.valueOf('X'), "ingotRefinedObsidian", Character.valueOf('T'), Items.stick
})); }));
CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MekanismToolsItems.ObsidianShovel, 1), new Object[] { CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(ToolsItems.ObsidianShovel, 1), new Object[] {
"X", "T", "T", Character.valueOf('X'), "ingotRefinedObsidian", Character.valueOf('T'), Items.stick "X", "T", "T", Character.valueOf('X'), "ingotRefinedObsidian", Character.valueOf('T'), Items.stick
})); }));
CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MekanismToolsItems.ObsidianHoe, 1), new Object[] { CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(ToolsItems.ObsidianHoe, 1), new Object[] {
"XX", " T", " T", Character.valueOf('X'), "ingotRefinedObsidian", Character.valueOf('T'), Items.stick "XX", " T", " T", Character.valueOf('X'), "ingotRefinedObsidian", Character.valueOf('T'), Items.stick
})); }));
CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MekanismToolsItems.ObsidianSword, 1), new Object[] { CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(ToolsItems.ObsidianSword, 1), new Object[] {
"X", "X", "T", Character.valueOf('X'), "ingotRefinedObsidian", Character.valueOf('T'), Items.stick "X", "X", "T", Character.valueOf('X'), "ingotRefinedObsidian", Character.valueOf('T'), Items.stick
})); }));
//Glowstone //Glowstone
CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MekanismToolsItems.GlowstonePaxel, 1), new Object[] { CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(ToolsItems.GlowstonePaxel, 1), new Object[] {
"XYZ", " T ", " T ", Character.valueOf('X'), MekanismToolsItems.GlowstoneAxe, Character.valueOf('Y'), MekanismToolsItems.GlowstonePickaxe, Character.valueOf('Z'), MekanismToolsItems.GlowstoneShovel, Character.valueOf('T'), Items.stick "XYZ", " T ", " T ", Character.valueOf('X'), ToolsItems.GlowstoneAxe, Character.valueOf('Y'), ToolsItems.GlowstonePickaxe, Character.valueOf('Z'), ToolsItems.GlowstoneShovel, Character.valueOf('T'), Items.stick
})); }));
CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MekanismToolsItems.GlowstonePickaxe, 1), new Object[] { CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(ToolsItems.GlowstonePickaxe, 1), new Object[] {
"XXX", " T ", " T ", Character.valueOf('X'), "ingotRefinedGlowstone", Character.valueOf('T'), Items.stick "XXX", " T ", " T ", Character.valueOf('X'), "ingotRefinedGlowstone", Character.valueOf('T'), Items.stick
})); }));
CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MekanismToolsItems.GlowstoneAxe, 1), new Object[] { CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(ToolsItems.GlowstoneAxe, 1), new Object[] {
"XX", "XT", " T", Character.valueOf('X'), "ingotRefinedGlowstone", Character.valueOf('T'), Items.stick "XX", "XT", " T", Character.valueOf('X'), "ingotRefinedGlowstone", Character.valueOf('T'), Items.stick
})); }));
CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MekanismToolsItems.GlowstoneShovel, 1), new Object[] { CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(ToolsItems.GlowstoneShovel, 1), new Object[] {
"X", "T", "T", Character.valueOf('X'), "ingotRefinedGlowstone", Character.valueOf('T'), Items.stick "X", "T", "T", Character.valueOf('X'), "ingotRefinedGlowstone", Character.valueOf('T'), Items.stick
})); }));
CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MekanismToolsItems.GlowstoneHoe, 1), new Object[] { CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(ToolsItems.GlowstoneHoe, 1), new Object[] {
"XX", " T", " T", Character.valueOf('X'), "ingotRefinedGlowstone", Character.valueOf('T'), Items.stick "XX", " T", " T", Character.valueOf('X'), "ingotRefinedGlowstone", Character.valueOf('T'), Items.stick
})); }));
CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MekanismToolsItems.GlowstoneSword, 1), new Object[] { CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(ToolsItems.GlowstoneSword, 1), new Object[] {
"X", "X", "T", Character.valueOf('X'), "ingotRefinedGlowstone", Character.valueOf('T'), Items.stick "X", "X", "T", Character.valueOf('X'), "ingotRefinedGlowstone", Character.valueOf('T'), Items.stick
})); }));
CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MekanismToolsItems.GlowstoneHelmet, 1), new Object[] { CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(ToolsItems.GlowstoneHelmet, 1), new Object[] {
"***", "* *", Character.valueOf('*'), "ingotRefinedGlowstone" "***", "* *", Character.valueOf('*'), "ingotRefinedGlowstone"
})); }));
CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MekanismToolsItems.GlowstoneChestplate, 1), new Object[] { CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(ToolsItems.GlowstoneChestplate, 1), new Object[] {
"* *", "***", "***", Character.valueOf('*'), "ingotRefinedGlowstone" "* *", "***", "***", Character.valueOf('*'), "ingotRefinedGlowstone"
})); }));
CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MekanismToolsItems.GlowstoneLeggings, 1), new Object[] { CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(ToolsItems.GlowstoneLeggings, 1), new Object[] {
"***", "* *", "* *", Character.valueOf('*'), "ingotRefinedGlowstone" "***", "* *", "* *", Character.valueOf('*'), "ingotRefinedGlowstone"
})); }));
CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MekanismToolsItems.GlowstoneBoots, 1), new Object[] { CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(ToolsItems.GlowstoneBoots, 1), new Object[] {
"* *", "* *", Character.valueOf('*'), "ingotRefinedGlowstone" "* *", "* *", Character.valueOf('*'), "ingotRefinedGlowstone"
})); }));
//Lazuli //Lazuli
CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MekanismToolsItems.LazuliHelmet, 1), new Object[] { CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(ToolsItems.LazuliHelmet, 1), new Object[] {
"***", "* *", Character.valueOf('*'), new ItemStack(Items.dye, 1, 4) "***", "* *", Character.valueOf('*'), new ItemStack(Items.dye, 1, 4)
})); }));
CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MekanismToolsItems.LazuliChestplate, 1), new Object[] { CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(ToolsItems.LazuliChestplate, 1), new Object[] {
"* *", "***", "***", Character.valueOf('*'), new ItemStack(Items.dye, 1, 4) "* *", "***", "***", Character.valueOf('*'), new ItemStack(Items.dye, 1, 4)
})); }));
CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MekanismToolsItems.LazuliLeggings, 1), new Object[] { CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(ToolsItems.LazuliLeggings, 1), new Object[] {
"***", "* *", "* *", Character.valueOf('*'), new ItemStack(Items.dye, 1, 4) "***", "* *", "* *", Character.valueOf('*'), new ItemStack(Items.dye, 1, 4)
})); }));
CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MekanismToolsItems.LazuliBoots, 1), new Object[] { CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(ToolsItems.LazuliBoots, 1), new Object[] {
"* *", "* *", Character.valueOf('*'), new ItemStack(Items.dye, 1, 4) "* *", "* *", Character.valueOf('*'), new ItemStack(Items.dye, 1, 4)
})); }));
CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MekanismToolsItems.LazuliPaxel, 1), new Object[] { CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(ToolsItems.LazuliPaxel, 1), new Object[] {
"XYZ", " T ", " T ", Character.valueOf('X'), MekanismToolsItems.LazuliAxe, Character.valueOf('Y'), MekanismToolsItems.LazuliPickaxe, Character.valueOf('Z'), MekanismToolsItems.LazuliShovel, Character.valueOf('T'), Items.stick "XYZ", " T ", " T ", Character.valueOf('X'), ToolsItems.LazuliAxe, Character.valueOf('Y'), ToolsItems.LazuliPickaxe, Character.valueOf('Z'), ToolsItems.LazuliShovel, Character.valueOf('T'), Items.stick
})); }));
CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MekanismToolsItems.LazuliPickaxe, 1), new Object[] { CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(ToolsItems.LazuliPickaxe, 1), new Object[] {
"XXX", " T ", " T ", Character.valueOf('X'), new ItemStack(Items.dye, 1, 4), Character.valueOf('T'), Items.stick "XXX", " T ", " T ", Character.valueOf('X'), new ItemStack(Items.dye, 1, 4), Character.valueOf('T'), Items.stick
})); }));
CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MekanismToolsItems.LazuliAxe, 1), new Object[] { CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(ToolsItems.LazuliAxe, 1), new Object[] {
"XX", "XT", " T", Character.valueOf('X'), new ItemStack(Items.dye, 1, 4), Character.valueOf('T'), Items.stick "XX", "XT", " T", Character.valueOf('X'), new ItemStack(Items.dye, 1, 4), Character.valueOf('T'), Items.stick
})); }));
CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MekanismToolsItems.LazuliShovel, 1), new Object[] { CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(ToolsItems.LazuliShovel, 1), new Object[] {
"X", "T", "T", Character.valueOf('X'), new ItemStack(Items.dye, 1, 4), Character.valueOf('T'), Items.stick "X", "T", "T", Character.valueOf('X'), new ItemStack(Items.dye, 1, 4), Character.valueOf('T'), Items.stick
})); }));
CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MekanismToolsItems.LazuliHoe, 1), new Object[] { CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(ToolsItems.LazuliHoe, 1), new Object[] {
"XX", " T", " T", Character.valueOf('X'), new ItemStack(Items.dye, 1, 4), Character.valueOf('T'), Items.stick "XX", " T", " T", Character.valueOf('X'), new ItemStack(Items.dye, 1, 4), Character.valueOf('T'), Items.stick
})); }));
CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MekanismToolsItems.LazuliSword, 1), new Object[] { CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(ToolsItems.LazuliSword, 1), new Object[] {
"X", "X", "T", Character.valueOf('X'), new ItemStack(Items.dye, 1, 4), Character.valueOf('T'), Items.stick "X", "X", "T", Character.valueOf('X'), new ItemStack(Items.dye, 1, 4), Character.valueOf('T'), Items.stick
})); }));
//Osmium //Osmium
CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MekanismToolsItems.OsmiumPaxel, 1), new Object[] { CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(ToolsItems.OsmiumPaxel, 1), new Object[] {
"XYZ", " T ", " T ", Character.valueOf('X'), MekanismToolsItems.OsmiumAxe, Character.valueOf('Y'), MekanismToolsItems.OsmiumPickaxe, Character.valueOf('Z'), MekanismToolsItems.OsmiumShovel, Character.valueOf('T'), Items.stick "XYZ", " T ", " T ", Character.valueOf('X'), ToolsItems.OsmiumAxe, Character.valueOf('Y'), ToolsItems.OsmiumPickaxe, Character.valueOf('Z'), ToolsItems.OsmiumShovel, Character.valueOf('T'), Items.stick
})); }));
CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MekanismToolsItems.OsmiumPickaxe, 1), new Object[] { CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(ToolsItems.OsmiumPickaxe, 1), new Object[] {
"XXX", " T ", " T ", Character.valueOf('X'), "ingotOsmium", Character.valueOf('T'), Items.stick "XXX", " T ", " T ", Character.valueOf('X'), "ingotOsmium", Character.valueOf('T'), Items.stick
})); }));
CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MekanismToolsItems.OsmiumAxe, 1), new Object[] { CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(ToolsItems.OsmiumAxe, 1), new Object[] {
"XX", "XT", " T", Character.valueOf('X'), "ingotOsmium", Character.valueOf('T'), Items.stick "XX", "XT", " T", Character.valueOf('X'), "ingotOsmium", Character.valueOf('T'), Items.stick
})); }));
CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MekanismToolsItems.OsmiumShovel, 1), new Object[] { CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(ToolsItems.OsmiumShovel, 1), new Object[] {
"X", "T", "T", Character.valueOf('X'), "ingotOsmium", Character.valueOf('T'), Items.stick "X", "T", "T", Character.valueOf('X'), "ingotOsmium", Character.valueOf('T'), Items.stick
})); }));
CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MekanismToolsItems.OsmiumHoe, 1), new Object[] { CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(ToolsItems.OsmiumHoe, 1), new Object[] {
"XX", " T", " T", Character.valueOf('X'), "ingotOsmium", Character.valueOf('T'), Items.stick "XX", " T", " T", Character.valueOf('X'), "ingotOsmium", Character.valueOf('T'), Items.stick
})); }));
CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MekanismToolsItems.OsmiumSword, 1), new Object[] { CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(ToolsItems.OsmiumSword, 1), new Object[] {
"X", "X", "T", Character.valueOf('X'), "ingotOsmium", Character.valueOf('T'), Items.stick "X", "X", "T", Character.valueOf('X'), "ingotOsmium", Character.valueOf('T'), Items.stick
})); }));
CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MekanismToolsItems.OsmiumHelmet, 1), new Object[] { CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(ToolsItems.OsmiumHelmet, 1), new Object[] {
"***", "* *", Character.valueOf('*'), "ingotOsmium" "***", "* *", Character.valueOf('*'), "ingotOsmium"
})); }));
CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MekanismToolsItems.OsmiumChestplate, 1), new Object[] { CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(ToolsItems.OsmiumChestplate, 1), new Object[] {
"* *", "***", "***", Character.valueOf('*'), "ingotOsmium" "* *", "***", "***", Character.valueOf('*'), "ingotOsmium"
})); }));
CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MekanismToolsItems.OsmiumLeggings, 1), new Object[] { CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(ToolsItems.OsmiumLeggings, 1), new Object[] {
"***", "* *", "* *", Character.valueOf('*'), "ingotOsmium" "***", "* *", "* *", Character.valueOf('*'), "ingotOsmium"
})); }));
CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MekanismToolsItems.OsmiumBoots, 1), new Object[] { CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(ToolsItems.OsmiumBoots, 1), new Object[] {
"* *", "* *", Character.valueOf('*'), "ingotOsmium" "* *", "* *", Character.valueOf('*'), "ingotOsmium"
})); }));
//Bronze //Bronze
CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MekanismToolsItems.BronzePaxel, 1), new Object[] { CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(ToolsItems.BronzePaxel, 1), new Object[] {
"XYZ", " T ", " T ", Character.valueOf('X'), MekanismToolsItems.BronzeAxe, Character.valueOf('Y'), MekanismToolsItems.BronzePickaxe, Character.valueOf('Z'), MekanismToolsItems.BronzeShovel, Character.valueOf('T'), Items.stick "XYZ", " T ", " T ", Character.valueOf('X'), ToolsItems.BronzeAxe, Character.valueOf('Y'), ToolsItems.BronzePickaxe, Character.valueOf('Z'), ToolsItems.BronzeShovel, Character.valueOf('T'), Items.stick
})); }));
CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MekanismToolsItems.BronzePickaxe, 1), new Object[] { CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(ToolsItems.BronzePickaxe, 1), new Object[] {
"XXX", " T ", " T ", Character.valueOf('X'), "ingotBronze", Character.valueOf('T'), Items.stick "XXX", " T ", " T ", Character.valueOf('X'), "ingotBronze", Character.valueOf('T'), Items.stick
})); }));
CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MekanismToolsItems.BronzeAxe, 1), new Object[] { CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(ToolsItems.BronzeAxe, 1), new Object[] {
"XX", "XT", " T", Character.valueOf('X'), "ingotBronze", Character.valueOf('T'), Items.stick "XX", "XT", " T", Character.valueOf('X'), "ingotBronze", Character.valueOf('T'), Items.stick
})); }));
CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MekanismToolsItems.BronzeShovel, 1), new Object[] { CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(ToolsItems.BronzeShovel, 1), new Object[] {
"X", "T", "T", Character.valueOf('X'), "ingotBronze", Character.valueOf('T'), Items.stick "X", "T", "T", Character.valueOf('X'), "ingotBronze", Character.valueOf('T'), Items.stick
})); }));
CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MekanismToolsItems.BronzeHoe, 1), new Object[] { CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(ToolsItems.BronzeHoe, 1), new Object[] {
"XX", " T", " T", Character.valueOf('X'), "ingotBronze", Character.valueOf('T'), Items.stick "XX", " T", " T", Character.valueOf('X'), "ingotBronze", Character.valueOf('T'), Items.stick
})); }));
CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MekanismToolsItems.BronzeSword, 1), new Object[] { CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(ToolsItems.BronzeSword, 1), new Object[] {
"X", "X", "T", Character.valueOf('X'), "ingotBronze", Character.valueOf('T'), Items.stick "X", "X", "T", Character.valueOf('X'), "ingotBronze", Character.valueOf('T'), Items.stick
})); }));
CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MekanismToolsItems.BronzeHelmet, 1), new Object[] { CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(ToolsItems.BronzeHelmet, 1), new Object[] {
"***", "* *", Character.valueOf('*'), "ingotBronze" "***", "* *", Character.valueOf('*'), "ingotBronze"
})); }));
CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MekanismToolsItems.BronzeChestplate, 1), new Object[] { CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(ToolsItems.BronzeChestplate, 1), new Object[] {
"* *", "***", "***", Character.valueOf('*'), "ingotBronze" "* *", "***", "***", Character.valueOf('*'), "ingotBronze"
})); }));
CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MekanismToolsItems.BronzeLeggings, 1), new Object[] { CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(ToolsItems.BronzeLeggings, 1), new Object[] {
"***", "* *", "* *", Character.valueOf('*'), "ingotBronze" "***", "* *", "* *", Character.valueOf('*'), "ingotBronze"
})); }));
CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MekanismToolsItems.BronzeBoots, 1), new Object[] { CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(ToolsItems.BronzeBoots, 1), new Object[] {
"* *", "* *", Character.valueOf('*'), "ingotBronze" "* *", "* *", Character.valueOf('*'), "ingotBronze"
})); }));
//Steel //Steel
CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MekanismToolsItems.SteelPaxel, 1), new Object[] { CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(ToolsItems.SteelPaxel, 1), new Object[] {
"XYZ", " I ", " I ", Character.valueOf('X'), MekanismToolsItems.SteelAxe, Character.valueOf('Y'), MekanismToolsItems.SteelPickaxe, Character.valueOf('Z'), MekanismToolsItems.SteelShovel, Character.valueOf('I'), Items.iron_ingot "XYZ", " I ", " I ", Character.valueOf('X'), ToolsItems.SteelAxe, Character.valueOf('Y'), ToolsItems.SteelPickaxe, Character.valueOf('Z'), ToolsItems.SteelShovel, Character.valueOf('I'), Items.iron_ingot
})); }));
CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MekanismToolsItems.SteelPickaxe, 1), new Object[] { CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(ToolsItems.SteelPickaxe, 1), new Object[] {
"XXX", " I ", " I ", Character.valueOf('X'), "ingotSteel", Character.valueOf('I'), Items.iron_ingot "XXX", " I ", " I ", Character.valueOf('X'), "ingotSteel", Character.valueOf('I'), Items.iron_ingot
})); }));
CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MekanismToolsItems.SteelAxe, 1), new Object[] { CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(ToolsItems.SteelAxe, 1), new Object[] {
"XX", "XI", " I", Character.valueOf('X'), "ingotSteel", Character.valueOf('I'), Items.iron_ingot "XX", "XI", " I", Character.valueOf('X'), "ingotSteel", Character.valueOf('I'), Items.iron_ingot
})); }));
CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MekanismToolsItems.SteelShovel, 1), new Object[] { CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(ToolsItems.SteelShovel, 1), new Object[] {
"X", "I", "I", Character.valueOf('X'), "ingotSteel", Character.valueOf('I'), Items.iron_ingot "X", "I", "I", Character.valueOf('X'), "ingotSteel", Character.valueOf('I'), Items.iron_ingot
})); }));
CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MekanismToolsItems.SteelHoe, 1), new Object[] { CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(ToolsItems.SteelHoe, 1), new Object[] {
"XX", " I", " I", Character.valueOf('X'), "ingotSteel", Character.valueOf('I'), Items.iron_ingot "XX", " I", " I", Character.valueOf('X'), "ingotSteel", Character.valueOf('I'), Items.iron_ingot
})); }));
CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MekanismToolsItems.SteelSword, 1), new Object[] { CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(ToolsItems.SteelSword, 1), new Object[] {
"X", "X", "I", Character.valueOf('X'), "ingotSteel", Character.valueOf('I'), Items.iron_ingot "X", "X", "I", Character.valueOf('X'), "ingotSteel", Character.valueOf('I'), Items.iron_ingot
})); }));
CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MekanismToolsItems.SteelHelmet, 1), new Object[] { CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(ToolsItems.SteelHelmet, 1), new Object[] {
"***", "I I", Character.valueOf('*'), "ingotSteel", Character.valueOf('I'), Items.iron_ingot "***", "I I", Character.valueOf('*'), "ingotSteel", Character.valueOf('I'), Items.iron_ingot
})); }));
CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MekanismToolsItems.SteelChestplate, 1), new Object[] { CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(ToolsItems.SteelChestplate, 1), new Object[] {
"I I", "*I*", "***", Character.valueOf('*'), "ingotSteel", Character.valueOf('I'), Items.iron_ingot "I I", "*I*", "***", Character.valueOf('*'), "ingotSteel", Character.valueOf('I'), Items.iron_ingot
})); }));
CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MekanismToolsItems.SteelLeggings, 1), new Object[] { CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(ToolsItems.SteelLeggings, 1), new Object[] {
"I*I", "* *", "* *", Character.valueOf('*'), "ingotSteel", Character.valueOf('I'), Items.iron_ingot "I*I", "* *", "* *", Character.valueOf('*'), "ingotSteel", Character.valueOf('I'), Items.iron_ingot
})); }));
CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MekanismToolsItems.SteelBoots, 1), new Object[] { CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(ToolsItems.SteelBoots, 1), new Object[] {
"I *", "* I", Character.valueOf('*'), "ingotSteel", Character.valueOf('I'), Items.iron_ingot "I *", "* I", Character.valueOf('*'), "ingotSteel", Character.valueOf('I'), Items.iron_ingot
})); }));
} }
@ -453,90 +458,14 @@ public class MekanismTools implements IModule
} }
, Mekanism.configuration.get("tools.armor-balance.steel", "enchantability", 10).getInt() , Mekanism.configuration.get("tools.armor-balance.steel", "enchantability", 10).getInt()
); );
if(Mekanism.configuration.hasChanged())
{
Mekanism.configuration.save(); Mekanism.configuration.save();
}
MekanismToolsItems.initializeItems(); ToolsItems.initializeItems();
MekanismToolsItems.setHarvestLevels(); ToolsItems.setHarvestLevels();
ToolsItems.register();
//Registrations
//Base
GameRegistry.registerItem(MekanismToolsItems.WoodPaxel, "WoodPaxel");
GameRegistry.registerItem(MekanismToolsItems.StonePaxel, "StonePaxel");
GameRegistry.registerItem(MekanismToolsItems.IronPaxel, "IronPaxel");
GameRegistry.registerItem(MekanismToolsItems.DiamondPaxel, "DiamondPaxel");
GameRegistry.registerItem(MekanismToolsItems.GoldPaxel, "GoldPaxel");
//Obsidian
GameRegistry.registerItem(MekanismToolsItems.ObsidianHelmet, "ObsidianHelmet");
GameRegistry.registerItem(MekanismToolsItems.ObsidianChestplate, "ObsidianChestplate");
GameRegistry.registerItem(MekanismToolsItems.ObsidianLeggings, "ObsidianLeggings");
GameRegistry.registerItem(MekanismToolsItems.ObsidianBoots, "ObsidianBoots");
GameRegistry.registerItem(MekanismToolsItems.ObsidianPaxel, "ObsidianPaxel");
GameRegistry.registerItem(MekanismToolsItems.ObsidianPickaxe, "ObsidianPickaxe");
GameRegistry.registerItem(MekanismToolsItems.ObsidianAxe, "ObsidianAxe");
GameRegistry.registerItem(MekanismToolsItems.ObsidianShovel, "ObsidianShovel");
GameRegistry.registerItem(MekanismToolsItems.ObsidianHoe, "ObsidianHoe");
GameRegistry.registerItem(MekanismToolsItems.ObsidianSword, "ObsidianSword");
//Lazuli
GameRegistry.registerItem(MekanismToolsItems.LazuliHelmet, "LapisLazuliHelmet");
GameRegistry.registerItem(MekanismToolsItems.LazuliChestplate, "LapisLazuliChestplate");
GameRegistry.registerItem(MekanismToolsItems.LazuliLeggings, "LapisLazuliLeggings");
GameRegistry.registerItem(MekanismToolsItems.LazuliBoots, "LapisLazuliBoots");
GameRegistry.registerItem(MekanismToolsItems.LazuliPaxel, "LapisLazuliPaxel");
GameRegistry.registerItem(MekanismToolsItems.LazuliPickaxe, "LapisLazuliPickaxe");
GameRegistry.registerItem(MekanismToolsItems.LazuliAxe, "LapisLazuliAxe");
GameRegistry.registerItem(MekanismToolsItems.LazuliShovel, "LapisLazuliShovel");
GameRegistry.registerItem(MekanismToolsItems.LazuliHoe, "LapisLazuliHoe");
GameRegistry.registerItem(MekanismToolsItems.LazuliSword, "LapisLazuliSword");
//Osmium
GameRegistry.registerItem(MekanismToolsItems.OsmiumHelmet, "OsmiumHelmet");
GameRegistry.registerItem(MekanismToolsItems.OsmiumChestplate, "OsmiumChestplate");
GameRegistry.registerItem(MekanismToolsItems.OsmiumLeggings, "OsmiumLeggings");
GameRegistry.registerItem(MekanismToolsItems.OsmiumBoots, "OsmiumBoots");
GameRegistry.registerItem(MekanismToolsItems.OsmiumPaxel, "OsmiumPaxel");
GameRegistry.registerItem(MekanismToolsItems.OsmiumPickaxe, "OsmiumPickaxe");
GameRegistry.registerItem(MekanismToolsItems.OsmiumAxe, "OsmiumAxe");
GameRegistry.registerItem(MekanismToolsItems.OsmiumShovel, "OsmiumShovel");
GameRegistry.registerItem(MekanismToolsItems.OsmiumHoe, "OsmiumHoe");
GameRegistry.registerItem(MekanismToolsItems.OsmiumSword, "OsmiumSword");
//Redstone
GameRegistry.registerItem(MekanismToolsItems.BronzeHelmet, "BronzeHelmet");
GameRegistry.registerItem(MekanismToolsItems.BronzeChestplate, "BronzeChestplate");
GameRegistry.registerItem(MekanismToolsItems.BronzeLeggings, "BronzeLeggings");
GameRegistry.registerItem(MekanismToolsItems.BronzeBoots, "BronzeBoots");
GameRegistry.registerItem(MekanismToolsItems.BronzePaxel, "BronzePaxel");
GameRegistry.registerItem(MekanismToolsItems.BronzePickaxe, "BronzePickaxe");
GameRegistry.registerItem(MekanismToolsItems.BronzeAxe, "BronzeAxe");
GameRegistry.registerItem(MekanismToolsItems.BronzeShovel, "BronzeShovel");
GameRegistry.registerItem(MekanismToolsItems.BronzeHoe, "BronzeHoe");
GameRegistry.registerItem(MekanismToolsItems.BronzeSword, "BronzeSword");
//Glowstone
GameRegistry.registerItem(MekanismToolsItems.GlowstonePaxel, "GlowstonePaxel");
GameRegistry.registerItem(MekanismToolsItems.GlowstonePickaxe, "GlowstonePickaxe");
GameRegistry.registerItem(MekanismToolsItems.GlowstoneAxe, "GlowstoneAxe");
GameRegistry.registerItem(MekanismToolsItems.GlowstoneShovel, "GlowstoneShovel");
GameRegistry.registerItem(MekanismToolsItems.GlowstoneHoe, "GlowstoneHoe");
GameRegistry.registerItem(MekanismToolsItems.GlowstoneSword, "GlowstoneSword");
GameRegistry.registerItem(MekanismToolsItems.GlowstoneHelmet, "GlowstoneHelmet");
GameRegistry.registerItem(MekanismToolsItems.GlowstoneChestplate, "GlowstoneChestplate");
GameRegistry.registerItem(MekanismToolsItems.GlowstoneLeggings, "GlowstoneLeggings");
GameRegistry.registerItem(MekanismToolsItems.GlowstoneBoots, "GlowstoneBoots");
//Steel
GameRegistry.registerItem(MekanismToolsItems.SteelPaxel, "SteelPaxel");
GameRegistry.registerItem(MekanismToolsItems.SteelPickaxe, "SteelPickaxe");
GameRegistry.registerItem(MekanismToolsItems.SteelAxe, "SteelAxe");
GameRegistry.registerItem(MekanismToolsItems.SteelShovel, "SteelShovel");
GameRegistry.registerItem(MekanismToolsItems.SteelHoe, "SteelHoe");
GameRegistry.registerItem(MekanismToolsItems.SteelSword, "SteelSword");
GameRegistry.registerItem(MekanismToolsItems.SteelHelmet, "SteelHelmet");
GameRegistry.registerItem(MekanismToolsItems.SteelChestplate, "SteelChestplate");
GameRegistry.registerItem(MekanismToolsItems.SteelLeggings, "SteelLeggings");
GameRegistry.registerItem(MekanismToolsItems.SteelBoots, "SteelBoots");
} }
@SubscribeEvent @SubscribeEvent
@ -557,43 +486,43 @@ public class MekanismTools implements IModule
if(armorType == 0) if(armorType == 0)
{ {
if(event.entityLiving instanceof EntityZombie && sword < 50) event.entityLiving.setCurrentItemOrArmor(0, new ItemStack(MekanismToolsItems.GlowstoneSword)); if(event.entityLiving instanceof EntityZombie && sword < 50) event.entityLiving.setCurrentItemOrArmor(0, new ItemStack(ToolsItems.GlowstoneSword));
if(helmet < 50) event.entityLiving.setCurrentItemOrArmor(1, new ItemStack(MekanismToolsItems.GlowstoneHelmet)); if(helmet < 50) event.entityLiving.setCurrentItemOrArmor(1, new ItemStack(ToolsItems.GlowstoneHelmet));
if(chestplate < 50) event.entityLiving.setCurrentItemOrArmor(2, new ItemStack(MekanismToolsItems.GlowstoneChestplate)); if(chestplate < 50) event.entityLiving.setCurrentItemOrArmor(2, new ItemStack(ToolsItems.GlowstoneChestplate));
if(leggings < 50) event.entityLiving.setCurrentItemOrArmor(3, new ItemStack(MekanismToolsItems.GlowstoneLeggings)); if(leggings < 50) event.entityLiving.setCurrentItemOrArmor(3, new ItemStack(ToolsItems.GlowstoneLeggings));
if(boots < 50) event.entityLiving.setCurrentItemOrArmor(4, new ItemStack(MekanismToolsItems.GlowstoneBoots)); if(boots < 50) event.entityLiving.setCurrentItemOrArmor(4, new ItemStack(ToolsItems.GlowstoneBoots));
} }
else if(armorType == 1) else if(armorType == 1)
{ {
if(event.entityLiving instanceof EntityZombie && sword < 50) event.entityLiving.setCurrentItemOrArmor(0, new ItemStack(MekanismToolsItems.LazuliSword)); if(event.entityLiving instanceof EntityZombie && sword < 50) event.entityLiving.setCurrentItemOrArmor(0, new ItemStack(ToolsItems.LazuliSword));
if(helmet < 50) event.entityLiving.setCurrentItemOrArmor(1, new ItemStack(MekanismToolsItems.LazuliHelmet)); if(helmet < 50) event.entityLiving.setCurrentItemOrArmor(1, new ItemStack(ToolsItems.LazuliHelmet));
if(chestplate < 50) event.entityLiving.setCurrentItemOrArmor(2, new ItemStack(MekanismToolsItems.LazuliChestplate)); if(chestplate < 50) event.entityLiving.setCurrentItemOrArmor(2, new ItemStack(ToolsItems.LazuliChestplate));
if(leggings < 50) event.entityLiving.setCurrentItemOrArmor(3, new ItemStack(MekanismToolsItems.LazuliLeggings)); if(leggings < 50) event.entityLiving.setCurrentItemOrArmor(3, new ItemStack(ToolsItems.LazuliLeggings));
if(boots < 50) event.entityLiving.setCurrentItemOrArmor(4, new ItemStack(MekanismToolsItems.LazuliBoots)); if(boots < 50) event.entityLiving.setCurrentItemOrArmor(4, new ItemStack(ToolsItems.LazuliBoots));
} }
else if(armorType == 2) else if(armorType == 2)
{ {
if(event.entityLiving instanceof EntityZombie && sword < 50) event.entityLiving.setCurrentItemOrArmor(0, new ItemStack(MekanismToolsItems.OsmiumSword)); if(event.entityLiving instanceof EntityZombie && sword < 50) event.entityLiving.setCurrentItemOrArmor(0, new ItemStack(ToolsItems.OsmiumSword));
if(helmet < 50) event.entityLiving.setCurrentItemOrArmor(1, new ItemStack(MekanismToolsItems.OsmiumHelmet)); if(helmet < 50) event.entityLiving.setCurrentItemOrArmor(1, new ItemStack(ToolsItems.OsmiumHelmet));
if(chestplate < 50) event.entityLiving.setCurrentItemOrArmor(2, new ItemStack(MekanismToolsItems.OsmiumChestplate)); if(chestplate < 50) event.entityLiving.setCurrentItemOrArmor(2, new ItemStack(ToolsItems.OsmiumChestplate));
if(leggings < 50) event.entityLiving.setCurrentItemOrArmor(3, new ItemStack(MekanismToolsItems.OsmiumLeggings)); if(leggings < 50) event.entityLiving.setCurrentItemOrArmor(3, new ItemStack(ToolsItems.OsmiumLeggings));
if(boots < 50) event.entityLiving.setCurrentItemOrArmor(4, new ItemStack(MekanismToolsItems.OsmiumBoots)); if(boots < 50) event.entityLiving.setCurrentItemOrArmor(4, new ItemStack(ToolsItems.OsmiumBoots));
} }
else if(armorType == 3) else if(armorType == 3)
{ {
if(event.entityLiving instanceof EntityZombie && sword < 50) event.entityLiving.setCurrentItemOrArmor(0, new ItemStack(MekanismToolsItems.SteelSword)); if(event.entityLiving instanceof EntityZombie && sword < 50) event.entityLiving.setCurrentItemOrArmor(0, new ItemStack(ToolsItems.SteelSword));
if(helmet < 50) event.entityLiving.setCurrentItemOrArmor(1, new ItemStack(MekanismToolsItems.SteelHelmet)); if(helmet < 50) event.entityLiving.setCurrentItemOrArmor(1, new ItemStack(ToolsItems.SteelHelmet));
if(chestplate < 50) event.entityLiving.setCurrentItemOrArmor(2, new ItemStack(MekanismToolsItems.SteelChestplate)); if(chestplate < 50) event.entityLiving.setCurrentItemOrArmor(2, new ItemStack(ToolsItems.SteelChestplate));
if(leggings < 50) event.entityLiving.setCurrentItemOrArmor(3, new ItemStack(MekanismToolsItems.SteelLeggings)); if(leggings < 50) event.entityLiving.setCurrentItemOrArmor(3, new ItemStack(ToolsItems.SteelLeggings));
if(boots < 50) event.entityLiving.setCurrentItemOrArmor(4, new ItemStack(MekanismToolsItems.SteelBoots)); if(boots < 50) event.entityLiving.setCurrentItemOrArmor(4, new ItemStack(ToolsItems.SteelBoots));
} }
else if(armorType == 4) else if(armorType == 4)
{ {
if(event.entityLiving instanceof EntityZombie && sword < 50) event.entityLiving.setCurrentItemOrArmor(0, new ItemStack(MekanismToolsItems.BronzeSword)); if(event.entityLiving instanceof EntityZombie && sword < 50) event.entityLiving.setCurrentItemOrArmor(0, new ItemStack(ToolsItems.BronzeSword));
if(helmet < 50) event.entityLiving.setCurrentItemOrArmor(1, new ItemStack(MekanismToolsItems.BronzeHelmet)); if(helmet < 50) event.entityLiving.setCurrentItemOrArmor(1, new ItemStack(ToolsItems.BronzeHelmet));
if(chestplate < 50) event.entityLiving.setCurrentItemOrArmor(2, new ItemStack(MekanismToolsItems.BronzeChestplate)); if(chestplate < 50) event.entityLiving.setCurrentItemOrArmor(2, new ItemStack(ToolsItems.BronzeChestplate));
if(leggings < 50) event.entityLiving.setCurrentItemOrArmor(3, new ItemStack(MekanismToolsItems.BronzeLeggings)); if(leggings < 50) event.entityLiving.setCurrentItemOrArmor(3, new ItemStack(ToolsItems.BronzeLeggings));
if(boots < 50) event.entityLiving.setCurrentItemOrArmor(4, new ItemStack(MekanismToolsItems.BronzeBoots)); if(boots < 50) event.entityLiving.setCurrentItemOrArmor(4, new ItemStack(ToolsItems.BronzeBoots));
} }
} }
} }

View file

@ -11,10 +11,11 @@ import mekanism.tools.item.ItemMekanismSword;
import net.minecraft.item.Item; import net.minecraft.item.Item;
import net.minecraft.item.Item.ToolMaterial; import net.minecraft.item.Item.ToolMaterial;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.GameRegistry.ObjectHolder; import cpw.mods.fml.common.registry.GameRegistry.ObjectHolder;
@ObjectHolder("MekanismTools") @ObjectHolder("MekanismTools")
public class MekanismToolsItems public class ToolsItems
{ {
//Vanilla Material Paxels //Vanilla Material Paxels
public static Item WoodPaxel; public static Item WoodPaxel;
@ -209,4 +210,86 @@ public class MekanismToolsItems
item.setHarvestLevel("axe", material.getHarvestLevel()); item.setHarvestLevel("axe", material.getHarvestLevel());
item.setHarvestLevel("shovel", material.getHarvestLevel()); item.setHarvestLevel("shovel", material.getHarvestLevel());
} }
public static void register()
{
//Base
GameRegistry.registerItem(WoodPaxel, "WoodPaxel");
GameRegistry.registerItem(StonePaxel, "StonePaxel");
GameRegistry.registerItem(IronPaxel, "IronPaxel");
GameRegistry.registerItem(DiamondPaxel, "DiamondPaxel");
GameRegistry.registerItem(GoldPaxel, "GoldPaxel");
//Obsidian
GameRegistry.registerItem(ObsidianHelmet, "ObsidianHelmet");
GameRegistry.registerItem(ObsidianChestplate, "ObsidianChestplate");
GameRegistry.registerItem(ObsidianLeggings, "ObsidianLeggings");
GameRegistry.registerItem(ObsidianBoots, "ObsidianBoots");
GameRegistry.registerItem(ObsidianPaxel, "ObsidianPaxel");
GameRegistry.registerItem(ObsidianPickaxe, "ObsidianPickaxe");
GameRegistry.registerItem(ObsidianAxe, "ObsidianAxe");
GameRegistry.registerItem(ObsidianShovel, "ObsidianShovel");
GameRegistry.registerItem(ObsidianHoe, "ObsidianHoe");
GameRegistry.registerItem(ObsidianSword, "ObsidianSword");
//Lazuli
GameRegistry.registerItem(LazuliHelmet, "LapisLazuliHelmet");
GameRegistry.registerItem(LazuliChestplate, "LapisLazuliChestplate");
GameRegistry.registerItem(LazuliLeggings, "LapisLazuliLeggings");
GameRegistry.registerItem(LazuliBoots, "LapisLazuliBoots");
GameRegistry.registerItem(LazuliPaxel, "LapisLazuliPaxel");
GameRegistry.registerItem(LazuliPickaxe, "LapisLazuliPickaxe");
GameRegistry.registerItem(LazuliAxe, "LapisLazuliAxe");
GameRegistry.registerItem(LazuliShovel, "LapisLazuliShovel");
GameRegistry.registerItem(LazuliHoe, "LapisLazuliHoe");
GameRegistry.registerItem(LazuliSword, "LapisLazuliSword");
//Osmium
GameRegistry.registerItem(OsmiumHelmet, "OsmiumHelmet");
GameRegistry.registerItem(OsmiumChestplate, "OsmiumChestplate");
GameRegistry.registerItem(OsmiumLeggings, "OsmiumLeggings");
GameRegistry.registerItem(OsmiumBoots, "OsmiumBoots");
GameRegistry.registerItem(OsmiumPaxel, "OsmiumPaxel");
GameRegistry.registerItem(OsmiumPickaxe, "OsmiumPickaxe");
GameRegistry.registerItem(OsmiumAxe, "OsmiumAxe");
GameRegistry.registerItem(OsmiumShovel, "OsmiumShovel");
GameRegistry.registerItem(OsmiumHoe, "OsmiumHoe");
GameRegistry.registerItem(OsmiumSword, "OsmiumSword");
//Bronze
GameRegistry.registerItem(BronzeHelmet, "BronzeHelmet");
GameRegistry.registerItem(BronzeChestplate, "BronzeChestplate");
GameRegistry.registerItem(BronzeLeggings, "BronzeLeggings");
GameRegistry.registerItem(BronzeBoots, "BronzeBoots");
GameRegistry.registerItem(BronzePaxel, "BronzePaxel");
GameRegistry.registerItem(BronzePickaxe, "BronzePickaxe");
GameRegistry.registerItem(BronzeAxe, "BronzeAxe");
GameRegistry.registerItem(BronzeShovel, "BronzeShovel");
GameRegistry.registerItem(BronzeHoe, "BronzeHoe");
GameRegistry.registerItem(BronzeSword, "BronzeSword");
//Glowstone
GameRegistry.registerItem(GlowstonePaxel, "GlowstonePaxel");
GameRegistry.registerItem(GlowstonePickaxe, "GlowstonePickaxe");
GameRegistry.registerItem(GlowstoneAxe, "GlowstoneAxe");
GameRegistry.registerItem(GlowstoneShovel, "GlowstoneShovel");
GameRegistry.registerItem(GlowstoneHoe, "GlowstoneHoe");
GameRegistry.registerItem(GlowstoneSword, "GlowstoneSword");
GameRegistry.registerItem(GlowstoneHelmet, "GlowstoneHelmet");
GameRegistry.registerItem(GlowstoneChestplate, "GlowstoneChestplate");
GameRegistry.registerItem(GlowstoneLeggings, "GlowstoneLeggings");
GameRegistry.registerItem(GlowstoneBoots, "GlowstoneBoots");
//Steel
GameRegistry.registerItem(SteelPaxel, "SteelPaxel");
GameRegistry.registerItem(SteelPickaxe, "SteelPickaxe");
GameRegistry.registerItem(SteelAxe, "SteelAxe");
GameRegistry.registerItem(SteelShovel, "SteelShovel");
GameRegistry.registerItem(SteelHoe, "SteelHoe");
GameRegistry.registerItem(SteelSword, "SteelSword");
GameRegistry.registerItem(SteelHelmet, "SteelHelmet");
GameRegistry.registerItem(SteelChestplate, "SteelChestplate");
GameRegistry.registerItem(SteelLeggings, "SteelLeggings");
GameRegistry.registerItem(SteelBoots, "SteelBoots");
}
} }

View file

@ -8,7 +8,7 @@ import mekanism.common.MekanismItems;
import mekanism.common.util.MekanismUtils; import mekanism.common.util.MekanismUtils;
import mekanism.api.util.StackUtils; import mekanism.api.util.StackUtils;
import mekanism.tools.common.MekanismTools; import mekanism.tools.common.MekanismTools;
import mekanism.tools.common.MekanismToolsItems; import mekanism.tools.common.ToolsItems;
import net.minecraft.client.model.ModelBiped; import net.minecraft.client.model.ModelBiped;
import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.client.renderer.texture.IIconRegister;
@ -88,8 +88,8 @@ public class ItemMekanismArmor extends ItemArmor
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public ModelBiped getArmorModel(EntityLivingBase entityLiving, ItemStack itemStack, int armorSlot) public ModelBiped getArmorModel(EntityLivingBase entityLiving, ItemStack itemStack, int armorSlot)
{ {
if(itemStack.getItem() == MekanismToolsItems.GlowstoneHelmet || itemStack.getItem() == MekanismToolsItems.GlowstoneChestplate || if(itemStack.getItem() == ToolsItems.GlowstoneHelmet || itemStack.getItem() == ToolsItems.GlowstoneChestplate ||
itemStack.getItem() == MekanismToolsItems.GlowstoneLeggings || itemStack.getItem() == MekanismToolsItems.GlowstoneBoots) itemStack.getItem() == ToolsItems.GlowstoneLeggings || itemStack.getItem() == ToolsItems.GlowstoneBoots)
{ {
return ModelCustomArmor.getGlow(armorSlot); return ModelCustomArmor.getGlow(armorSlot);
} }