Search in sources :

Example 1 with RecipeQuery

use of blusunrize.immersiveengineering.api.tool.AssemblerHandler.RecipeQuery in project ImmersiveEngineering by BluSunrize.

the class HarvestcraftHelper method init.

@Override
public void init() {
    //Pams Harvest Craft uses fluids with OreDict entries, so this is my workaround >_>
    final List listWater = OreDictionary.getOres("listAllwater");
    AssemblerHandler.registerSpecialQueryConverters(o -> {
        if (!(o instanceof List))
            return null;
        if (listWater == o)
            return new RecipeQuery(new FluidStack(FluidRegistry.WATER, 1000), 1000);
        return null;
    });
    final Fluid milk = FluidRegistry.getFluid("milk");
    if (milk != null) {
        final List listMilk = OreDictionary.getOres("listAllmilk");
        AssemblerHandler.registerSpecialQueryConverters(o -> {
            if (!(o instanceof List))
                return null;
            if (listMilk == o)
                return new RecipeQuery(new FluidStack(milk, 1000), 1000);
            return null;
        });
    }
}
Also used : RecipeQuery(blusunrize.immersiveengineering.api.tool.AssemblerHandler.RecipeQuery) FluidStack(net.minecraftforge.fluids.FluidStack) Fluid(net.minecraftforge.fluids.Fluid) List(java.util.List)

Aggregations

RecipeQuery (blusunrize.immersiveengineering.api.tool.AssemblerHandler.RecipeQuery)1 List (java.util.List)1 Fluid (net.minecraftforge.fluids.Fluid)1 FluidStack (net.minecraftforge.fluids.FluidStack)1