Search in sources :

Example 31 with ItemArmor

use of net.minecraft.item.ItemArmor in project EnderIO by SleepyTrousers.

the class HandlerSoulBound method addToPlayerInventory.

private static boolean addToPlayerInventory(EntityPlayer entityPlayer, ItemStack item) {
    if (item == null || entityPlayer == null) {
        return false;
    }
    if (item.getItem() instanceof ItemArmor) {
        ItemArmor arm = (ItemArmor) item.getItem();
        int index = arm.armorType.getIndex();
        if (Prep.isInvalid(entityPlayer.inventory.armorInventory.get(index))) {
            entityPlayer.inventory.armorInventory.set(index, item);
            Log.debug("Running addToPlayerInventory/armor logic for " + entityPlayer.getName() + ": " + item);
            return true;
        }
    }
    InventoryPlayer inv = entityPlayer.inventory;
    for (int i = 0; i < inv.mainInventory.size(); i++) {
        if (Prep.isInvalid(inv.mainInventory.get(i))) {
            inv.mainInventory.set(i, item.copy());
            Log.debug("Running addToPlayerInventory/main logic for " + entityPlayer.getName() + ": " + item);
            return true;
        }
    }
    Log.debug("Running addToPlayerInventory/fail logic for " + entityPlayer.getName() + ": " + item);
    return false;
}
Also used : InventoryPlayer(net.minecraft.entity.player.InventoryPlayer) ItemArmor(net.minecraft.item.ItemArmor)

Example 32 with ItemArmor

use of net.minecraft.item.ItemArmor in project BloodMagic by WayofTime.

the class Utils method applyArmor.

public static float applyArmor(EntityLivingBase entity, ItemStack[] inventory, DamageSource source, double damage) {
    damage *= 25;
    ArrayList<ArmorProperties> dmgVals = new ArrayList<>();
    for (int x = 0; x < inventory.length; x++) {
        ItemStack stack = inventory[x];
        if (stack.isEmpty()) {
            continue;
        }
        ArmorProperties prop = null;
        if (stack.getItem() instanceof ISpecialArmor) {
            ISpecialArmor armor = (ISpecialArmor) stack.getItem();
            prop = armor.getProperties(entity, stack, source, damage / 25D, x).copy();
        } else if (stack.getItem() instanceof ItemArmor && !source.isUnblockable()) {
            ItemArmor armor = (ItemArmor) stack.getItem();
            prop = new ArmorProperties(0, armor.damageReduceAmount / 25D, Integer.MAX_VALUE);
        }
        if (prop != null) {
            prop.Slot = x;
            dmgVals.add(prop);
        }
    }
    if (dmgVals.size() > 0) {
        ArmorProperties[] props = dmgVals.toArray(new ArmorProperties[dmgVals.size()]);
        int level = props[0].Priority;
        double ratio = 0;
        for (ArmorProperties prop : props) {
            if (level != prop.Priority) {
                damage -= (damage * ratio);
                ratio = 0;
                level = prop.Priority;
            }
            ratio += prop.AbsorbRatio;
        }
        damage -= (damage * ratio);
    }
    return (float) (damage / 25.0F);
}
Also used : ArmorProperties(net.minecraftforge.common.ISpecialArmor.ArmorProperties) ItemArmor(net.minecraft.item.ItemArmor) ItemStack(net.minecraft.item.ItemStack) ISpecialArmor(net.minecraftforge.common.ISpecialArmor)

Example 33 with ItemArmor

use of net.minecraft.item.ItemArmor in project Minestuck by mraof.

the class AlchemyRecipeHandler method registerMinestuckRecipes.

public static void registerMinestuckRecipes() {
    // set up crafting recipes
    /*RecipeSorter.register("minestuck:notmirrored", CraftingRecipes.NonMirroredRecipe.class, RecipeSorter.Category.SHAPED, "before:minecraft:shaped");
		RecipeSorter.register("minestuck:emptycard", CraftingRecipes.EmptyCardRecipe.class, RecipeSorter.Category.SHAPED, "before:minecraft:shaped");
		
		ItemStack crux = new ItemStack(rawCruxite);
		ItemStack cruxBl = new ItemStack(cruxiteBlock);
		ItemStack card = new ItemStack(captchaCard);
		GameRegistry.addRecipe(new CraftingRecipes.EmptyCardRecipe(3, 1, new ItemStack[]{cruxBl.copy(), card.copy(), crux.copy()}, new ItemStack(modusCard, 1, 0)));
		GameRegistry.addRecipe(new CraftingRecipes.EmptyCardRecipe(3, 1, new ItemStack[]{crux.copy(), card.copy(), cruxBl.copy()}, new ItemStack(modusCard, 1, 1)));*/
    // TODO Figure out recipe names and groups
    GameRegistry.addSmelting(goldSeeds, new ItemStack(Items.GOLD_NUGGET), 0.1F);
    GameRegistry.addSmelting(ironOreSandstone, new ItemStack(Items.IRON_INGOT), 0.7F);
    GameRegistry.addSmelting(ironOreSandstoneRed, new ItemStack(Items.IRON_INGOT), 0.7F);
    GameRegistry.addSmelting(goldOreSandstone, new ItemStack(Items.GOLD_INGOT), 1.0F);
    GameRegistry.addSmelting(goldOreSandstoneRed, new ItemStack(Items.GOLD_INGOT), 1.0F);
    GameRegistry.addSmelting(woodenCactus, new ItemStack(Items.COAL, 1, 1), 0.15F);
    GameRegistry.addSmelting(cruxiteDowel, new ItemStack(MinestuckItems.rawCruxite), 0.1F);
    // Register ore dictionary entries
    OreDictionary.registerOre("oreCoal", coalOreNetherrack);
    OreDictionary.registerOre("oreIron", ironOreSandstone);
    OreDictionary.registerOre("oreIron", ironOreSandstoneRed);
    OreDictionary.registerOre("oreGold", goldOreSandstone);
    OreDictionary.registerOre("oreGold", goldOreSandstoneRed);
    coalOreNetherrack.setHarvestLevel("pickaxe", Blocks.COAL_ORE.getHarvestLevel(Blocks.COAL_ORE.getDefaultState()));
    ironOreSandstone.setHarvestLevel("pickaxe", Blocks.IRON_ORE.getHarvestLevel(Blocks.IRON_ORE.getDefaultState()));
    ironOreSandstoneRed.setHarvestLevel("pickaxe", Blocks.IRON_ORE.getHarvestLevel(Blocks.IRON_ORE.getDefaultState()));
    goldOreSandstone.setHarvestLevel("pickaxe", Blocks.GOLD_ORE.getHarvestLevel(Blocks.GOLD_ORE.getDefaultState()));
    goldOreSandstoneRed.setHarvestLevel("pickaxe", Blocks.GOLD_ORE.getHarvestLevel(Blocks.GOLD_ORE.getDefaultState()));
    // add grist conversions
    GristRegistry.addGristConversion(new ItemStack(coloredDirt, 1, 0), new GristSet(new GristType[] { GristType.Build, GristType.Shale }, new int[] { 1, 1 }));
    GristRegistry.addGristConversion(new ItemStack(coloredDirt, 1, 1), new GristSet(new GristType[] { GristType.Build, GristType.Caulk }, new int[] { 1, 1 }));
    GristRegistry.addGristConversion(new ItemStack(crockerMachine, 1, 0), true, new GristSet(new GristType[] { GristType.Build, GristType.Garnet, GristType.Ruby }, new int[] { 550, 55, 34 }));
    GristRegistry.addGristConversion(new ItemStack(genericObject), true, new GristSet(new GristType[] { GristType.Build }, new int[] { 2 }));
    GristRegistry.addGristConversion(new ItemStack(chessboard), true, new GristSet(new GristType[] { GristType.Shale, GristType.Marble }, new int[] { 25, 25 }));
    GristRegistry.addGristConversion(new ItemStack(cruxiteApple, 1), false, new GristSet());
    GristRegistry.addGristConversion(new ItemStack(cruxitePotion, 1), false, new GristSet());
    GristRegistry.addGristConversion(new ItemStack(catClaws), false, new GristSet(new GristType[] { GristType.Build, GristType.Rust }, new int[] { 15, 5 }));
    GristRegistry.addGristConversion(new ItemStack(clawHammer), false, new GristSet(GristType.Build, 8));
    GristRegistry.addGristConversion(new ItemStack(sledgeHammer), false, new GristSet(new GristType[] { GristType.Build, GristType.Shale }, new int[] { 10, 4 }));
    GristRegistry.addGristConversion(new ItemStack(blacksmithHammer), false, new GristSet(new GristType[] { GristType.Rust, GristType.Sulfur, GristType.Caulk }, new int[] { 8, 9, 5 }));
    GristRegistry.addGristConversion(new ItemStack(pogoHammer), false, new GristSet(new GristType[] { GristType.Build, GristType.Shale }, new int[] { 20, 16 }));
    GristRegistry.addGristConversion(new ItemStack(telescopicSassacrusher), false, new GristSet(new GristType[] { GristType.Shale, GristType.Tar, GristType.Mercury }, new int[] { 39, 18, 23 }));
    GristRegistry.addGristConversion(new ItemStack(regiHammer), false, new GristSet(new GristType[] { GristType.Amethyst, GristType.Tar, GristType.Gold }, new int[] { 25, 70, 34 }));
    GristRegistry.addGristConversion(new ItemStack(fearNoAnvil), false, new GristSet(new GristType[] { GristType.Build, GristType.Garnet, GristType.Diamond, GristType.Gold, GristType.Quartz }, new int[] { 999, 150, 54, 61, 1 }));
    GristRegistry.addGristConversion(new ItemStack(cactusCutlass), false, new GristSet(new GristType[] { GristType.Amber, GristType.Marble }, new int[] { 7, 2 }));
    GristRegistry.addGristConversion(new ItemStack(sord), false, new GristSet(GristType.Build, 0));
    GristRegistry.addGristConversion(new ItemStack(katana), false, new GristSet(new GristType[] { GristType.Chalk, GristType.Quartz, GristType.Rust }, new int[] { 12, 10, 6 }));
    GristRegistry.addGristConversion(new ItemStack(firePoker), false, new GristSet(new GristType[] { GristType.Amber, GristType.Ruby, GristType.Sulfur, GristType.Gold }, new int[] { 41, 14, 38, 3 }));
    GristRegistry.addGristConversion(new ItemStack(hotHandle), false, new GristSet(new GristType[] { GristType.Amber, GristType.Ruby, GristType.Sulfur }, new int[] { 10, 15, 10 }));
    GristRegistry.addGristConversion(new ItemStack(regisword), false, new GristSet(new GristType[] { GristType.Amethyst, GristType.Tar, GristType.Gold }, new int[] { 27, 62, 38 }));
    GristRegistry.addGristConversion(new ItemStack(unbreakableKatana), false, new GristSet(new GristType[] { GristType.Build, GristType.Uranium, GristType.Quartz, GristType.Ruby }, new int[] { 1100, 63, 115, 54 }));
    GristRegistry.addGristConversion(new ItemStack(cobaltSabre), false, new GristSet(new GristType[] { GristType.Build, GristType.Uranium, GristType.Cobalt, GristType.Diamond }, new int[] { 1300, 90, 175, 30 }));
    GristRegistry.addGristConversion(new ItemStack(quantumSabre), false, new GristSet(new GristType[] { GristType.Build, GristType.Uranium }, new int[] { 413, 11 }));
    GristRegistry.addGristConversion(new ItemStack(woodenSpoon), false, new GristSet(GristType.Build, 5));
    GristRegistry.addGristConversion(new ItemStack(silverSpoon), false, new GristSet(new GristType[] { GristType.Build, GristType.Mercury }, new int[] { 6, 4 }));
    GristRegistry.addGristConversion(new ItemStack(crockerSpork), false, new GristSet(new GristType[] { GristType.Build, GristType.Iodine, GristType.Chalk, GristType.Ruby }, new int[] { 90, 34, 34, 6 }));
    GristRegistry.addGristConversion(new ItemStack(skaiaFork), new GristSet(new GristType[] { GristType.Build, GristType.Quartz, GristType.Gold, GristType.Amethyst }, new int[] { 900, 94, 58, 63 }));
    GristRegistry.addGristConversion(new ItemStack(copseCrusher), false, new GristSet(new GristType[] { GristType.Build, GristType.Rust }, new int[] { 25, 15 }));
    GristRegistry.addGristConversion(new ItemStack(blacksmithBane), false, new GristSet(new GristType[] { GristType.Build, GristType.Rust, GristType.Tar }, new int[] { 30, 15, 12 }));
    GristRegistry.addGristConversion(new ItemStack(scraxe), false, new GristSet(new GristType[] { GristType.Build, GristType.Tar, GristType.Rust, GristType.Ruby }, new int[] { 139, 86, 43, 8 }));
    GristRegistry.addGristConversion(new ItemStack(qPHammerAxe), false, new GristSet(new GristType[] { GristType.Build, GristType.Shale, GristType.Rust }, new int[] { 150, 64, 15 }));
    GristRegistry.addGristConversion(new ItemStack(rubyCroak), false, new GristSet(new GristType[] { GristType.Build, GristType.Garnet, GristType.Ruby, GristType.Diamond }, new int[] { 900, 103, 64, 16 }));
    GristRegistry.addGristConversion(new ItemStack(hephaestusLumber), false, new GristSet(new GristType[] { GristType.Build, GristType.Gold, GristType.Ruby }, new int[] { 625, 49, 36 }));
    GristRegistry.addGristConversion(new ItemStack(qFHammerAxe), false, new GristSet(new GristType[] { GristType.Build, GristType.Shale, GristType.Uranium, GristType.Rust }, new int[] { 800, 128, 64, 30 }));
    GristRegistry.addGristConversion(new ItemStack(regiSickle), false, new GristSet(new GristType[] { GristType.Amethyst, GristType.Tar, GristType.Gold }, new int[] { 25, 57, 33 }));
    GristRegistry.addGristConversion(new ItemStack(sickle), false, new GristSet(new GristType[] { GristType.Build }, new int[] { 8 }));
    GristRegistry.addGristConversion(new ItemStack(homesSmellYaLater), false, new GristSet(new GristType[] { GristType.Build, GristType.Amber, GristType.Amethyst }, new int[] { 34, 19, 10 }));
    GristRegistry.addGristConversion(new ItemStack(fudgeSickle), false, new GristSet(new GristType[] { GristType.Iodine, GristType.Amber, GristType.Chalk }, new int[] { 23, 15, 12 }));
    GristRegistry.addGristConversion(new ItemStack(candySickle), false, new GristSet(new GristType[] { GristType.Iodine, GristType.Gold, GristType.Chalk, GristType.Amber }, new int[] { 65, 38, 53, 20 }));
    GristRegistry.addGristConversion(new ItemStack(nightClub), false, new GristSet(new GristType[] { GristType.Tar, GristType.Shale, GristType.Cobalt }, new int[] { 28, 19, 6 }));
    GristRegistry.addGristConversion(new ItemStack(pogoClub), false, new GristSet(new GristType[] { GristType.Build, GristType.Shale }, new int[] { 15, 12 }));
    GristRegistry.addGristConversion(new ItemStack(metalBat), false, new GristSet(new GristType[] { GristType.Build, GristType.Mercury }, new int[] { 35, 23 }));
    GristRegistry.addGristConversion(new ItemStack(spikedClub), false, new GristSet(new GristType[] { GristType.Build, GristType.Garnet, GristType.Iodine }, new int[] { 46, 38, 13 }));
    GristRegistry.addGristConversion(new ItemStack(spearCane), false, new GristSet(new GristType[] { GristType.Build, GristType.Mercury, GristType.Amber }, new int[] { 28, 14, 11 }));
    GristRegistry.addGristConversion(new ItemStack(regiCane), false, new GristSet(new GristType[] { GristType.Amethyst, GristType.Tar, GristType.Gold }, new int[] { 30, 55, 32 }));
    GristRegistry.addGristConversion(new ItemStack(pogoCane), false, new GristSet(new GristType[] { GristType.Build, GristType.Shale }, new int[] { 18, 14 }));
    GristRegistry.addGristConversion(new ItemStack(upStick), false, new GristSet(new GristType[] { GristType.Uranium }, new int[] { 1 }));
    GristRegistry.addGristConversion(new ItemStack(transportalizer), false, new GristSet(new GristType[] { GristType.Build, GristType.Amethyst, GristType.Rust, GristType.Uranium }, new int[] { 350, 27, 36, 18 }));
    GristRegistry.addGristConversion(new ItemStack(modusCard, 1, 2), true, new GristSet(GristType.Build, 140));
    GristRegistry.addGristConversion(new ItemStack(modusCard, 1, 3), true, new GristSet(new GristType[] { GristType.Build, GristType.Amber }, new int[] { 400, 35 }));
    GristRegistry.addGristConversion(new ItemStack(modusCard, 1, 4), true, new GristSet(new GristType[] { GristType.Build, GristType.Ruby }, new int[] { 280, 23 }));
    GristRegistry.addGristConversion(new ItemStack(modusCard, 1, 5), true, new GristSet(new GristType[] { GristType.Build, GristType.Mercury }, new int[] { 350, 29 }));
    GristRegistry.addGristConversion(new ItemStack(metalBoat, 1, 0), true, new GristSet(GristType.Rust, 30));
    GristRegistry.addGristConversion(new ItemStack(metalBoat, 1, 1), true, new GristSet(GristType.Gold, 30));
    GristRegistry.addGristConversion(new ItemStack(layeredSand), new GristSet(GristType.Build, 1));
    GristRegistry.addGristConversion(new ItemStack(minestuckBucket, 1, 0), true, new GristSet(new GristType[] { GristType.Rust, GristType.Tar, GristType.Shale }, new int[] { 27, 8, 8 }));
    GristRegistry.addGristConversion(new ItemStack(minestuckBucket, 1, 1), true, new GristSet(new GristType[] { GristType.Rust, GristType.Garnet, GristType.Iodine }, new int[] { 27, 8, 8 }));
    GristRegistry.addGristConversion(new ItemStack(minestuckBucket, 1, 2), true, new GristSet(new GristType[] { GristType.Rust, GristType.Amethyst, GristType.Chalk }, new int[] { 27, 8, 8 }));
    GristRegistry.addGristConversion(new ItemStack(obsidianBucket), new GristSet(new GristType[] { GristType.Rust, GristType.Cobalt, GristType.Tar, GristType.Build }, new int[] { 27, 8, 16, 4 }));
    GristRegistry.addGristConversion(new ItemStack(glowingMushroom), new GristSet(new GristType[] { GristType.Build, GristType.Shale, GristType.Mercury }, new int[] { 5, 3, 2 }));
    GristRegistry.addGristConversion(new ItemStack(glowingLog), new GristSet(new GristType[] { GristType.Build, GristType.Amber, GristType.Mercury }, new int[] { 8, 4, 4 }));
    GristRegistry.addGristConversion(new ItemStack(glowingPlanks), new GristSet(new GristType[] { GristType.Build, GristType.Amber, GristType.Mercury }, new int[] { 2, 1, 1 }));
    GristRegistry.addGristConversion(new ItemStack(goldSeeds), new GristSet(GristType.Gold, 3));
    GristRegistry.addGristConversion(new ItemStack(emeraldSword), false, new GristSet(new GristType[] { GristType.Quartz, GristType.Diamond, GristType.Ruby }, new int[] { 44, 76, 72 }));
    GristRegistry.addGristConversion(new ItemStack(emeraldAxe), false, new GristSet(new GristType[] { GristType.Amber, GristType.Diamond, GristType.Ruby }, new int[] { 40, 73, 70 }));
    GristRegistry.addGristConversion(new ItemStack(emeraldPickaxe), false, new GristSet(new GristType[] { GristType.Rust, GristType.Diamond, GristType.Ruby }, new int[] { 42, 72, 70 }));
    GristRegistry.addGristConversion(new ItemStack(emeraldShovel), false, new GristSet(new GristType[] { GristType.Chalk, GristType.Diamond, GristType.Ruby }, new int[] { 40, 70, 66 }));
    GristRegistry.addGristConversion(new ItemStack(emeraldHoe), false, new GristSet(new GristType[] { GristType.Iodine, GristType.Diamond, GristType.Ruby }, new int[] { 32, 50, 45 }));
    GristRegistry.addGristConversion(new ItemStack(prismarineHelmet), new GristSet(new GristType[] { GristType.Build, GristType.Cobalt, GristType.Marble }, new int[] { 75, 30, 15 }));
    GristRegistry.addGristConversion(new ItemStack(prismarineChestplate), new GristSet(new GristType[] { GristType.Build, GristType.Cobalt, GristType.Marble }, new int[] { 120, 48, 24 }));
    GristRegistry.addGristConversion(new ItemStack(prismarineLeggings), new GristSet(new GristType[] { GristType.Build, GristType.Cobalt, GristType.Marble }, new int[] { 105, 42, 21 }));
    GristRegistry.addGristConversion(new ItemStack(prismarineBoots), new GristSet(new GristType[] { GristType.Build, GristType.Cobalt, GristType.Marble }, new int[] { 60, 24, 12 }));
    GristRegistry.addGristConversion(new ItemStack(glowystoneDust), new GristSet(new GristType[] { GristType.Build, GristType.Amber }, new int[] { 1, 1 }));
    GristRegistry.addGristConversion(new ItemStack(rawCruxite), new GristSet(GristType.Build, 3));
    GristRegistry.addGristConversion(new ItemStack(rawUranium), new GristSet(GristType.Uranium, 3));
    GristRegistry.addGristConversion(new ItemStack(spork), new GristSet(new GristType[] { GristType.Build }, new int[] { 13 }));
    GristRegistry.addGristConversion(new ItemStack(candy, 1, 0), new GristSet(new GristType[] { GristType.Chalk, GristType.Sulfur, GristType.Iodine }, new int[] { 1, 1, 1 }));
    for (GristType type : GristType.REGISTRY.getValues()) {
        GristRegistry.addGristConversion(new ItemStack(candy, 1, type.getId() + 1), new GristSet(type, 3));
    }
    // Tab
    GristRegistry.addGristConversion(new ItemStack(beverage, 1, 0), new GristSet(new GristType[] { GristType.Cobalt, GristType.Iodine }, new int[] { 1, 1 }));
    // Faygo (orange)
    GristRegistry.addGristConversion(new ItemStack(beverage, 1, 1), new GristSet(new GristType[] { GristType.Cobalt, GristType.Amber }, new int[] { 1, 1 }));
    // Candy apple Faygo
    GristRegistry.addGristConversion(new ItemStack(beverage, 1, 2), new GristSet(new GristType[] { GristType.Cobalt, GristType.Shale }, new int[] { 1, 1 }));
    // Faygo cola
    GristRegistry.addGristConversion(new ItemStack(beverage, 1, 3), new GristSet(new GristType[] { GristType.Cobalt, GristType.Iodine }, new int[] { 1, 1 }));
    // Cotton Candy Faygo
    GristRegistry.addGristConversion(new ItemStack(beverage, 1, 4), new GristSet(new GristType[] { GristType.Cobalt, GristType.Amethyst }, new int[] { 1, 1 }));
    // Creme Faygo
    GristRegistry.addGristConversion(new ItemStack(beverage, 1, 5), new GristSet(new GristType[] { GristType.Cobalt, GristType.Chalk }, new int[] { 1, 1 }));
    // Grape Faygo
    GristRegistry.addGristConversion(new ItemStack(beverage, 1, 6), new GristSet(new GristType[] { GristType.Cobalt, GristType.Shale }, new int[] { 1, 1 }));
    // Moonmist Faygo
    GristRegistry.addGristConversion(new ItemStack(beverage, 1, 7), new GristSet(new GristType[] { GristType.Cobalt, GristType.Amber }, new int[] { 1, 1 }));
    // Peach Faygo
    GristRegistry.addGristConversion(new ItemStack(beverage, 1, 8), new GristSet(new GristType[] { GristType.Cobalt, GristType.Garnet }, new int[] { 1, 1 }));
    // Redpop Faygo
    GristRegistry.addGristConversion(new ItemStack(beverage, 1, 9), new GristSet(new GristType[] { GristType.Cobalt, GristType.Sulfur }, new int[] { 1, 1 }));
    GristRegistry.addGristConversion(new ItemStack(salad), new GristSet(new GristType[] { GristType.Build, GristType.Iodine }, new int[] { 1, 3 }));
    GristRegistry.addGristConversion(new ItemStack(bugOnAStick), new GristSet(new GristType[] { GristType.Build, GristType.Chalk }, new int[] { 1, 1 }));
    GristRegistry.addGristConversion(new ItemStack(chocolateBeetle), new GristSet(new GristType[] { GristType.Chalk, GristType.Iodine }, new int[] { 2, 4 }));
    GristRegistry.addGristConversion(new ItemStack(coneOfFlies), new GristSet(new GristType[] { GristType.Build, GristType.Amber }, new int[] { 2, 2 }));
    GristRegistry.addGristConversion(new ItemStack(grasshopper), new GristSet(new GristType[] { GristType.Iodine, GristType.Amber }, new int[] { 3, 7 }));
    GristRegistry.addGristConversion(new ItemStack(jarOfBugs), new GristSet(new GristType[] { GristType.Build, GristType.Chalk }, new int[] { 5, 3 }));
    GristRegistry.addGristConversion(new ItemStack(onion), new GristSet(new GristType[] { GristType.Iodine }, new int[] { 3 }));
    GristRegistry.addGristConversion(new ItemStack(irradiatedSteak), false, new GristSet(new GristType[] { GristType.Iodine, GristType.Uranium }, new int[] { 12, 1 }));
    GristRegistry.addGristConversion(primedTnt, new GristSet(new GristType[] { GristType.Build, GristType.Chalk, GristType.Sulfur }, new int[] { 8, 10, 14 }));
    GristRegistry.addGristConversion(unstableTnt, new GristSet(new GristType[] { GristType.Build, GristType.Chalk, GristType.Sulfur }, new int[] { 5, 11, 15 }));
    GristRegistry.addGristConversion(instantTnt, new GristSet(new GristType[] { GristType.Build, GristType.Chalk, GristType.Sulfur }, new int[] { 6, 11, 17 }));
    GristRegistry.addGristConversion(stoneExplosiveButton, new GristSet(new GristType[] { GristType.Build, GristType.Chalk, GristType.Sulfur }, new int[] { 7, 5, 8 }));
    GristRegistry.addGristConversion(woodenExplosiveButton, new GristSet(new GristType[] { GristType.Build, GristType.Chalk, GristType.Sulfur }, new int[] { 7, 5, 8 }));
    GristRegistry.addGristConversion(new ItemStack(stone, 1, 0), new GristSet(GristType.Build, 4));
    GristRegistry.addGristConversion(new ItemStack(stone, 1, 1), new GristSet(GristType.Build, 4));
    GristRegistry.addGristConversion(new ItemStack(stone, 1, 2), new GristSet(new GristType[] { GristType.Build, GristType.Shale }, new int[] { 2, 1 }));
    GristRegistry.addGristConversion(new ItemStack(stone, 1, 3), new GristSet(new GristType[] { GristType.Build, GristType.Shale }, new int[] { 2, 1 }));
    GristRegistry.addGristConversion(new ItemStack(stone, 1, 4), new GristSet(new GristType[] { GristType.Build, GristType.Cobalt }, new int[] { 2, 1 }));
    GristRegistry.addGristConversion(new ItemStack(stone, 1, 5), new GristSet(new GristType[] { GristType.Build, GristType.Cobalt }, new int[] { 2, 1 }));
    GristRegistry.addGristConversion(new ItemStack(stone, 1, 6), new GristSet(new GristType[] { GristType.Build, GristType.Cobalt }, new int[] { 3, 1 }));
    GristRegistry.addGristConversion(new ItemStack(stone, 1, 7), new GristSet(new GristType[] { GristType.Build, GristType.Rust }, new int[] { 3, 2 }));
    GristRegistry.addGristConversion(new ItemStack(stone, 1, 8), new GristSet(new GristType[] { GristType.Build, GristType.Rust }, new int[] { 3, 2 }));
    GristRegistry.addGristConversion(new ItemStack(log, 1, 0), new GristSet(new GristType[] { GristType.Build }, new int[] { 4 }));
    GristRegistry.addGristConversion(new ItemStack(log, 1, 1), new GristSet(new GristType[] { GristType.Build, GristType.Iodine }, new int[] { 4, 1 }));
    GristRegistry.addGristConversion(new ItemStack(sbahjPoster), new GristSet(new GristType[] { GristType.Build }, new int[] { 4 }));
    GristRegistry.addGristConversion(new ItemStack(crewPoster), new GristSet(new GristType[] { GristType.Tar, GristType.Rust }, new int[] { 3, 2 }));
    GristRegistry.addGristConversion(new ItemStack(threshDvd), new GristSet(new GristType[] { GristType.Iodine, GristType.Amethyst }, new int[] { 3, 2 }));
    GristRegistry.addGristConversion(new ItemStack(carvingTool), new GristSet(new GristType[] { GristType.Build, GristType.Rust }, new int[] { 10, 2 }));
    GristRegistry.addGristConversion(new ItemStack(crumplyHat), new GristSet(new GristType[] { GristType.Build }, new int[] { 20 }));
    GristRegistry.addGristConversion(new ItemStack(frogStatueReplica), new GristSet(new GristType[] { GristType.Build }, new int[] { 30 }));
    GristRegistry.addGristConversion(new ItemStack(stoneSlab), new GristSet(new GristType[] { GristType.Build }, new int[] { 5 }));
    GristRegistry.addGristConversion(woodenCactus, new GristSet(GristType.Build, 7));
    GristRegistry.addGristConversion(new ItemStack(blueCake), new GristSet(new GristType[] { GristType.Shale, GristType.Mercury, GristType.Cobalt, GristType.Diamond }, new int[] { 24, 6, 5, 1 }));
    GristRegistry.addGristConversion(new ItemStack(coldCake), new GristSet(new GristType[] { GristType.Cobalt, GristType.Marble }, new int[] { 15, 12 }));
    GristRegistry.addGristConversion(new ItemStack(redCake), new GristSet(new GristType[] { GristType.Rust, GristType.Chalk, GristType.Iodine, GristType.Garnet }, new int[] { 20, 9, 6, 1 }));
    GristRegistry.addGristConversion(new ItemStack(hotCake), new GristSet(new GristType[] { GristType.Sulfur, GristType.Iodine }, new int[] { 17, 10 }));
    // add Designix and Lathe combinations
    // swords
    CombinationRegistry.addCombination(new ItemStack(Items.WOODEN_SWORD), new ItemStack(Blocks.CACTUS), MODE_AND, false, true, new ItemStack(cactusCutlass));
    CombinationRegistry.addCombination(new ItemStack(Items.WOODEN_SWORD), new ItemStack(sbahjPoster), MODE_AND, false, true, new ItemStack(sord));
    CombinationRegistry.addCombination(new ItemStack(Items.STONE_SWORD), new ItemStack(sbahjPoster), MODE_AND, false, true, new ItemStack(sord));
    CombinationRegistry.addCombination(new ItemStack(Items.STONE_SWORD), new ItemStack(Items.ROTTEN_FLESH), MODE_AND, false, true, new ItemStack(katana));
    CombinationRegistry.addCombination(new ItemStack(Items.IRON_SWORD), new ItemStack(Items.ROTTEN_FLESH), MODE_AND, false, true, new ItemStack(katana));
    CombinationRegistry.addCombination(new ItemStack(Items.IRON_SWORD), new ItemStack(Items.BLAZE_ROD), MODE_AND, false, true, new ItemStack(firePoker));
    CombinationRegistry.addCombination(new ItemStack(Items.IRON_SWORD), new ItemStack(Items.BLAZE_ROD), MODE_OR, false, true, new ItemStack(hotHandle));
    CombinationRegistry.addCombination(new ItemStack(Items.IRON_SWORD), new ItemStack(chessboard), MODE_AND, false, true, new ItemStack(regisword));
    CombinationRegistry.addCombination(new ItemStack(katana), new ItemStack(chessboard), MODE_AND, false, true, new ItemStack(regisword));
    CombinationRegistry.addCombination(new ItemStack(katana), new ItemStack(Blocks.OBSIDIAN), MODE_AND, new ItemStack(unbreakableKatana));
    CombinationRegistry.addCombination(new ItemStack(hotHandle), new ItemStack(Blocks.LAPIS_BLOCK), MODE_OR, new ItemStack(cobaltSabre));
    // axes
    CombinationRegistry.addCombination(new ItemStack(Items.IRON_AXE), new ItemStack(Blocks.PISTON), MODE_AND, false, true, new ItemStack(copseCrusher));
    CombinationRegistry.addCombination(new ItemStack(Items.WOODEN_AXE), new ItemStack(Blocks.ANVIL), MODE_AND, false, true, new ItemStack(blacksmithBane));
    CombinationRegistry.addCombination("record", Items.IRON_AXE, OreDictionary.WILDCARD_VALUE, MODE_AND, new ItemStack(scraxe));
    CombinationRegistry.addCombination(new ItemStack(copseCrusher), new ItemStack(pogoHammer), MODE_AND, new ItemStack(qPHammerAxe));
    CombinationRegistry.addCombination(new ItemStack(qPHammerAxe), new ItemStack(energyCore), MODE_AND, new ItemStack(qFHammerAxe));
    CombinationRegistry.addCombination(new ItemStack(Items.IRON_AXE), new ItemStack(Blocks.REDSTONE_BLOCK), MODE_AND, false, true, new ItemStack(rubyCroak));
    CombinationRegistry.addCombination(new ItemStack(Items.GOLDEN_AXE), new ItemStack(Items.LAVA_BUCKET), MODE_AND, false, true, new ItemStack(hephaestusLumber));
    // sickles
    CombinationRegistry.addCombination(new ItemStack(Items.IRON_HOE), new ItemStack(Items.WHEAT), MODE_AND, false, true, new ItemStack(sickle));
    CombinationRegistry.addCombination(new ItemStack(sickle), new ItemStack(threshDvd), MODE_OR, false, true, new ItemStack(homesSmellYaLater));
    CombinationRegistry.addCombination(new ItemStack(sickle), new ItemStack(Items.DYE, 1, 3), MODE_OR, false, true, new ItemStack(fudgeSickle));
    CombinationRegistry.addCombination(new ItemStack(sickle), new ItemStack(chessboard), MODE_AND, false, true, new ItemStack(regiSickle));
    CombinationRegistry.addCombination(new ItemStack(sickle), new ItemStack(candy, 1, 0), MODE_OR, false, true, new ItemStack(candySickle));
    CombinationRegistry.addCombination(new ItemStack(fudgeSickle), new ItemStack(Items.SUGAR), MODE_AND, false, true, new ItemStack(candySickle));
    // clubs
    CombinationRegistry.addCombination(new ItemStack(deuceClub), new ItemStack(Items.SLIME_BALL), MODE_AND, false, true, new ItemStack(pogoClub));
    CombinationRegistry.addCombination(new ItemStack(deuceClub), new ItemStack(crewPoster), MODE_AND, false, true, new ItemStack(nightClub));
    CombinationRegistry.addCombination(new ItemStack(deuceClub), new ItemStack(Items.IRON_INGOT), MODE_AND, false, true, new ItemStack(metalBat));
    CombinationRegistry.addCombination("logWood", metalBat, OreDictionary.WILDCARD_VALUE, MODE_OR, new ItemStack(spikedClub));
    // hammers
    CombinationRegistry.addCombination(new ItemStack(clawHammer), new ItemStack(Blocks.BRICK_BLOCK), MODE_AND, false, false, new ItemStack(sledgeHammer));
    CombinationRegistry.addCombination(new ItemStack(clawHammer), new ItemStack(Blocks.COBBLESTONE), MODE_AND, false, false, new ItemStack(sledgeHammer));
    CombinationRegistry.addCombination(new ItemStack(Blocks.ANVIL), new ItemStack(sledgeHammer), MODE_AND, false, false, new ItemStack(blacksmithHammer));
    CombinationRegistry.addCombination(new ItemStack(Blocks.IRON_BLOCK), new ItemStack(sledgeHammer), MODE_AND, false, false, new ItemStack(blacksmithHammer));
    CombinationRegistry.addCombination(new ItemStack(Items.SLIME_BALL), new ItemStack(sledgeHammer), MODE_AND, false, false, new ItemStack(pogoHammer));
    CombinationRegistry.addCombination(new ItemStack(clawHammer), new ItemStack(chessboard), MODE_AND, false, true, new ItemStack(regiHammer));
    CombinationRegistry.addCombination(new ItemStack(blacksmithHammer), new ItemStack(Items.CLOCK), MODE_OR, false, false, new ItemStack(fearNoAnvil));
    CombinationRegistry.addCombination(new ItemStack(sledgeHammer), new ItemStack(Items.BOOK), MODE_AND, false, false, new ItemStack(telescopicSassacrusher));
    // canes
    CombinationRegistry.addCombination(new ItemStack(cane), new ItemStack(Items.IRON_SWORD), MODE_OR, false, false, new ItemStack(spearCane));
    CombinationRegistry.addCombination(new ItemStack(cane), new ItemStack(katana), MODE_OR, false, false, new ItemStack(spearCane));
    CombinationRegistry.addCombination(new ItemStack(ironCane), new ItemStack(Items.STONE_SWORD), MODE_OR, false, false, new ItemStack(spearCane));
    CombinationRegistry.addCombination(new ItemStack(ironCane), new ItemStack(Items.IRON_SWORD), MODE_OR, false, false, new ItemStack(spearCane));
    CombinationRegistry.addCombination(new ItemStack(ironCane), new ItemStack(katana), MODE_OR, false, false, new ItemStack(spearCane));
    CombinationRegistry.addCombination(new ItemStack(cane), new ItemStack(chessboard), MODE_AND, false, true, new ItemStack(regiCane));
    CombinationRegistry.addCombination(new ItemStack(ironCane), new ItemStack(chessboard), MODE_AND, false, true, new ItemStack(regiCane));
    CombinationRegistry.addCombination(new ItemStack(Items.STICK), new ItemStack(rawUranium), MODE_OR, false, false, new ItemStack(upStick));
    // spoons/sporks/forks
    CombinationRegistry.addCombination(new ItemStack(woodenSpoon), new ItemStack(Items.IRON_INGOT), MODE_AND, false, false, new ItemStack(silverSpoon));
    CombinationRegistry.addCombination(new ItemStack(silverSpoon), new ItemStack(Items.CAKE), MODE_AND, false, false, new ItemStack(crockerSpork));
    CombinationRegistry.addCombination(new ItemStack(fork), new ItemStack(chessboard), MODE_AND, false, true, new ItemStack(skaiaFork));
    CombinationRegistry.addCombination(new ItemStack(fork), new ItemStack(woodenSpoon), MODE_OR, false, false, new ItemStack(spork));
    CombinationRegistry.addCombination(new ItemStack(crockerSpork), new ItemStack(captchaCard), MODE_OR, false, true, new ItemStack(crockerMachine, 1, 0));
    CombinationRegistry.addCombination(new ItemStack(Items.ENDER_PEARL), new ItemStack(Blocks.IRON_BLOCK), MODE_AND, false, false, new ItemStack(transportalizer));
    CombinationRegistry.addCombination(new ItemStack(modusCard, 1, 0), new ItemStack(modusCard, 1, 1), MODE_AND, true, true, new ItemStack(modusCard, 1, 2));
    CombinationRegistry.addCombination("stickWood", modusCard, OreDictionary.WILDCARD_VALUE, MODE_OR, new ItemStack(modusCard, 1, 3));
    CombinationRegistry.addCombination("treeSapling", modusCard, OreDictionary.WILDCARD_VALUE, MODE_OR, new ItemStack(modusCard, 1, 3));
    // Not planks and logs though. Too little branch-related.
    CombinationRegistry.addCombination("treeLeaves", modusCard, OreDictionary.WILDCARD_VALUE, MODE_OR, new ItemStack(modusCard, 1, 3));
    CombinationRegistry.addCombination(new ItemStack(modusCard), new ItemStack(blockComputerOff), MODE_AND, false, true, new ItemStack(modusCard, 1, 4));
    CombinationRegistry.addCombination(new ItemStack(modusCard), new ItemStack(Items.ITEM_FRAME), MODE_AND, false, true, new ItemStack(modusCard, 1, 5));
    CombinationRegistry.addCombination(new ItemStack(Blocks.IRON_BARS), new ItemStack(Items.LEATHER), MODE_AND, false, true, new ItemStack(catClaws));
    CombinationRegistry.addCombination(new ItemStack(Items.WHEAT_SEEDS), new ItemStack(Items.GOLD_NUGGET), MODE_AND, new ItemStack(goldSeeds));
    CombinationRegistry.addCombination(new ItemStack(Items.WHEAT_SEEDS), new ItemStack(Items.GOLD_INGOT), MODE_AND, new ItemStack(goldSeeds));
    CombinationRegistry.addCombination(new ItemStack(Items.BOAT), new ItemStack(Items.MINECART), MODE_OR, new ItemStack(metalBoat, 1, 0));
    CombinationRegistry.addCombination(new ItemStack(Items.BOAT), new ItemStack(Items.IRON_INGOT), MODE_AND, new ItemStack(metalBoat, 1, 0));
    CombinationRegistry.addCombination(new ItemStack(Items.BOAT), new ItemStack(Blocks.IRON_BLOCK), MODE_AND, new ItemStack(metalBoat, 1, 0));
    CombinationRegistry.addCombination(new ItemStack(Items.BOAT), new ItemStack(Items.GOLD_INGOT), MODE_AND, new ItemStack(metalBoat, 1, 1));
    CombinationRegistry.addCombination(new ItemStack(Items.BOAT), new ItemStack(Blocks.GOLD_BLOCK), MODE_AND, new ItemStack(metalBoat, 1, 1));
    CombinationRegistry.addCombination(new ItemStack(Blocks.DIRT), new ItemStack(Items.DYE, 1, EnumDyeColor.BLUE.getDyeDamage()), MODE_OR, new ItemStack(coloredDirt, 1, 0));
    CombinationRegistry.addCombination(new ItemStack(Blocks.DIRT), new ItemStack(Items.DYE, 1, EnumDyeColor.LIME.getDyeDamage()), MODE_OR, new ItemStack(coloredDirt, 1, 1));
    CombinationRegistry.addCombination(new ItemStack(Blocks.SAND), new ItemStack(Blocks.SNOW_LAYER), MODE_OR, new ItemStack(layeredSand));
    // water_bucket && lava bucket could make a bucket with liquid obsidian? (from a mod that adds liquid obsidian)
    CombinationRegistry.addCombination(new ItemStack(Items.WATER_BUCKET), new ItemStack(Items.LAVA_BUCKET), MODE_OR, new ItemStack(obsidianBucket));
    // bucket || obsidian could make a bucket made out of obsidian
    CombinationRegistry.addCombination(new ItemStack(Items.BUCKET), new ItemStack(Blocks.OBSIDIAN), MODE_AND, new ItemStack(obsidianBucket));
    CombinationRegistry.addCombination(new ItemStack(Blocks.BROWN_MUSHROOM), new ItemStack(Items.GLOWSTONE_DUST), MODE_OR, new ItemStack(glowingMushroom));
    CombinationRegistry.addCombination(new ItemStack(Blocks.LOG), new ItemStack(glowingMushroom), MODE_OR, false, true, new ItemStack(glowingLog));
    CombinationRegistry.addCombination(new ItemStack(Blocks.LOG2), new ItemStack(glowingMushroom), MODE_OR, false, true, new ItemStack(glowingLog));
    CombinationRegistry.addCombination(new ItemStack(Blocks.PLANKS), new ItemStack(glowingMushroom), MODE_OR, false, true, new ItemStack(glowingPlanks));
    CombinationRegistry.addCombination(new ItemStack(Items.SUGAR), new ItemStack(Items.WHEAT_SEEDS), MODE_AND, new ItemStack(candy, 1, 0));
    CombinationRegistry.addCombination(new ItemStack(Items.WOODEN_SHOVEL), new ItemStack(Items.BOWL), MODE_AND, new ItemStack(woodenSpoon));
    CombinationRegistry.addCombination(new ItemStack(Items.WOODEN_SHOVEL), new ItemStack(Items.MUSHROOM_STEW), MODE_AND, new ItemStack(woodenSpoon));
    CombinationRegistry.addCombination(new ItemStack(Items.WOODEN_SHOVEL), new ItemStack(Items.RABBIT_STEW), MODE_AND, new ItemStack(woodenSpoon));
    CombinationRegistry.addCombination(new ItemStack(Items.WOODEN_SHOVEL), new ItemStack(Items.BEETROOT_SOUP), MODE_AND, new ItemStack(woodenSpoon));
    CombinationRegistry.addCombination(new ItemStack(Items.IRON_SHOVEL), new ItemStack(Items.BOWL), MODE_AND, new ItemStack(silverSpoon));
    CombinationRegistry.addCombination(new ItemStack(Items.IRON_SHOVEL), new ItemStack(Items.MUSHROOM_STEW), MODE_AND, new ItemStack(silverSpoon));
    CombinationRegistry.addCombination(new ItemStack(Items.IRON_SHOVEL), new ItemStack(Items.RABBIT_STEW), MODE_AND, new ItemStack(silverSpoon));
    CombinationRegistry.addCombination(new ItemStack(Items.IRON_SHOVEL), new ItemStack(Items.BEETROOT_SOUP), MODE_AND, new ItemStack(silverSpoon));
    if (oreMultiplier != 0) {
        CombinationRegistry.addCombination(new ItemStack(Items.COAL), new ItemStack(Blocks.NETHERRACK), MODE_AND, new ItemStack(coalOreNetherrack));
        CombinationRegistry.addCombination(new ItemStack(Items.IRON_INGOT), new ItemStack(Blocks.SANDSTONE), MODE_AND, new ItemStack(ironOreSandstone));
        CombinationRegistry.addCombination(new ItemStack(Items.IRON_INGOT), new ItemStack(Blocks.RED_SANDSTONE), MODE_AND, new ItemStack(ironOreSandstoneRed));
        CombinationRegistry.addCombination(new ItemStack(Items.GOLD_INGOT), new ItemStack(Blocks.SANDSTONE), MODE_AND, new ItemStack(goldOreSandstone));
        CombinationRegistry.addCombination(new ItemStack(Items.GOLD_INGOT), new ItemStack(Blocks.RED_SANDSTONE), MODE_AND, new ItemStack(goldOreSandstoneRed));
    }
    CombinationRegistry.addCombination(new ItemStack(Items.DIAMOND_SWORD), new ItemStack(Items.EMERALD), MODE_OR, false, false, new ItemStack(emeraldSword));
    CombinationRegistry.addCombination(new ItemStack(Items.DIAMOND_AXE), new ItemStack(Items.EMERALD), MODE_OR, false, false, new ItemStack(emeraldAxe));
    CombinationRegistry.addCombination(new ItemStack(Items.DIAMOND_PICKAXE), new ItemStack(Items.EMERALD), MODE_OR, false, false, new ItemStack(emeraldPickaxe));
    CombinationRegistry.addCombination(new ItemStack(Items.DIAMOND_SHOVEL), new ItemStack(Items.EMERALD), MODE_OR, false, false, new ItemStack(emeraldShovel));
    CombinationRegistry.addCombination(new ItemStack(Items.DIAMOND_HOE), new ItemStack(Items.EMERALD), MODE_OR, false, false, new ItemStack(emeraldHoe));
    ItemArmor[] metalHelmets = new ItemArmor[] { Items.IRON_HELMET, Items.GOLDEN_HELMET, Items.DIAMOND_HELMET };
    ItemArmor[] metalChestplates = new ItemArmor[] { Items.IRON_CHESTPLATE, Items.GOLDEN_CHESTPLATE, Items.DIAMOND_CHESTPLATE };
    ItemArmor[] metalLeggings = new ItemArmor[] { Items.IRON_LEGGINGS, Items.GOLDEN_LEGGINGS, Items.DIAMOND_LEGGINGS };
    ItemArmor[] metalBoots = new ItemArmor[] { Items.IRON_BOOTS, Items.GOLDEN_BOOTS, Items.DIAMOND_BOOTS };
    for (// Two out of three possible for-loops is enough for me
    int i = 0; // Two out of three possible for-loops is enough for me
    i < metalHelmets.length; // Two out of three possible for-loops is enough for me
    i++) for (ItemStack prismarine : new ItemStack[] { new ItemStack(Items.PRISMARINE_SHARD), new ItemStack(Blocks.PRISMARINE) }) {
        CombinationRegistry.addCombination(new ItemStack(metalHelmets[i]), prismarine, MODE_OR, false, false, new ItemStack(prismarineHelmet));
        CombinationRegistry.addCombination(new ItemStack(metalChestplates[i]), prismarine, MODE_OR, false, false, new ItemStack(prismarineChestplate));
        CombinationRegistry.addCombination(new ItemStack(metalLeggings[i]), prismarine, MODE_OR, false, false, new ItemStack(prismarineLeggings));
        CombinationRegistry.addCombination(new ItemStack(metalBoots[i]), prismarine, MODE_OR, false, false, new ItemStack(prismarineBoots));
    }
    CombinationRegistry.addCombination(new ItemStack(Blocks.TNT), new ItemStack(Blocks.STONE_BUTTON), MODE_OR, new ItemStack(primedTnt));
    CombinationRegistry.addCombination(new ItemStack(Blocks.TNT), new ItemStack(Blocks.WOODEN_BUTTON), MODE_OR, new ItemStack(primedTnt));
    CombinationRegistry.addCombination(new ItemStack(Blocks.TNT), new ItemStack(Blocks.REDSTONE_TORCH), MODE_OR, new ItemStack(unstableTnt));
    // Instant damage potions
    CombinationRegistry.addCombination(new ItemStack(Blocks.TNT), new ItemStack(Items.POTIONITEM, 1, 8236), MODE_OR, true, true, new ItemStack(instantTnt));
    CombinationRegistry.addCombination(new ItemStack(Blocks.TNT), new ItemStack(Items.POTIONITEM, 1, 8268), MODE_OR, true, true, new ItemStack(instantTnt));
    CombinationRegistry.addCombination(new ItemStack(Blocks.TNT), new ItemStack(Blocks.STONE_BUTTON), MODE_AND, new ItemStack(stoneExplosiveButton));
    CombinationRegistry.addCombination(new ItemStack(instantTnt), new ItemStack(Blocks.STONE_BUTTON), MODE_AND, new ItemStack(stoneExplosiveButton));
    CombinationRegistry.addCombination(new ItemStack(Blocks.TNT), new ItemStack(Blocks.WOODEN_BUTTON), MODE_AND, new ItemStack(woodenExplosiveButton));
    CombinationRegistry.addCombination(new ItemStack(instantTnt), new ItemStack(Blocks.WOODEN_BUTTON), MODE_AND, new ItemStack(woodenExplosiveButton));
    CombinationRegistry.addCombination(new ItemStack(Blocks.GRAVEL), new ItemStack(Blocks.STONE), MODE_AND, new ItemStack(stone, 1, BlockMinestuckStone.COARSE_META));
    CombinationRegistry.addCombination(new ItemStack(Blocks.GRAVEL), new ItemStack(Blocks.STONEBRICK, 1, BlockStoneBrick.CHISELED_META), MODE_AND, new ItemStack(stone, 1, BlockMinestuckStone.COARSE_CHISELED_META));
    CombinationRegistry.addCombination(new ItemStack(stone, 1, BlockMinestuckStone.COARSE_META), new ItemStack(Blocks.STONEBRICK, 1, BlockStoneBrick.CHISELED_META), MODE_AND, new ItemStack(stone, 1, BlockMinestuckStone.COARSE_CHISELED_META));
    CombinationRegistry.addCombination(new ItemStack(Blocks.STONEBRICK), new ItemStack(coloredDirt, 1, 0), MODE_OR, new ItemStack(stone, 1, BlockMinestuckStone.SHADE_META));
    CombinationRegistry.addCombination(new ItemStack(Blocks.STONE_BRICK_STAIRS), new ItemStack(coloredDirt, 1, 0), MODE_OR, new ItemStack(shadeBrickStairs));
    CombinationRegistry.addCombination(new ItemStack(Blocks.STONEBRICK), new ItemStack(Items.DYE, 1, EnumDyeColor.BLUE.getDyeDamage()), MODE_OR, new ItemStack(stone, 1, BlockMinestuckStone.SHADE_META));
    CombinationRegistry.addCombination(new ItemStack(Blocks.STONE_BRICK_STAIRS), new ItemStack(Items.DYE, 1, EnumDyeColor.BLUE.getDyeDamage()), MODE_OR, new ItemStack(shadeBrickStairs));
    for (// Stone and polished stone
    int i = 0; // Stone and polished stone
    i <= 6; // Stone and polished stone
    i += 2) {
        CombinationRegistry.addCombination(new ItemStack(Blocks.STONE, 1, i), new ItemStack(coloredDirt, 1, 0), MODE_OR, new ItemStack(stone, 1, BlockMinestuckStone.SHADE_SMOOTH_META));
        CombinationRegistry.addCombination(new ItemStack(Blocks.STONE, 1, i), new ItemStack(Items.DYE, 1, EnumDyeColor.BLUE.getDyeDamage()), MODE_OR, new ItemStack(stone, 1, BlockMinestuckStone.SHADE_SMOOTH_META));
        CombinationRegistry.addCombination(new ItemStack(Blocks.STONE, 1, i), new ItemStack(Blocks.ICE), MODE_AND, new ItemStack(stone, 1, BlockMinestuckStone.FROST_TILE_META));
        CombinationRegistry.addCombination(new ItemStack(Blocks.STONE, 1, i), new ItemStack(Blocks.PACKED_ICE), MODE_AND, new ItemStack(stone, 1, BlockMinestuckStone.FROST_TILE_META));
    }
    CombinationRegistry.addCombination(new ItemStack(Blocks.STONEBRICK), new ItemStack(Blocks.ICE), MODE_AND, new ItemStack(stone, 1, BlockMinestuckStone.FROST_META));
    CombinationRegistry.addCombination(new ItemStack(Blocks.STONEBRICK), new ItemStack(Blocks.PACKED_ICE), MODE_AND, new ItemStack(stone, 1, BlockMinestuckStone.FROST_META));
    CombinationRegistry.addCombination(new ItemStack(Blocks.STONEBRICK, 1, BlockStoneBrick.CHISELED_META), new ItemStack(Blocks.ICE), MODE_AND, new ItemStack(stone, 1, BlockMinestuckStone.FROST_CHISELED_META));
    CombinationRegistry.addCombination(new ItemStack(Blocks.STONEBRICK, 1, BlockStoneBrick.CHISELED_META), new ItemStack(Blocks.PACKED_ICE), MODE_AND, new ItemStack(stone, 1, BlockMinestuckStone.FROST_CHISELED_META));
    CombinationRegistry.addCombination(new ItemStack(Blocks.IRON_BLOCK), new ItemStack(Items.LAVA_BUCKET), MODE_AND, new ItemStack(stone, 1, BlockMinestuckStone.CAST_META));
    CombinationRegistry.addCombination(new ItemStack(Blocks.STONEBRICK, 1, BlockStoneBrick.CHISELED_META), new ItemStack(stone, 1, BlockMinestuckStone.CAST_META), MODE_OR, new ItemStack(stone, 1, BlockMinestuckStone.CAST_CHISELED_META));
    CombinationRegistry.addCombination(new ItemStack(Blocks.LOG, 1, 0), new ItemStack(Blocks.VINE), MODE_AND, new ItemStack(log, 1, 0));
    CombinationRegistry.addCombination(new ItemStack(log, 1, 0), new ItemStack(Blocks.YELLOW_FLOWER), MODE_OR, true, false, new ItemStack(log, 1, 1));
    CombinationRegistry.addCombination(new ItemStack(log, 1, 0), new ItemStack(Blocks.RED_FLOWER), MODE_OR, true, false, new ItemStack(log, 1, 1));
    CombinationRegistry.addCombination(new ItemStack(Items.WOODEN_SWORD), new ItemStack(Blocks.CACTUS), MODE_OR, false, true, new ItemStack(woodenCactus));
    CombinationRegistry.addCombination(new ItemStack(Blocks.PLANKS), new ItemStack(Blocks.CACTUS), MODE_OR, false, true, new ItemStack(woodenCactus));
    CombinationRegistry.addCombination(new ItemStack(Blocks.LOG), new ItemStack(Blocks.CACTUS), MODE_OR, false, true, new ItemStack(woodenCactus));
    CombinationRegistry.addCombination(new ItemStack(Blocks.LOG2), new ItemStack(Blocks.CACTUS), MODE_OR, false, true, new ItemStack(woodenCactus));
    CombinationRegistry.addCombination(new ItemStack(Blocks.STONE), new ItemStack(carvingTool), MODE_AND, false, true, new ItemStack(stoneSlab));
    CombinationRegistry.addCombination(new ItemStack(Items.REDSTONE), new ItemStack(Items.GLOWSTONE_DUST), MODE_OR, new ItemStack(glowystoneDust));
    CombinationRegistry.addCombination(new ItemStack(Items.CAKE), new ItemStack(Items.APPLE), MODE_OR, new ItemStack(appleCake));
    CombinationRegistry.addCombination(new ItemStack(Items.CAKE), new ItemStack(glowingMushroom), MODE_OR, new ItemStack(blueCake));
    CombinationRegistry.addCombination(new ItemStack(Items.CAKE), new ItemStack(Blocks.ICE), MODE_OR, new ItemStack(coldCake));
    CombinationRegistry.addCombination(new ItemStack(Items.CAKE), new ItemStack(Blocks.PACKED_ICE), MODE_OR, new ItemStack(coldCake));
    CombinationRegistry.addCombination(new ItemStack(Items.CAKE), new ItemStack(Items.MELON), MODE_OR, new ItemStack(redCake));
    CombinationRegistry.addCombination(new ItemStack(Items.CAKE), new ItemStack(Items.SPECKLED_MELON), MODE_OR, new ItemStack(redCake));
    CombinationRegistry.addCombination(new ItemStack(Items.CAKE), new ItemStack(Items.LAVA_BUCKET), MODE_OR, new ItemStack(hotCake));
    CombinationRegistry.addCombination(new ItemStack(Items.CAKE), new ItemStack(Items.BLAZE_POWDER), MODE_OR, new ItemStack(hotCake));
    CombinationRegistry.addCombination(new ItemStack(Items.CAKE), new ItemStack(Blocks.MAGMA), MODE_OR, new ItemStack(hotCake));
    // Uranium-based non-weapon and uranium cooker recipes
    CombinationRegistry.addCombination(new ItemStack(rawCruxite), new ItemStack(rawUranium), MODE_AND, new ItemStack(energyCore));
    CombinationRegistry.addCombination(new ItemStack(rawUranium), new ItemStack(Items.COOKED_BEEF), MODE_OR, new ItemStack(irradiatedSteak));
    CombinationRegistry.addCombination(new ItemStack(upStick), new ItemStack(energyCore), MODE_AND, new ItemStack(quantumSabre));
    TileEntityUraniumCooker.setRadiation(Items.BEEF, new ItemStack(irradiatedSteak));
    TileEntityUraniumCooker.setRadiation(Items.STICK, new ItemStack(upStick));
    TileEntityUraniumCooker.setRadiation(Items.MUSHROOM_STEW, new ItemStack(Items.SLIME_BALL));
    Item ectoSlime = Item.REGISTRY.getObject(new ResourceLocation("minestuckarsenal", "blue_ecto_slime"));
    if (ectoSlime != null) {
        TileEntityUraniumCooker.setRadiation(ectoSlime, new ItemStack(Items.SLIME_BALL));
    }
    // CombinationRegistry.addCombination(new ItemStack(Items.POTIONITEM, 1, 0), new ItemStack(Items.SUGAR), MODE_OR, false, false, new ItemStack(beverage, 1, 0));		//Tab
    // CombinationRegistry.addCombination(new ItemStack(Items.POTIONITEM, 1, 0), new ItemStack(Items.DYE, 1, 14), MODE_OR, false, true, new ItemStack(beverage, 1, 1));	//Orange F
    // CombinationRegistry.addCombination(new ItemStack(beverage, 1, 1), new ItemStack(Items.APPLE), MODE_OR, true, false, new ItemStack(beverage, 1, 2));					//CandyApple F
    // CombinationRegistry.addCombination(new ItemStack(beverage, 1, 1), new ItemStack(beverage, 1, 0), MODE_OR, true, true, new ItemStack(beverage, 1, 3));				//Cola F
    // CombinationRegistry.addCombination(new ItemStack(beverage, 1, 1), new ItemStack(Blocks.WOOL, 1, 3), MODE_OR, true, true, new ItemStack(beverage, 1, 4));			//Cotton Candy F
    // CombinationRegistry.addCombination(new ItemStack(beverage, 1, 1), new ItemStack(Items.MILK_BUCKET), MODE_OR, true, false, new ItemStack(beverage, 1, 5));			//Creme F
    // CombinationRegistry.addCombination(new ItemStack(beverage, 1, 1), new ItemStack(Items.CHORUS_FRUIT), MODE_OR, true, false, new ItemStack(beverage, 1, 6));			//Grape F
    // CombinationRegistry.addCombination(new ItemStack(beverage, 1, 1), new ItemStack(Items.DYE, 1, 10), MODE_OR, true, true, new ItemStack(beverage, 1, 7));				//Moonmist F
    // CombinationRegistry.addCombination(new ItemStack(beverage, 1, 2), new ItemStack(Items.DYE, 1, 9), MODE_AND, true, true, new ItemStack(beverage, 1, 8));				//Peach F
    // CombinationRegistry.addCombination(new ItemStack(beverage, 1, 1), new ItemStack(Blocks.TNT), MODE_OR, true, false, new ItemStack(beverage, 1, 9));					//Redpop F
    // Register chest loot
    LootConditionManager.registerCondition(new LandAspectLootCondition.Serializer());
/*if(MinestuckConfig.cardLoot)
		{
			ChestGenHooks.getInfo(ChestGenHooks.DUNGEON_CHEST).addItem(new WeightedRandomChestContent(captchaCard, 0, 1, 3, 10));
			ChestGenHooks.getInfo(ChestGenHooks.STRONGHOLD_CROSSING).addItem(new WeightedRandomChestContent(captchaCard, 0, 1, 2, 8));
			ChestGenHooks.getInfo(ChestGenHooks.STRONGHOLD_CORRIDOR).addItem(new WeightedRandomChestContent(captchaCard, 0, 1, 4, 10));
		}*/
}
Also used : Item(net.minecraft.item.Item) LandAspectLootCondition(com.mraof.minestuck.world.storage.loot.conditions.LandAspectLootCondition) ItemArmor(net.minecraft.item.ItemArmor) ResourceLocation(net.minecraft.util.ResourceLocation) ItemStack(net.minecraft.item.ItemStack)

Example 34 with ItemArmor

use of net.minecraft.item.ItemArmor in project minecolonies by Minecolonies.

the class AbstractEntityAIGuard method updateArmor.

/**
 * Updates the equipment. Always take the first item of each type and set it.
 */
protected void updateArmor() {
    worker.setItemStackToSlot(EntityEquipmentSlot.CHEST, ItemStackUtils.EMPTY);
    worker.setItemStackToSlot(EntityEquipmentSlot.FEET, ItemStackUtils.EMPTY);
    worker.setItemStackToSlot(EntityEquipmentSlot.HEAD, ItemStackUtils.EMPTY);
    worker.setItemStackToSlot(EntityEquipmentSlot.LEGS, ItemStackUtils.EMPTY);
    for (int i = 0; i < new InvWrapper(worker.getInventoryCitizen()).getSlots(); i++) {
        final ItemStack stack = worker.getInventoryCitizen().getStackInSlot(i);
        if (ItemStackUtils.isEmpty(stack)) {
            new InvWrapper(worker.getInventoryCitizen()).extractItem(i, Integer.MAX_VALUE, false);
            continue;
        }
        if (stack.getItem() instanceof ItemArmor && worker.getItemStackFromSlot(((ItemArmor) stack.getItem()).armorType) == ItemStackUtils.EMPTY) {
            worker.setItemStackToSlot(((ItemArmor) stack.getItem()).armorType, stack);
        }
    }
}
Also used : InvWrapper(net.minecraftforge.items.wrapper.InvWrapper) ItemArmor(net.minecraft.item.ItemArmor) ItemStack(net.minecraft.item.ItemStack)

Example 35 with ItemArmor

use of net.minecraft.item.ItemArmor in project minecolonies by Minecolonies.

the class AbstractEntityAIGuard method goToBuilding.

/**
 * Goes back to the building and tries to take armour from it when he hasn't in his inventory.
 *
 * @return the next state to go to.
 */
protected AIState goToBuilding() {
    if (walkToBuilding()) {
        return GUARD_RESTOCK;
    }
    final AbstractBuildingWorker workBuilding = getOwnBuilding();
    if (workBuilding != null) {
        final TileEntityColonyBuilding chest = workBuilding.getTileEntity();
        for (int i = 0; i < workBuilding.getTileEntity().getSizeInventory(); i++) {
            final ItemStack stack = chest.getStackInSlot(i);
            if (ItemStackUtils.isEmpty(stack)) {
                continue;
            }
            if (stack.getItem() instanceof ItemArmor && worker.getItemStackFromSlot(((ItemArmor) stack.getItem()).armorType) == null) {
                final int emptySlot = InventoryUtils.findFirstSlotInItemHandlerWith(new InvWrapper(worker.getInventoryCitizen()), ItemStackUtils::isEmpty);
                if (emptySlot != -1) {
                    new InvWrapper(worker.getInventoryCitizen()).insertItem(emptySlot, stack, false);
                    chest.setInventorySlotContents(i, ItemStackUtils.EMPTY);
                }
            }
            dumpAfterActions = DUMP_BASE * workBuilding.getBuildingLevel();
        }
    }
    attacksExecuted = 0;
    return GUARD_SEARCH_TARGET;
}
Also used : AbstractBuildingWorker(com.minecolonies.coremod.colony.buildings.AbstractBuildingWorker) TileEntityColonyBuilding(com.minecolonies.coremod.tileentities.TileEntityColonyBuilding) ItemArmor(net.minecraft.item.ItemArmor) InvWrapper(net.minecraftforge.items.wrapper.InvWrapper) ItemStack(net.minecraft.item.ItemStack)

Aggregations

ItemArmor (net.minecraft.item.ItemArmor)45 ItemStack (net.minecraft.item.ItemStack)27 Item (net.minecraft.item.Item)12 NBTTagCompound (net.minecraft.nbt.NBTTagCompound)6 ModelBiped (net.minecraft.client.model.ModelBiped)5 EntityPlayer (net.minecraft.entity.player.EntityPlayer)5 Color (java.awt.Color)4 EntityLivingBase (net.minecraft.entity.EntityLivingBase)4 EntityEquipmentSlot (net.minecraft.inventory.EntityEquipmentSlot)4 IArmorImbuement (am2.api.items.armor.IArmorImbuement)3 InventoryPlayer (net.minecraft.entity.player.InventoryPlayer)3 Slot (net.minecraft.inventory.Slot)3 ArrayList (java.util.ArrayList)2 UUID (java.util.UUID)2 Minecraft (net.minecraft.client.Minecraft)2 TextureManager (net.minecraft.client.renderer.texture.TextureManager)2 AttributeModifier (net.minecraft.entity.ai.attributes.AttributeModifier)2 ItemBlock (net.minecraft.item.ItemBlock)2 ResourceLocation (net.minecraft.util.ResourceLocation)2 SubscribeEvent (net.minecraftforge.fml.common.eventhandler.SubscribeEvent)2