GenuineSounds

Too lazy

Jun 14th, 2012
230
0
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.98 KB | None | 0 0
  1. @Override
  2. public void modsLoaded() {
  3.     try {
  4.         Class EE = Class.forName("ee.EEMaps");
  5.         if (EE != null) {
  6.             Method addEMC = EE.getDeclaredMethod("addEMC", int.class, int.class);
  7.             if (addEMC != null) {
  8.                 for (int i = 0; i < Item.itemsList.length; i++) {
  9.                     Item item = Item.itemsList[i];
  10.                     EnumRarity rarity = item.getRarity(new ItemStack(item));
  11.                     if (item != null && rarity != null && item instanceof ICombinable) {
  12.                         int value = 64;
  13.                         if (rarity == Rarity.trash)
  14.                             value = 8;
  15.                         else if (rarity == Rarity.common)
  16.                             value = 32;
  17.                         else if (rarity == Rarity.uncommon)
  18.                             value = 128;
  19.                         else if (rarity == Rarity.rare)
  20.                             value = 512;
  21.                         else if (rarity == Rarity.epic)
  22.                             value = 1024;
  23.                         else if (rarity == Rarity.angelic)
  24.                             value = 2048;
  25.                         else if (rarity == Rarity.demonic)
  26.                             value = 2048;
  27.                         addEMC.invoke(null, item.shiftedIndex, value);
  28.                     }
  29.                 }
  30.             }
  31.         }
  32.     }
  33.     catch (Exception e) {}
  34. }
Advertisement
Comments
  • User was banned
Add Comment
Please, Sign In to add comment