Guest User

Untitled

a guest
Jan 23rd, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 3.23 KB | None | 0 0
  1. package net.minecraft.src;
  2.  
  3. import net.minecraft.client.Minecraft;
  4.  
  5. public class mod_Era extends BaseMod
  6. {
  7.     public static Item IronRod = new Item(10000).setItemName("IronRod");
  8.     public static Item ReinforcedIPick = new ItemEraPick(10001, EnumToolEra.ReinforcedI).setItemName("ReinforcedIPick");   
  9.     public static Item ReinforcedIShovel = new ItemEraShovel(10002, EnumToolEra.ReinforcedI).setItemName("ReinforcedIShovel");
  10.     public static Item ReinforcedIAxe = new ItemEraAxe(10003, EnumToolEra.ReinforcedI).setItemName("ReinforcedIAxe");
  11.     public static Item ReinforcedISword = new ItemEraSword(10004, EnumToolEra.ReinforcedI).setItemName("ReinforcedISword");
  12.     public static Item ReinforcedIHoe = new ItemEraHoe(10005, EnumToolEra.ReinforcedI).setItemName("ReinforcedIHoe");
  13.    
  14.     public mod_Era()
  15.     {
  16.         ModLoader.SetInGameHook(this, true, true);
  17.         eraMethods.registerTextures();
  18.         ModLoader.AddRecipe(new ItemStack(Item.diamond, 64), new Object[]{
  19.             "X", Character.valueOf('X'), new ItemStack(Block.dirt)
  20.         });
  21.         ModLoader.AddRecipe(new ItemStack(Item.ingotIron, 64), new Object[]{
  22.             "XX", Character.valueOf('X'), new ItemStack(Block.dirt)
  23.         });
  24.     }
  25.  
  26.     public String Version(){
  27.         return "V0.0";
  28.     }
  29.    
  30.     public void TakenFromCrafting(EntityPlayer entityplayer, ItemStack itemstack, IInventory matrix)
  31.     {
  32.             if(itemstack.itemID == Item.pickaxeDiamond.shiftedIndex)
  33.             {
  34.                 entityplayer.addChatMessage("The pickaxe has been crafted!");
  35.                 this.anicientProg[0] = true;
  36.             }
  37.             if(itemstack.itemID == Item.shovelDiamond.shiftedIndex)
  38.             {
  39.                 entityplayer.addChatMessage("The shovel has been crafted!");
  40.                 this.anicientProg[1] = true;
  41.             }
  42.             if(itemstack.itemID == Item.swordDiamond.shiftedIndex)
  43.             {
  44.                 entityplayer.addChatMessage("The sword has been crafted!");
  45.                 this.anicientProg[2] = true;
  46.             }
  47.             if(itemstack.itemID == Item.helmetDiamond.shiftedIndex)
  48.             {
  49.                 entityplayer.addChatMessage("The helmat has been crafted!");
  50.                 this.anicientProg[3] = true;
  51.             }
  52.             if(itemstack.itemID == Item.plateDiamond.shiftedIndex)
  53.             {
  54.                 entityplayer.addChatMessage("The plate has been crafted!");
  55.                     this.anicientProg[4] = true;
  56.             }
  57.             if(itemstack.itemID == Item.legsDiamond.shiftedIndex)
  58.             {
  59.                 entityplayer.addChatMessage("The legs has been crafted!");
  60.                     this.anicientProg[5] = true;
  61.             }
  62.  
  63.     }
  64.    
  65.     public boolean OnTickInGame(float tick, Minecraft minecraft)
  66.     {
  67.         if(classicEra)
  68.         {
  69.             anicientEra = false;
  70.         }
  71.            
  72.         if(!classicEra)
  73.         {
  74.             this.anicientEra = true;
  75.         if(anicientProg[0] == true && anicientProg[1] == true && anicientProg[2] == true &&
  76.                 anicientProg[3] == true && anicientProg[4] == true && anicientProg[5] == true && anicientEra == true)
  77.         {          
  78.             eraMethods.changeEra(1);
  79.         }
  80.         }
  81.         return true;
  82.     }
  83.     public EraMethods eraMethods = new EraMethods();
  84.     public static boolean[] anicientProg = new boolean[6];
  85.     public static boolean anicientEra = true;
  86.     public static boolean classicEra = false;
  87. }
Add Comment
Please, Sign In to add comment