本文整理汇总了Java中net.minecraft.item.crafting.ShapedRecipes.getRecipeOutput方法的典型用法代码示例。如果您正苦于以下问题:Java ShapedRecipes.getRecipeOutput方法的具体用法?Java ShapedRecipes.getRecipeOutput怎么用?Java ShapedRecipes.getRecipeOutput使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraft.item.crafting.ShapedRecipes
的用法示例。
在下文中一共展示了ShapedRecipes.getRecipeOutput方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: ShapedOreRecipe
import net.minecraft.item.crafting.ShapedRecipes; //导入方法依赖的package包/类
ShapedOreRecipe(ShapedRecipes recipe, Map<ItemStack, String> replacements)
{
output = recipe.getRecipeOutput();
width = recipe.recipeWidth;
height = recipe.recipeHeight;
input = new Object[recipe.recipeItems.length];
for(int i = 0; i < input.length; i++)
{
ItemStack ingredient = recipe.recipeItems[i];
if(ingredient == null) continue;
input[i] = recipe.recipeItems[i];
for(Entry<ItemStack, String> replace : replacements.entrySet())
{
if(OreDictionary.itemMatches(replace.getKey(), ingredient, true))
{
input[i] = OreDictionary.getOres(replace.getValue());
break;
}
}
}
}
示例2: ShapedOreCrystalRecipe
import net.minecraft.item.crafting.ShapedRecipes; //导入方法依赖的package包/类
ShapedOreCrystalRecipe(ShapedRecipes recipe, Map<ItemStack, String> replacements)
{
output = recipe.getRecipeOutput();
width = recipe.recipeWidth;
height = recipe.recipeHeight;
input = new Object[recipe.recipeItems.length];
for(int i = 0; i < input.length; i++)
{
ItemStack ingred = recipe.recipeItems[i];
if(ItemStackTools.isEmpty(ingred)) continue;
input[i] = recipe.recipeItems[i];
for(Entry<ItemStack, String> replace : replacements.entrySet())
{
if(OreDictionary.itemMatches(replace.getKey(), ingred, true))
{
input[i] = OreDictionary.getOres(replace.getValue());
break;
}
}
}
}
示例3: RoryShapedRecipe
import net.minecraft.item.crafting.ShapedRecipes; //导入方法依赖的package包/类
RoryShapedRecipe(ShapedRecipes recipe, Map<ItemStack, String> replacements) {
output = recipe.getRecipeOutput();
width = recipe.recipeWidth;
height = recipe.recipeHeight;
input = new Object[recipe.recipeItems.length];
for (int i = 0; i < input.length; i++) {
ItemStack ingred = recipe.recipeItems[i];
if (ingred == null) continue;
input[i] = recipe.recipeItems[i];
for (Entry<ItemStack, String> replace : replacements.entrySet()) {
if (OreDictionary.itemMatches(replace.getKey(), ingred, true)) {
input[i] = OreDictionary.getOres(replace.getValue());
break;
}
}
}
}
示例4: removeShapedRecipe
import net.minecraft.item.crafting.ShapedRecipes; //导入方法依赖的package包/类
public static void removeShapedRecipe (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 ShapedRecipes)
{
ShapedRecipes recipe = (ShapedRecipes) tmpRecipe;
ItemStack recipeResult = recipe.getRecipeOutput();
if (ItemStack.areItemStacksEqual(resultItem, recipeResult))
{
recipes.remove(i--);
}
}
}
}
示例5: ShapedOreRecipeTFC
import net.minecraft.item.crafting.ShapedRecipes; //导入方法依赖的package包/类
ShapedOreRecipeTFC(ShapedRecipes recipe, Map<ItemStack, String> replacements)
{
output = recipe.getRecipeOutput();
width = recipe.recipeWidth;
height = recipe.recipeHeight;
input = new ArrayList<Object>(recipe.recipeItems.length);
for(int i = 0; i < recipe.recipeItems.length; i++)
{
ItemStack ingredient = recipe.recipeItems[i];
if(ingredient == null) continue;
input.add(recipe.recipeItems[i]);
for(Entry<ItemStack, String> replace : replacements.entrySet())
{
if(OreDictionary.itemMatches(replace.getKey(), ingredient, true))
{
input.set(i, OreDictionary.getOres(replace.getValue()));
break;
}
}
}
}
示例6: ShapedOreRecipe
import net.minecraft.item.crafting.ShapedRecipes; //导入方法依赖的package包/类
ShapedOreRecipe(ShapedRecipes recipe, Map<ItemStack, String> replacements)
{
output = recipe.getRecipeOutput();
width = recipe.recipeWidth;
height = recipe.recipeHeight;
input = new Object[recipe.recipeItems.length];
for(int i = 0; i < input.length; i++)
{
ItemStack ingred = recipe.recipeItems[i];
if(ingred == null) continue;
input[i] = recipe.recipeItems[i];
for(Entry<ItemStack, String> replace : replacements.entrySet())
{
if(OreDictionary.itemMatches(replace.getKey(), ingred, true))
{
input[i] = OreDictionary.getOres(replace.getValue());
break;
}
}
}
}
示例7: rem
import net.minecraft.item.crafting.ShapedRecipes; //导入方法依赖的package包/类
public void rem(){
ItemStack test = new ItemStack(Items.iron_ingot);
@SuppressWarnings("unchecked")
List<IRecipe> allRecipes = CraftingManager.getInstance().getRecipeList();
List<IRecipe> recipesToRemove = new ArrayList<IRecipe>();
List<IRecipe> recipesToAdd = new ArrayList<IRecipe>();
// Search vanilla recipes for recipes to replace
for(Object obj : allRecipes)
{
if(obj instanceof ShapedRecipes)
{
ShapedRecipes recipe = (ShapedRecipes)obj;
ItemStack output = recipe.getRecipeOutput();
if(output == test)
{
recipesToRemove.add(recipe);
ItemStack[] t = recipe.recipeItems;
recipesToAdd.add(new ShapedOreRecipe(test, t));
}
}
}
allRecipes.removeAll(recipesToRemove);
allRecipes.addAll(recipesToAdd);
}
示例8: ShapedBloodOrbRecipe
import net.minecraft.item.crafting.ShapedRecipes; //导入方法依赖的package包/类
ShapedBloodOrbRecipe(ShapedRecipes recipe, Map<ItemStack, String> replacements) {
output = recipe.getRecipeOutput();
width = recipe.recipeWidth;
height = recipe.recipeHeight;
input = new Object[recipe.recipeItems.length];
for (int i = 0; i < input.length; i++) {
ItemStack ingred = recipe.recipeItems[i];
if (ingred == null)
continue;
input[i] = recipe.recipeItems[i];
for (Entry<ItemStack, String> replace : replacements.entrySet()) {
if (OreDictionary.itemMatches(replace.getKey(), ingred, true)) {
input[i] = OreDictionary.getOres(replace.getValue());
break;
}
}
}
}
示例9: removeShapedRecipe
import net.minecraft.item.crafting.ShapedRecipes; //导入方法依赖的package包/类
public static void removeShapedRecipe(ItemStack resultItem) {
List<IRecipe> recipes = CraftingManager.getInstance().getRecipeList();
for (int i = 0; i < recipes.size(); i++) {
IRecipe tmpRecipe = recipes.get(i);
if (tmpRecipe instanceof ShapedRecipes) {
ShapedRecipes recipe = (ShapedRecipes) tmpRecipe;
ItemStack recipeResult = recipe.getRecipeOutput();
if (ItemStack.areItemStacksEqual(resultItem, recipeResult)) {
recipes.remove(i--);
}
}
}
}
示例10: ShapedBloodOrbRecipe
import net.minecraft.item.crafting.ShapedRecipes; //导入方法依赖的package包/类
ShapedBloodOrbRecipe(ShapedRecipes recipe, Map<ItemStack, String> replacements)
{
output = recipe.getRecipeOutput();
width = recipe.recipeWidth;
height = recipe.recipeHeight;
input = new Object[recipe.recipeItems.length];
for (int i = 0; i < input.length; i++)
{
ItemStack ingred = recipe.recipeItems[i];
if (ingred == null)
continue;
input[i] = recipe.recipeItems[i];
for (Entry<ItemStack, String> replace : replacements.entrySet())
{
if (OreDictionary.itemMatches(replace.getKey(), ingred, true))
{
input[i] = OreDictionary.getOres(replace.getValue());
break;
}
}
}
}
示例11: ShapedOreRecipe
import net.minecraft.item.crafting.ShapedRecipes; //导入方法依赖的package包/类
ShapedOreRecipe(ShapedRecipes recipe, Map<ItemStack, String> replacements)
{
vanillaRecipe = recipe; // Cauldron - bukkit compatibility
output = recipe.getRecipeOutput();
width = recipe.recipeWidth;
height = recipe.recipeHeight;
input = new Object[recipe.recipeItems.length];
for(int i = 0; i < input.length; i++)
{
ItemStack ingred = recipe.recipeItems[i];
if(ingred == null) continue;
input[i] = recipe.recipeItems[i];
for(Entry<ItemStack, String> replace : replacements.entrySet())
{
if(OreDictionary.itemMatches(replace.getKey(), ingred, true))
{
input[i] = OreDictionary.getOres(replace.getValue());
break;
}
}
}
}
示例12: MicroblockCachedRecipe
import net.minecraft.item.crafting.ShapedRecipes; //导入方法依赖的package包/类
public MicroblockCachedRecipe(final ShapedRecipes irecipe) {
this(irecipe.recipeWidth, irecipe.recipeHeight, irecipe.recipeItems, irecipe.getRecipeOutput());
}
示例13: CachedShapedRecipe
import net.minecraft.item.crafting.ShapedRecipes; //导入方法依赖的package包/类
public CachedShapedRecipe(ShapedRecipes recipe) {
this(recipe.recipeWidth, recipe.recipeHeight, recipe.recipeItems, recipe.getRecipeOutput());
}
示例14: CachedRollingMachineShapedRecipe
import net.minecraft.item.crafting.ShapedRecipes; //导入方法依赖的package包/类
public CachedRollingMachineShapedRecipe(ShapedRecipes recipe, boolean genPerms) {
this(recipe.recipeWidth, recipe.recipeHeight, recipe.recipeItems, recipe.getRecipeOutput(), genPerms);
}