本文整理汇总了Java中net.minecraft.item.crafting.ShapelessRecipes.getRecipeOutput方法的典型用法代码示例。如果您正苦于以下问题:Java ShapelessRecipes.getRecipeOutput方法的具体用法?Java ShapelessRecipes.getRecipeOutput怎么用?Java ShapelessRecipes.getRecipeOutput使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraft.item.crafting.ShapelessRecipes
的用法示例。
在下文中一共展示了ShapelessRecipes.getRecipeOutput方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: ShapelessOreRecipe
import net.minecraft.item.crafting.ShapelessRecipes; //导入方法依赖的package包/类
ShapelessOreRecipe(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);
}
}
示例2: removeShapelessRecipe
import net.minecraft.item.crafting.ShapelessRecipes; //导入方法依赖的package包/类
public static void removeShapelessRecipe (ItemStack resultItem)
{
Preconditions.checkNotNull(resultItem);
List<IRecipe> recipes = CraftingManager.getInstance().getRecipeList();
for (int i = 0; i < recipes.size(); i++)
{
IRecipe tmpRecipe = recipes.get(i);
if (tmpRecipe instanceof ShapelessRecipes)
{
ShapelessRecipes recipe = (ShapelessRecipes) tmpRecipe;
ItemStack recipeResult = recipe.getRecipeOutput();
if (ItemStack.areItemStacksEqual(resultItem, recipeResult))
{
recipes.remove(i--);
}
}
}
}
示例3: ShapelessOreRecipeTFC
import net.minecraft.item.crafting.ShapelessRecipes; //导入方法依赖的package包/类
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);
}
}
示例4: ShapelessOreRecipe
import net.minecraft.item.crafting.ShapelessRecipes; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
ShapelessOreRecipe(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);
}
}
示例5: ShapelessBloodOrbRecipe
import net.minecraft.item.crafting.ShapelessRecipes; //导入方法依赖的package包/类
@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);
}
}
示例6: ShapelessOreRecipe
import net.minecraft.item.crafting.ShapelessRecipes; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
ShapelessOreRecipe(ShapelessRecipes recipe, Map<ItemStack, String> replacements)
{
vanillaRecipe = recipe; // Cauldron - bukkit compatibility
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);
}
}
示例7: ShapelessOreRecipe
import net.minecraft.item.crafting.ShapelessRecipes; //导入方法依赖的package包/类
ShapelessOreRecipe(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);
}
}
示例8: removeShapelessRecipe
import net.minecraft.item.crafting.ShapelessRecipes; //导入方法依赖的package包/类
public static void removeShapelessRecipe(ItemStack resultItem) {
List<IRecipe> recipes = CraftingManager.getInstance().getRecipeList();
for (int i = 0; i < recipes.size(); i++) {
IRecipe tmpRecipe = recipes.get(i);
if (tmpRecipe instanceof ShapelessRecipes) {
ShapelessRecipes recipe = (ShapelessRecipes) tmpRecipe;
ItemStack recipeResult = recipe.getRecipeOutput();
if (ItemStack.areItemStacksEqual(resultItem, recipeResult)) {
recipes.remove(i--);
}
}
}
}
示例9: shapelessRecipe
import net.minecraft.item.crafting.ShapelessRecipes; //导入方法依赖的package包/类
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());
}
示例10: ShapelessBloodOrbRecipe
import net.minecraft.item.crafting.ShapelessRecipes; //导入方法依赖的package包/类
@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);
}
}
示例11: shapelessRecipe
import net.minecraft.item.crafting.ShapelessRecipes; //导入方法依赖的package包/类
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());
}