Class FluidHandlerItemStack.Consumable
java.lang.Object
net.neoforged.neoforge.fluids.capability.templates.FluidHandlerItemStack
net.neoforged.neoforge.fluids.capability.templates.FluidHandlerItemStack.Consumable
- All Implemented Interfaces:
IFluidHandler,IFluidHandlerItem
- Enclosing class:
FluidHandlerItemStack
@Deprecated(since="1.21.9",
forRemoval=true)
public static class FluidHandlerItemStack.Consumable
extends FluidHandlerItemStack
Deprecated, for removal: This API element is subject to removal in a future version.
Destroys the container item when it's emptied.
-
Nested Class Summary
Nested classes/interfaces inherited from class net.neoforged.neoforge.fluids.capability.templates.FluidHandlerItemStack
FluidHandlerItemStack.Consumable, FluidHandlerItemStack.SwapEmptyNested classes/interfaces inherited from interface net.neoforged.neoforge.fluids.capability.IFluidHandler
IFluidHandler.FluidAction -
Field Summary
Fields inherited from class net.neoforged.neoforge.fluids.capability.templates.FluidHandlerItemStack
capacity, componentType, container -
Constructor Summary
ConstructorsConstructorDescriptionConsumable(Supplier<DataComponentType<SimpleFluidContent>> componentType, ItemStack container, int capacity) Deprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidDeprecated, for removal: This API element is subject to removal in a future version.Override this method for special handling.Methods inherited from class net.neoforged.neoforge.fluids.capability.templates.FluidHandlerItemStack
canDrainFluidType, canFillFluidType, drain, drain, fill, getContainer, getFluid, getFluidInTank, getTankCapacity, getTanks, isFluidValid, setFluid
-
Constructor Details
-
Consumable
public Consumable(Supplier<DataComponentType<SimpleFluidContent>> componentType, ItemStack container, int capacity) Deprecated, for removal: This API element is subject to removal in a future version.
-
-
Method Details
-
setContainerToEmpty
protected void setContainerToEmpty()Deprecated, for removal: This API element is subject to removal in a future version.Description copied from class:FluidHandlerItemStackOverride this method for special handling. Can be used to swap out or destroy the container.- Overrides:
setContainerToEmptyin classFluidHandlerItemStack
-
ItemAccessFluidHandlercan serve as inspiration. Please open an issue on GitHub if you have a use for an equivalent of this class.