Class InsertOnlyFluidContainer
java.lang.Object
earth.terrarium.botarium.common.fluid.impl.SimpleFluidContainer
earth.terrarium.botarium.common.fluid.impl.InsertOnlyFluidContainer
- All Implemented Interfaces:
FluidContainer,Serializable,net.minecraft.world.Clearable
-
Field Summary
Fields inherited from class earth.terrarium.botarium.common.fluid.impl.SimpleFluidContainer
FLUID_KEY, fluidFilter, maxAmount, storedFluid -
Constructor Summary
ConstructorsConstructorDescriptionInsertOnlyFluidContainer(IntToLongFunction maxAmount, int tanks, BiPredicate<Integer, FluidHolder> fluidFilter) -
Method Summary
Modifier and TypeMethodDescriptionbooleanextractFluid(FluidHolder fluid, boolean simulate) Extracts aFluidHolderfrom the container.internalExtract(FluidHolder fluid, boolean simulate) An internal version ofFluidContainer.extractFluid(FluidHolder, boolean)that is used by mod authors looking to directly interact with their own containers.Methods inherited from class earth.terrarium.botarium.common.fluid.impl.SimpleFluidContainer
allowsInsertion, clearContent, copy, createSnapshot, deserialize, extractFromSlot, fromContainer, getFluids, getSize, getTankCapacity, insertFluid, internalInsert, isEmpty, isFluidValid, serialize, setFluidMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface earth.terrarium.botarium.common.fluid.base.FluidContainer
readSnapshot
-
Constructor Details
-
InsertOnlyFluidContainer
public InsertOnlyFluidContainer(IntToLongFunction maxAmount, int tanks, BiPredicate<Integer, FluidHolder> fluidFilter)
-
-
Method Details
-
extractFluid
Description copied from interface:FluidContainerExtracts aFluidHolderfrom the container.- Specified by:
extractFluidin interfaceFluidContainer- Overrides:
extractFluidin classSimpleFluidContainer- Parameters:
fluid- TheFluidHolderto be extracted from the container.simulate- If true, the container will not be modified.- Returns:
- The
FluidHolderthat was extracted from the container.
-
internalExtract
Description copied from interface:FluidContainerAn internal version ofFluidContainer.extractFluid(FluidHolder, boolean)that is used by mod authors looking to directly interact with their own containers.You should not call this method for other mod's containers, instead use
FluidContainer.extractFluid(FluidHolder, boolean).- Specified by:
internalExtractin interfaceFluidContainer- Overrides:
internalExtractin classSimpleFluidContainer
-
allowsExtraction
public boolean allowsExtraction()- Specified by:
allowsExtractionin interfaceFluidContainer- Overrides:
allowsExtractionin classSimpleFluidContainer- Returns:
- Weather can be extracted from.
-