Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package net.minecraft.src;
- import net.minecraft.client.Minecraft;
- public class mod_Era extends BaseMod
- {
- public static Item IronRod = new Item(10000).setItemName("IronRod");
- public static Item ReinforcedIPick = new ItemEraPick(10001, EnumToolEra.ReinforcedI).setItemName("ReinforcedIPick");
- public static Item ReinforcedIShovel = new ItemEraShovel(10002, EnumToolEra.ReinforcedI).setItemName("ReinforcedIShovel");
- public static Item ReinforcedIAxe = new ItemEraAxe(10003, EnumToolEra.ReinforcedI).setItemName("ReinforcedIAxe");
- public static Item ReinforcedISword = new ItemEraSword(10004, EnumToolEra.ReinforcedI).setItemName("ReinforcedISword");
- public static Item ReinforcedIHoe = new ItemEraHoe(10005, EnumToolEra.ReinforcedI).setItemName("ReinforcedIHoe");
- public mod_Era()
- {
- ModLoader.SetInGameHook(this, true, true);
- eraMethods.registerTextures();
- ModLoader.AddRecipe(new ItemStack(Item.diamond, 64), new Object[]{
- "X", Character.valueOf('X'), new ItemStack(Block.dirt)
- });
- ModLoader.AddRecipe(new ItemStack(Item.ingotIron, 64), new Object[]{
- "XX", Character.valueOf('X'), new ItemStack(Block.dirt)
- });
- }
- public String Version(){
- return "V0.0";
- }
- public void TakenFromCrafting(EntityPlayer entityplayer, ItemStack itemstack, IInventory matrix)
- {
- if(itemstack.itemID == Item.pickaxeDiamond.shiftedIndex)
- {
- entityplayer.addChatMessage("The pickaxe has been crafted!");
- this.anicientProg[0] = true;
- }
- if(itemstack.itemID == Item.shovelDiamond.shiftedIndex)
- {
- entityplayer.addChatMessage("The shovel has been crafted!");
- this.anicientProg[1] = true;
- }
- if(itemstack.itemID == Item.swordDiamond.shiftedIndex)
- {
- entityplayer.addChatMessage("The sword has been crafted!");
- this.anicientProg[2] = true;
- }
- if(itemstack.itemID == Item.helmetDiamond.shiftedIndex)
- {
- entityplayer.addChatMessage("The helmat has been crafted!");
- this.anicientProg[3] = true;
- }
- if(itemstack.itemID == Item.plateDiamond.shiftedIndex)
- {
- entityplayer.addChatMessage("The plate has been crafted!");
- this.anicientProg[4] = true;
- }
- if(itemstack.itemID == Item.legsDiamond.shiftedIndex)
- {
- entityplayer.addChatMessage("The legs has been crafted!");
- this.anicientProg[5] = true;
- }
- }
- public boolean OnTickInGame(float tick, Minecraft minecraft)
- {
- if(classicEra)
- {
- anicientEra = false;
- }
- if(!classicEra)
- {
- this.anicientEra = true;
- if(anicientProg[0] == true && anicientProg[1] == true && anicientProg[2] == true &&
- anicientProg[3] == true && anicientProg[4] == true && anicientProg[5] == true && anicientEra == true)
- {
- eraMethods.changeEra(1);
- }
- }
- return true;
- }
- public EraMethods eraMethods = new EraMethods();
- public static boolean[] anicientProg = new boolean[6];
- public static boolean anicientEra = true;
- public static boolean classicEra = false;
- }
Add Comment
Please, Sign In to add comment