Repackage to team.chisel (excepting API)

This commit is contained in:
tterrag1098 committed 2015-08-18 20:40:55 -04:00
1 parent 7555e21144
commit 9574e05c29
132 files changed
+526 -596

No files matched your search

@@ -0,0 +1,36 @@
package team.chisel.utils;
import cpw.mods.fml.common.registry.GameRegistry;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.CraftingManager;
import net.minecraft.item.crafting.FurnaceRecipes;
import net.minecraft.item.crafting.IRecipe;
import java.util.List;
/**
* Utility for crafting/recipe things
*/
public class RecipeUtil {
public static boolean isCraftable(ItemStack stack){
for (IRecipe recipe : (List<IRecipe>)CraftingManager.getInstance().getRecipeList()){
if (recipe.getRecipeOutput()==null){
continue;
}
if (stack.isItemEqual(recipe.getRecipeOutput())){
return true;
}
}
return false;
}
public static boolean isSmeltable(ItemStack stack){
return FurnaceRecipes.smelting().getSmeltingList().containsKey(stack);
}
public static boolean isCreatable(ItemStack stack){
return isCraftable(stack) || isSmeltable(stack);
}
}