public Recipe next() { if (recipes.hasNext()) { removeFrom = recipes; return recipes.next().toBukkitRecipe(); } else { net.minecraft.server.ItemStack item; if (smeltingCustom.hasNext()) { removeFrom = smeltingCustom; item = smeltingCustom.next(); } else { removeFrom = smeltingVanilla; item = smeltingVanilla.next(); } CraftItemStack stack = CraftItemStack.asCraftMirror(RecipesFurnace.getInstance().getResult(item)); return new CraftFurnaceRecipe(stack, CraftItemStack.asCraftMirror(item)); } }
public Recipe next() { if (recipes.hasNext()) { removeFrom = recipes; return recipes.next().toBukkitRecipe(); } else { removeFrom = smelting; int id = smelting.next(); CraftItemStack stack = CraftItemStack.asCraftMirror(RecipesFurnace.getInstance().getResult(id)); return new CraftFurnaceRecipe(stack, new ItemStack(id, 1, (short) -1)); } }
@Override public void clearRecipes() { CraftingManager.getInstance().recipes.clear(); RecipesFurnace.getInstance().recipes.clear(); RecipesFurnace.getInstance().customRecipes.clear(); }
@Override public void resetRecipes() { CraftingManager.getInstance().recipes = new CraftingManager().recipes; RecipesFurnace.getInstance().recipes = new RecipesFurnace().recipes; RecipesFurnace.getInstance().customRecipes.clear(); }
@Override public void addToCraftingManager() { ItemStack result = this.getResult(); ItemStack input = this.getInput(); RecipesFurnace.getInstance().registerRecipe(CraftItemStack.asNMSCopy(input), CraftItemStack.asNMSCopy(result)); }
public RecipeIterator() { this.recipes = CraftingManager.getInstance().getRecipes().iterator(); this.smeltingCustom = RecipesFurnace.getInstance().customRecipes.keySet().iterator(); this.smeltingVanilla = RecipesFurnace.getInstance().recipes.keySet().iterator(); }
public void addToCraftingManager() { ItemStack result = this.getResult(); ItemStack input = this.getInput(); RecipesFurnace.getInstance().registerRecipe(input.getTypeId(), CraftItemStack.asNMSCopy(result), 0.1f); }
public RecipeIterator() { this.recipes = CraftingManager.getInstance().getRecipes().iterator(); this.smelting = RecipesFurnace.getInstance().getRecipes().keySet().iterator(); }
public void clearRecipes() { CraftingManager.getInstance().recipes.clear(); RecipesFurnace.getInstance().recipes.clear(); }
public void resetRecipes() { CraftingManager.getInstance().recipes = new CraftingManager().recipes; RecipesFurnace.getInstance().recipes = new RecipesFurnace().recipes; }
@Override public void addToCraftingManager() { ItemStack result = this.getResult(); ItemStack input = this.getInput(); RecipesFurnace.getInstance().registerRecipe(CraftItemStack.asNMSCopy(input), CraftItemStack.asNMSCopy(result), getExperience()); }