Search in sources :

Example 1 with FilteredFluidHandler

use of gregtech.api.capability.impl.FilteredFluidHandler in project GregTech by GregTechCE.

the class WorkableTieredMetaTileEntity method createImportFluidHandler.

@Override
protected FluidTankList createImportFluidHandler() {
    if (workable == null)
        return new FluidTankList(false);
    FilteredFluidHandler[] fluidImports = new FilteredFluidHandler[workable.recipeMap.getMaxFluidInputs()];
    for (int i = 0; i < fluidImports.length; i++) {
        FilteredFluidHandler filteredFluidHandler = new FilteredFluidHandler(getInputTankCapacity(i));
        filteredFluidHandler.setFillPredicate(this::canInputFluid);
        fluidImports[i] = filteredFluidHandler;
    }
    return new FluidTankList(false, fluidImports);
}
Also used : FluidTankList(gregtech.api.capability.impl.FluidTankList) FilteredFluidHandler(gregtech.api.capability.impl.FilteredFluidHandler)

Example 2 with FilteredFluidHandler

use of gregtech.api.capability.impl.FilteredFluidHandler in project GregTech by GregTechCE.

the class SteamLavaBoiler method createImportFluidHandler.

@Override
protected FluidTankList createImportFluidHandler() {
    FluidTankList superHandler = super.createImportFluidHandler();
    this.lavaFluidTank = new FilteredFluidHandler(16000).setFillPredicate(ModHandler::isLava);
    return new FluidTankList(false, superHandler, lavaFluidTank);
}
Also used : FluidTankList(gregtech.api.capability.impl.FluidTankList) FilteredFluidHandler(gregtech.api.capability.impl.FilteredFluidHandler)

Aggregations

FilteredFluidHandler (gregtech.api.capability.impl.FilteredFluidHandler)2 FluidTankList (gregtech.api.capability.impl.FluidTankList)2