Search in sources :

Example 26 with EnumGem

use of net.silentchaos512.gems.lib.EnumGem in project SilentGems by SilentChaos512.

the class BlockGemOre method addRecipes.

@Override
public void addRecipes(RecipeMaker recipes) {
    ItemStack ore, item;
    for (int i = 0; i < 16; ++i) {
        EnumGem gem = getGem(i);
        ore = gem.getOre();
        item = gem.getItem();
        // Smelting
        recipes.addSmelting(ore, item, 0.5f);
        // SAG Mill
        ModRecipeHelper.addSagMillRecipe(gem.getGemName() + "Ore", ore, item, gemSet == EnumGem.Set.LIGHT ? "endstone" : gemSet == EnumGem.Set.DARK ? "netherrack" : "cobblestone", 3000);
    }
}
Also used : EnumGem(net.silentchaos512.gems.lib.EnumGem) ItemStack(net.minecraft.item.ItemStack)

Example 27 with EnumGem

use of net.silentchaos512.gems.lib.EnumGem in project SilentGems by SilentChaos512.

the class BlockTeleporter method addRecipes.

@Override
public void addRecipes(RecipeMaker recipes) {
    if (GemsConfig.RECIPE_TELEPORTER_DISABLE) {
        return;
    }
    ItemStack[] anyTeleporter = new ItemStack[] { new ItemStack(ModBlocks.teleporter, 1, OreDictionary.WILDCARD_VALUE), new ItemStack(ModBlocks.teleporterDark, 1, OreDictionary.WILDCARD_VALUE) };
    int lastIndex = -1;
    for (int i = 0; i < subBlockCount; ++i) {
        EnumGem gem = getGem(i);
        recipes.addShapedOre(blockName + i, new ItemStack(this, 2, i), "cec", " g ", "cec", 'c', ModItems.craftingMaterial.chaosEssenceEnriched, 'e', ModItems.craftingMaterial.enderEssence, 'g', gem.getBlockOreName());
        for (ItemStack stack : anyTeleporter) {
            recipes.addShapelessOre(blockName + "_" + (++lastIndex) + "_recolor", new ItemStack(this, 1, i), stack, gem.getItemOreName());
        }
    }
}
Also used : EnumGem(net.silentchaos512.gems.lib.EnumGem) ItemStack(net.minecraft.item.ItemStack)

Example 28 with EnumGem

use of net.silentchaos512.gems.lib.EnumGem in project SilentGems by SilentChaos512.

the class BlockTeleporterRedstone method addRecipes.

@Override
public void addRecipes(RecipeMaker recipes) {
    if (GemsConfig.RECIPE_TELEPORTER_REDSTONE_DISABLE) {
        return;
    }
    ItemStack[] anyTeleporter = new ItemStack[] { new ItemStack(ModBlocks.teleporterRedstone, 1, OreDictionary.WILDCARD_VALUE), new ItemStack(ModBlocks.teleporterRedstoneDark, 1, OreDictionary.WILDCARD_VALUE), new ItemStack(ModBlocks.teleporterRedstoneLight, 1, OreDictionary.WILDCARD_VALUE) };
    int lastIndex = -1;
    for (int i = 0; i < subBlockCount; ++i) {
        EnumGem gem = getGem(i);
        ItemStack teleporterRedstone = new ItemStack(this, 1, i);
        ItemStack teleporterBasic = getBasicTeleporter(i);
        recipes.addShapelessOre(blockName + i, teleporterRedstone, teleporterBasic, "dustRedstone");
        for (ItemStack stack : anyTeleporter) {
            recipes.addShapelessOre(blockName + "_" + (++lastIndex) + "_recolor", new ItemStack(this, 1, i), stack, gem.getItemOreName());
        }
    }
}
Also used : EnumGem(net.silentchaos512.gems.lib.EnumGem) ItemStack(net.minecraft.item.ItemStack)

Aggregations

EnumGem (net.silentchaos512.gems.lib.EnumGem)27 ItemStack (net.minecraft.item.ItemStack)16 IBlockState (net.minecraft.block.state.IBlockState)4 BlockPos (net.minecraft.util.math.BlockPos)3 Random (java.util.Random)2 IArmor (net.silentchaos512.gems.api.IArmor)2 WeightedRandomItemSG (net.silentchaos512.gems.util.WeightedRandomItemSG)2 RecipeMaker (net.silentchaos512.lib.registry.RecipeMaker)2 Predicate (com.google.common.base.Predicate)1 Block (net.minecraft.block.Block)1 ModelResourceLocation (net.minecraft.client.renderer.block.model.ModelResourceLocation)1 IItemColor (net.minecraft.client.renderer.color.IItemColor)1 ItemColors (net.minecraft.client.renderer.color.ItemColors)1 EntityEquipmentSlot (net.minecraft.inventory.EntityEquipmentSlot)1 Item (net.minecraft.item.Item)1 IRecipe (net.minecraft.item.crafting.IRecipe)1 NBTTagCompound (net.minecraft.nbt.NBTTagCompound)1 EnumFacing (net.minecraft.util.EnumFacing)1 ResourceLocation (net.minecraft.util.ResourceLocation)1 WeightedRandom (net.minecraft.util.WeightedRandom)1