IFluidContainerItem@Deprecated public class FluidContainerItemWrapper extends java.lang.Object implements IFluidHandler, ICapabilityProvider
IFluidContainerItem to IFluidHandler.
Note that successful operations WILL modify the container itemStack.| Modifier and Type | Field and Description |
|---|---|
protected ItemStack |
container
Deprecated.
|
protected IFluidContainerItem |
handler
Deprecated.
|
| Constructor and Description |
|---|
FluidContainerItemWrapper(IFluidContainerItem handler,
ItemStack container)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
FluidStack |
drain(FluidStack resource,
boolean doDrain)
Deprecated.
Drains fluid out of internal tanks, distribution is left entirely to the IFluidHandler.
|
FluidStack |
drain(int maxDrain,
boolean doDrain)
Deprecated.
Drains fluid out of internal tanks, distribution is left entirely to the IFluidHandler.
|
int |
fill(FluidStack resource,
boolean doFill)
Deprecated.
Fills fluid into internal tanks, distribution is left entirely to the IFluidHandler.
|
<T> T |
getCapability(Capability<T> capability,
EnumFacing facing)
Deprecated.
Retrieves the handler for the capability requested on the specific side.
|
FluidTankProperties[] |
getTankProperties()
Deprecated.
Returns an array of objects which represent the internal tanks.
|
boolean |
hasCapability(Capability<?> capability,
EnumFacing facing)
Deprecated.
Determines if this object has support for the capability in question on the specific side.
|
protected final IFluidContainerItem handler
protected final ItemStack container
public FluidContainerItemWrapper(IFluidContainerItem handler, ItemStack container)
public FluidTankProperties[] getTankProperties()
IFluidHandlergetTankProperties in interface IFluidHandlerpublic int fill(FluidStack resource, boolean doFill)
IFluidHandlerfill in interface IFluidHandlerresource - FluidStack representing the Fluid and maximum amount of fluid to be filled.doFill - If false, fill will only be simulated.public FluidStack drain(FluidStack resource, boolean doDrain)
IFluidHandlerdrain in interface IFluidHandlerresource - FluidStack representing the Fluid and maximum amount of fluid to be drained.doDrain - If false, drain will only be simulated.public FluidStack drain(int maxDrain, boolean doDrain)
IFluidHandlerdrain in interface IFluidHandlermaxDrain - Maximum amount of fluid to drain.doDrain - If false, drain will only be simulated.public boolean hasCapability(Capability<?> capability, EnumFacing facing)
ICapabilityProviderhasCapability in interface ICapabilityProvidercapability - The capability to checkfacing - The Side to check from:
CAN BE NULL. Null is defined to represent 'internal' or 'self'public <T> T getCapability(Capability<T> capability, EnumFacing facing)
ICapabilityProvidergetCapability in interface ICapabilityProvidercapability - The capability to checkfacing - The Side to check from:
CAN BE NULL. Null is defined to represent 'internal' or 'self'