Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Override
- public void modsLoaded() {
- try {
- Class EE = Class.forName("ee.EEMaps");
- if (EE != null) {
- Method addEMC = EE.getDeclaredMethod("addEMC", int.class, int.class);
- if (addEMC != null) {
- for (int i = 0; i < Item.itemsList.length; i++) {
- Item item = Item.itemsList[i];
- EnumRarity rarity = item.getRarity(new ItemStack(item));
- if (item != null && rarity != null && item instanceof ICombinable) {
- int value = 64;
- if (rarity == Rarity.trash)
- value = 8;
- else if (rarity == Rarity.common)
- value = 32;
- else if (rarity == Rarity.uncommon)
- value = 128;
- else if (rarity == Rarity.rare)
- value = 512;
- else if (rarity == Rarity.epic)
- value = 1024;
- else if (rarity == Rarity.angelic)
- value = 2048;
- else if (rarity == Rarity.demonic)
- value = 2048;
- addEMC.invoke(null, item.shiftedIndex, value);
- }
- }
- }
- }
- }
- catch (Exception e) {}
- }
Advertisement