Class VoidFluidHandler
java.lang.Object
net.minecraftforge.fluids.capability.templates.VoidFluidHandler
- All Implemented Interfaces:
- IFluidHandler
- Direct Known Subclasses:
- BlockWrapper,- BlockWrapper.LiquidContainerBlockWrapper
VoidFluidHandler is a template fluid handler that can be filled indefinitely without ever getting full.
 It does not store fluid that gets filled into it, but "destroys" it upon receiving it.
- 
Nested Class SummaryNested classes/interfaces inherited from interface net.minecraftforge.fluids.capability.IFluidHandlerIFluidHandler.FluidAction
- 
Field SummaryFields
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescription@NotNull FluidStackdrain(int maxDrain, IFluidHandler.FluidAction action) Drains fluid out of internal tanks, distribution is left entirely to the IFluidHandler.@NotNull FluidStackdrain(FluidStack resource, IFluidHandler.FluidAction action) Drains fluid out of internal tanks, distribution is left entirely to the IFluidHandler.intfill(FluidStack resource, IFluidHandler.FluidAction action) Fills fluid into internal tanks, distribution is left entirely to the IFluidHandler.@NotNull FluidStackgetFluidInTank(int tank) Returns the FluidStack in a given tank.intgetTankCapacity(int tank) Retrieves the maximum fluid amount for a given tank.intgetTanks()Returns the number of fluid storage units ("tanks") availablebooleanisFluidValid(int tank, @NotNull FluidStack stack) This function is a way to determine which fluids can exist inside a given handler.
- 
Field Details- 
INSTANCE
 
- 
- 
Constructor Details- 
VoidFluidHandlerpublic VoidFluidHandler()
 
- 
- 
Method Details- 
getTankspublic int getTanks()Description copied from interface:IFluidHandlerReturns the number of fluid storage units ("tanks") available- Specified by:
- getTanksin interface- IFluidHandler
- Returns:
- The number of tanks available
 
- 
getFluidInTankDescription copied from interface:IFluidHandlerReturns the FluidStack in a given tank.IMPORTANT: This FluidStack MUST NOT be modified. This method is not for altering internal contents. Any implementers who are able to detect modification via this method should throw an exception. It is ENTIRELY reasonable and likely that the stack returned here will be a copy. SERIOUSLY: DO NOT MODIFY THE RETURNED FLUIDSTACK - Specified by:
- getFluidInTankin interface- IFluidHandler
- Parameters:
- tank- Tank to query.
- Returns:
- FluidStack in a given tank. FluidStack.EMPTY if the tank is empty.
 
- 
getTankCapacitypublic int getTankCapacity(int tank) Description copied from interface:IFluidHandlerRetrieves the maximum fluid amount for a given tank.- Specified by:
- getTankCapacityin interface- IFluidHandler
- Parameters:
- tank- Tank to query.
- Returns:
- The maximum fluid amount held by the tank.
 
- 
isFluidValidDescription copied from interface:IFluidHandlerThis function is a way to determine which fluids can exist inside a given handler. General purpose tanks will basically always return TRUE for this.- Specified by:
- isFluidValidin interface- IFluidHandler
- Parameters:
- tank- Tank to query for validity
- stack- Stack to test with for validity
- Returns:
- TRUE if the tank can hold the FluidStack, not considering current state. (Basically, is a given fluid EVER allowed in this tank?) Return FALSE if the answer to that question is 'no.'
 
- 
fillDescription copied from interface:IFluidHandlerFills fluid into internal tanks, distribution is left entirely to the IFluidHandler.- Specified by:
- fillin interface- IFluidHandler
- Parameters:
- resource- FluidStack representing the Fluid and maximum amount of fluid to be filled.
- action- If SIMULATE, fill will only be simulated.
- Returns:
- Amount of resource that was (or would have been, if simulated) filled.
 
- 
drainDescription copied from interface:IFluidHandlerDrains fluid out of internal tanks, distribution is left entirely to the IFluidHandler.- Specified by:
- drainin interface- IFluidHandler
- Parameters:
- resource- FluidStack representing the Fluid and maximum amount of fluid to be drained.
- action- If SIMULATE, drain will only be simulated.
- Returns:
- FluidStack representing the Fluid and amount that was (or would have been, if simulated) drained.
 
- 
drainDescription copied from interface:IFluidHandlerDrains fluid out of internal tanks, distribution is left entirely to the IFluidHandler.This method is not Fluid-sensitive. - Specified by:
- drainin interface- IFluidHandler
- Parameters:
- maxDrain- Maximum amount of fluid to drain.
- action- If SIMULATE, drain will only be simulated.
- Returns:
- FluidStack representing the Fluid and amount that was (or would have been, if simulated) drained.
 
 
-