Package alexiil.mc.lib.attributes.fluid
Class FluidVolumeUtil.FluidTankInteraction
java.lang.Object
alexiil.mc.lib.attributes.fluid.FluidVolumeUtil.FluidTankInteraction
- Enclosing class:
- FluidVolumeUtil
public static final class FluidVolumeUtil.FluidTankInteraction
extends java.lang.Object
-
Field Summary
Fields Modifier and Type Field Description FluidVolumefluidMovedA copy of the fluid moved.FluidVolumeUtil.ItemContainerStatusfromTankStatusbooleanintoTankIf true then the interaction drained fluid from theItemStack, and inserted it into theFluidInsertabletank.FluidVolumeUtil.ItemContainerStatusintoTankStatusstatic FluidVolumeUtil.FluidTankInteractionNONE -
Constructor Summary
Constructors Constructor Description FluidTankInteraction(FluidVolume fluidMoved, boolean intoTank)Deprecated.FluidTankInteraction(FluidVolume fluidMoved, boolean intoTank, FluidVolumeUtil.ItemContainerStatus intoTankStatus, FluidVolumeUtil.ItemContainerStatus fromTankStatus)Constructs a newFluidVolumeUtil.FluidTankInteractionobject. -
Method Summary
Modifier and Type Method Description intamountMoved()Deprecated.FluidAmountamountMoved_F()net.minecraft.util.ActionResultasActionResult()Converts this interaction result into a vanilla minecraftActionResult, suitable for normal block or item "use" methods.booleandidCheckItemStack()booleandidMoveAny()Checks to see if any fluid was moved in the interaction.static FluidVolumeUtil.FluidTankInteractionfromTank(FluidVolume fluid)Deprecated.static FluidVolumeUtil.FluidTankInteractionintoTank(FluidVolume fluid)Deprecated.static FluidVolumeUtil.FluidTankInteractionnone(FluidVolumeUtil.ItemContainerStatus intoTankStatus, FluidVolumeUtil.ItemContainerStatus fromTankStatus)booleanwasContainerValid()
-
Field Details
-
NONE
-
fluidMoved
A copy of the fluid moved. -
intoTank
public final boolean intoTankIf true then the interaction drained fluid from theItemStack, and inserted it into theFluidInsertabletank. Otherwise this will be false. -
intoTankStatus
-
fromTankStatus
-
-
Constructor Details
-
FluidTankInteraction
Deprecated. -
FluidTankInteraction
public FluidTankInteraction(FluidVolume fluidMoved, boolean intoTank, FluidVolumeUtil.ItemContainerStatus intoTankStatus, FluidVolumeUtil.ItemContainerStatus fromTankStatus)Constructs a newFluidVolumeUtil.FluidTankInteractionobject.Generally it is not expected that this be called by any method other than
FluidInvUtil.interactItemWithTank(FluidInsertable, FluidExtractable, Reference, LimitedConsumer, FluidAmount)
-
-
Method Details
-
intoTank
Deprecated. -
fromTank
Deprecated. -
none
public static FluidVolumeUtil.FluidTankInteraction none(FluidVolumeUtil.ItemContainerStatus intoTankStatus, FluidVolumeUtil.ItemContainerStatus fromTankStatus) -
didMoveAny
public boolean didMoveAny()Checks to see if any fluid was moved in the interaction.- Returns:
- The inverse of
fluidMoved.isEmpty()
-
wasContainerValid
public boolean wasContainerValid()- Returns:
- true if either of
intoTankStatusorfromTankStatusis#VALID.
-
didCheckItemStack
public boolean didCheckItemStack()- Returns:
- true if either of
intoTankStatusorfromTankStatusis different toFluidVolumeUtil.ItemContainerStatus.NOT_CHECKED.
-
asActionResult
public net.minecraft.util.ActionResult asActionResult()Converts this interaction result into a vanilla minecraftActionResult, suitable for normal block or item "use" methods.- Returns:
ActionResult.SUCCESSifdidMoveAny()returns true.ActionResult.FAILifwasContainerValid()returns true.ActionResult.PASSotherwise.
ActionResult.FAIL, but using an unrelated item - such as an iron ingot - should returnActionResult.PASS)
-
amountMoved
@Deprecated public int amountMoved()Deprecated. -
amountMoved_F
-