Skip to content

Instantly share code, notes, and snippets.

@mDiyo
Created March 22, 2013 16:09
Show Gist options
  • Save mDiyo/5222539 to your computer and use it in GitHub Desktop.
Save mDiyo/5222539 to your computer and use it in GitHub Desktop.
Remove recipes
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--);
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment