use of blusunrize.immersiveengineering.api.ComparableItemStack in project ImmersiveEngineering by BluSunrize.
the class MetalPressRecipe method findRecipe.
public static MetalPressRecipe findRecipe(ItemStack mold, ItemStack input, boolean checkStackSize) {
if (mold == null || input == null)
return null;
ComparableItemStack comp = ApiUtils.createComparableItemStack(mold);
List<MetalPressRecipe> list = recipeList.get(comp);
for (MetalPressRecipe recipe : list) if (recipe.input.matches(input))
return recipe;
return null;
}
use of blusunrize.immersiveengineering.api.ComparableItemStack in project ImmersiveEngineering by BluSunrize.
the class MetalPressRecipe method loadFromNBT.
public static MetalPressRecipe loadFromNBT(NBTTagCompound nbt) {
IngredientStack input = IngredientStack.readFromNBT(nbt.getCompoundTag("input"));
ComparableItemStack mold = ComparableItemStack.readFromNBT(nbt.getCompoundTag("mold"));
List<MetalPressRecipe> list = recipeList.get(mold);
for (MetalPressRecipe recipe : list) if (recipe.input.equals(input))
return recipe;
return null;
}
Aggregations