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);
}
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());
}
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);
}
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));
}
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);
}
Aggregations