Search in sources :

Example 6 with ComparableItemStack

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;
}
Also used : ComparableItemStack(blusunrize.immersiveengineering.api.ComparableItemStack)

Example 7 with ComparableItemStack

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;
}
Also used : ComparableItemStack(blusunrize.immersiveengineering.api.ComparableItemStack)

Aggregations

ComparableItemStack (blusunrize.immersiveengineering.api.ComparableItemStack)7 ItemStack (net.minecraft.item.ItemStack)4 IBlockState (net.minecraft.block.state.IBlockState)3 TileEntity (net.minecraft.tileentity.TileEntity)3 ResourceLocation (net.minecraft.util.ResourceLocation)3 ArrayList (java.util.ArrayList)2 HashSet (java.util.HashSet)2 Block (net.minecraft.block.Block)2 IProperty (net.minecraft.block.properties.IProperty)2 DefaultPlantHandler (blusunrize.immersiveengineering.api.tool.BelljarHandler.DefaultPlantHandler)1 IPlantHandler (blusunrize.immersiveengineering.api.tool.BelljarHandler.IPlantHandler)1 ChemthrowerEffect (blusunrize.immersiveengineering.api.tool.ChemthrowerHandler.ChemthrowerEffect)1 ChemthrowerEffect_Extinguish (blusunrize.immersiveengineering.api.tool.ChemthrowerHandler.ChemthrowerEffect_Extinguish)1 ChemthrowerEffect_Potion (blusunrize.immersiveengineering.api.tool.ChemthrowerHandler.ChemthrowerEffect_Potion)1 IConveyorTile (blusunrize.immersiveengineering.api.tool.ConveyorHandler.IConveyorTile)1 DefaultFurnaceAdapter (blusunrize.immersiveengineering.api.tool.ExternalHeaterHandler.DefaultFurnaceAdapter)1 WolfpackBullet (blusunrize.immersiveengineering.common.items.ItemBullet.WolfpackBullet)1 WolfpackPartBullet (blusunrize.immersiveengineering.common.items.ItemBullet.WolfpackPartBullet)1 VillageEngineersHouse (blusunrize.immersiveengineering.common.world.VillageEngineersHouse)1 List (java.util.List)1