Search in sources :

Example 1 with FluidTankList

use of gregtech.api.capability.impl.FluidTankList 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 FluidTankList

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

the class RecipeMapMultiblockController method resetTileAbilities.

private void resetTileAbilities() {
    this.inputInventory = new ItemStackHandler(0);
    this.inputFluidInventory = new FluidTankList(true);
    this.outputInventory = new ItemStackHandler(0);
    this.outputFluidInventory = new FluidTankList(true);
    this.energyContainer = new EnergyContainerList(Lists.newArrayList());
}
Also used : FluidTankList(gregtech.api.capability.impl.FluidTankList) ItemStackHandler(net.minecraftforge.items.ItemStackHandler) EnergyContainerList(gregtech.api.capability.impl.EnergyContainerList)

Example 3 with FluidTankList

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

the class MetaTileEntityQuantumTank method initializeInventory.

@Override
protected void initializeInventory() {
    super.initializeInventory();
    this.fluidTank = new FluidTank(maxFluidCapacity);
    this.fluidInventory = fluidTank;
    this.importFluids = new FluidTankList(false, fluidTank);
    this.exportFluids = new FluidTankList(false, fluidTank);
}
Also used : FluidTank(net.minecraftforge.fluids.FluidTank) FluidTankList(gregtech.api.capability.impl.FluidTankList)

Example 4 with FluidTankList

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

the class MetaTileEntityLargeBoiler method formStructure.

@Override
protected void formStructure(PatternMatchContext context) {
    super.formStructure(context);
    this.fluidImportInventory = new FluidTankList(true, getAbilities(MultiblockAbility.IMPORT_FLUIDS));
    this.itemImportInventory = new ItemHandlerList(getAbilities(MultiblockAbility.IMPORT_ITEMS));
    this.steamOutputTank = new FluidTankList(true, getAbilities(MultiblockAbility.EXPORT_FLUIDS));
}
Also used : FluidTankList(gregtech.api.capability.impl.FluidTankList) ItemHandlerList(gregtech.api.capability.impl.ItemHandlerList)

Example 5 with FluidTankList

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

the class MetaTileEntityLargeBoiler method invalidateStructure.

@Override
public void invalidateStructure() {
    super.invalidateStructure();
    this.fluidImportInventory = new FluidTankList(true);
    this.itemImportInventory = new ItemHandlerList(Collections.emptyList());
    this.steamOutputTank = new FluidTankList(true);
    // reset temperature
    this.currentTemperature = 0;
    this.fuelBurnTicksLeft = 0;
    this.hasNoWater = false;
    this.isActive = false;
    this.throttlePercentage = 100;
    replaceFireboxAsActive(false);
}
Also used : FluidTankList(gregtech.api.capability.impl.FluidTankList) ItemHandlerList(gregtech.api.capability.impl.ItemHandlerList)

Aggregations

FluidTankList (gregtech.api.capability.impl.FluidTankList)13 ItemStackHandler (net.minecraftforge.items.ItemStackHandler)4 EnergyContainerList (gregtech.api.capability.impl.EnergyContainerList)3 ItemHandlerList (gregtech.api.capability.impl.ItemHandlerList)3 FilteredFluidHandler (gregtech.api.capability.impl.FilteredFluidHandler)2 FluidHandlerProxy (gregtech.api.capability.impl.FluidHandlerProxy)2 ItemHandlerProxy (gregtech.api.capability.impl.ItemHandlerProxy)2 FluidTank (net.minecraftforge.fluids.FluidTank)1