Java Code Examples for net.minecraft.item.crafting.ShapelessRecipes#getRecipeOutput()

The following examples show how to use net.minecraft.item.crafting.ShapelessRecipes#getRecipeOutput() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ShapelessBloodOrbRecipe.java    From Framez with GNU General Public License v3.0 6 votes vote down vote up
@SuppressWarnings("unchecked")
ShapelessBloodOrbRecipe(ShapelessRecipes recipe, Map<ItemStack, String> replacements)
{
    output = recipe.getRecipeOutput();

    for (ItemStack ingred : ((List<ItemStack>) recipe.recipeItems))
    {
        Object finalObj = ingred;
        for (Entry<ItemStack, String> replace : replacements.entrySet())
        {
            if (OreDictionary.itemMatches(replace.getKey(), ingred, false))
            {
                finalObj = OreDictionary.getOres(replace.getValue());
                break;
            }
        }
        input.add(finalObj);
    }
}
 
Example 2
Source File: ShapelessOreRecipeTFC.java    From TFC2 with GNU General Public License v3.0 6 votes vote down vote up
ShapelessOreRecipeTFC(ShapelessRecipes recipe, Map<ItemStack, String> replacements)
{
	output = recipe.getRecipeOutput();

	for(ItemStack ingredient : recipe.recipeItems)
	{
		Object finalObj = ingredient;
		for(Entry<ItemStack, String> replace : replacements.entrySet())
		{
			if(OreDictionary.itemMatches(replace.getKey(), ingredient, false))
			{
				finalObj = OreDictionary.getOres(replace.getValue());
				break;
			}
		}
		input.add(finalObj);
	}
}
 
Example 3
Source File: ShapelessRecipeHandler.java    From NotEnoughItems with MIT License 5 votes vote down vote up
private CachedShapelessRecipe shapelessRecipe(ShapelessRecipes recipe) {
    if (recipe.recipeItems == null) //because some mod subclasses actually do this
    {
        return null;
    }

    return new CachedShapelessRecipe(recipe.recipeItems, recipe.getRecipeOutput());
}
 
Example 4
Source File: ShapelessBloodOrbRecipe.java    From PneumaticCraft with GNU General Public License v3.0 5 votes vote down vote up
@SuppressWarnings("unchecked")
ShapelessBloodOrbRecipe(ShapelessRecipes recipe, Map<ItemStack, String> replacements) {
	output = recipe.getRecipeOutput();

	for (ItemStack ingred : ((List<ItemStack>) recipe.recipeItems)) {
		Object finalObj = ingred;
		for (Entry<ItemStack, String> replace : replacements.entrySet()) {
			if (OreDictionary.itemMatches(replace.getKey(), ingred, false)) {
				finalObj = OreDictionary.getOres(replace.getValue());
				break;
			}
		}
		input.add(finalObj);
	}
}
 
Example 5
Source File: ShapelessRecipeHandler.java    From NotEnoughItems with MIT License 4 votes vote down vote up
private CachedShapelessRecipe shapelessRecipe(ShapelessRecipes recipe) {
    if(recipe.recipeItems == null) //because some mod subclasses actually do this
        return null;

    return new CachedShapelessRecipe(recipe.recipeItems, recipe.getRecipeOutput());
}