Class FluidHandlerItemStackSimple.Consumable
- java.lang.Object
-
- net.minecraftforge.fluids.capability.templates.FluidHandlerItemStackSimple
-
- net.minecraftforge.fluids.capability.templates.FluidHandlerItemStackSimple.Consumable
-
- All Implemented Interfaces:
ICapabilityProvider
,IFluidHandler
,IFluidHandlerItem
- Enclosing class:
- FluidHandlerItemStackSimple
public static class FluidHandlerItemStackSimple.Consumable extends FluidHandlerItemStackSimple
Destroys the container item when it's emptied.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class net.minecraftforge.fluids.capability.templates.FluidHandlerItemStackSimple
FluidHandlerItemStackSimple.Consumable, FluidHandlerItemStackSimple.SwapEmpty
-
Nested classes/interfaces inherited from interface net.minecraftforge.fluids.capability.IFluidHandler
IFluidHandler.FluidAction
-
-
Field Summary
-
Fields inherited from class net.minecraftforge.fluids.capability.templates.FluidHandlerItemStackSimple
capacity, container, FLUID_NBT_KEY
-
-
Constructor Summary
Constructors Constructor Description Consumable(ItemStack container, int capacity)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
setContainerToEmpty()
Override this method for special handling.-
Methods inherited from class net.minecraftforge.fluids.capability.templates.FluidHandlerItemStackSimple
canDrainFluidType, canFillFluidType, drain, drain, fill, getCapability, getContainer, getFluid, getFluidInTank, getTankCapacity, getTanks, isFluidValid, setFluid
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.minecraftforge.common.capabilities.ICapabilityProvider
getCapability
-
-
-
-
Constructor Detail
-
Consumable
public Consumable(ItemStack container, int capacity)
-
-
Method Detail
-
setContainerToEmpty
protected void setContainerToEmpty()
Description copied from class:FluidHandlerItemStackSimple
Override this method for special handling. Can be used to swap out the container's item for a different one with "container.setItem". Can be used to destroy the container with "container.stackSize--"- Overrides:
setContainerToEmpty
in classFluidHandlerItemStackSimple
-
-