类 FluidHandlerItemStackSimple.SwapEmpty
java.lang.Object
net.neoforged.neoforge.fluids.capability.templates.FluidHandlerItemStackSimple
net.neoforged.neoforge.fluids.capability.templates.FluidHandlerItemStackSimple.SwapEmpty
- 所有已实现的接口:
IFluidHandler
,IFluidHandlerItem
Swaps the container item for a different one when it's emptied.
-
嵌套类概要
从类继承的嵌套类/接口 net.neoforged.neoforge.fluids.capability.templates.FluidHandlerItemStackSimple
FluidHandlerItemStackSimple.Consumable, FluidHandlerItemStackSimple.SwapEmpty
从接口继承的嵌套类/接口 net.neoforged.neoforge.fluids.capability.IFluidHandler
IFluidHandler.FluidAction
-
字段概要
字段从类继承的字段 net.neoforged.neoforge.fluids.capability.templates.FluidHandlerItemStackSimple
capacity, componentType, container
-
构造器概要
构造器构造器说明SwapEmpty
(Supplier<DataComponentType<SimpleFluidContent>> componentType, ItemStack container, ItemStack emptyContainer, int capacity) -
方法概要
从类继承的方法 net.neoforged.neoforge.fluids.capability.templates.FluidHandlerItemStackSimple
canDrainFluidType, canFillFluidType, drain, drain, fill, getContainer, getFluid, getFluidInTank, getTankCapacity, getTanks, isFluidValid, setFluid
-
字段详细资料
-
emptyContainer
-
-
构造器详细资料
-
SwapEmpty
public SwapEmpty(Supplier<DataComponentType<SimpleFluidContent>> componentType, ItemStack container, ItemStack emptyContainer, int capacity)
-
-
方法详细资料
-
setContainerToEmpty
protected void setContainerToEmpty()从类复制的说明: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--"
-