Package alexiil.mc.lib.attributes.fluid
Class FluidVolumeUtil.FluidTankInteraction
java.lang.Object
alexiil.mc.lib.attributes.fluid.FluidVolumeUtil.FluidTankInteraction
- Enclosing class:
- FluidVolumeUtil
-
Field Summary
Modifier and TypeFieldDescriptionfinal FluidVolume
A copy of the fluid moved.final boolean
If true then the interaction drained fluid from theItemStack
, and inserted it into theFluidInsertable
tank.static final FluidVolumeUtil.FluidTankInteraction
-
Constructor Summary
ConstructorDescriptionFluidTankInteraction
(FluidVolume fluidMoved, boolean intoTank) Deprecated, for removal: This API element is subject to removal in a future version.FluidTankInteraction
(FluidVolume fluidMoved, boolean intoTank, FluidVolumeUtil.ItemContainerStatus intoTankStatus, FluidVolumeUtil.ItemContainerStatus fromTankStatus) Constructs a newFluidVolumeUtil.FluidTankInteraction
object. -
Method Summary
Modifier and TypeMethodDescriptionint
Deprecated, for removal: This API element is subject to removal in a future version.net.minecraft.util.ActionResult
Converts this interaction result into a vanilla minecraftActionResult
, suitable for normal block or item "use" methods.boolean
boolean
Checks to see if any fluid was moved in the interaction.fromTank
(FluidVolume fluid) Deprecated, for removal: This API element is subject to removal in a future version.intoTank
(FluidVolume fluid) Deprecated, for removal: This API element is subject to removal in a future version.none
(FluidVolumeUtil.ItemContainerStatus intoTankStatus, FluidVolumeUtil.ItemContainerStatus fromTankStatus) boolean
-
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 theFluidInsertable
tank. Otherwise this will be false. -
intoTankStatus
-
fromTankStatus
-
-
Constructor Details
-
FluidTankInteraction
@Deprecated(since="0.6.4", forRemoval=true) public FluidTankInteraction(FluidVolume fluidMoved, boolean intoTank) Deprecated, for removal: This API element is subject to removal in a future version. -
FluidTankInteraction
public FluidTankInteraction(FluidVolume fluidMoved, boolean intoTank, FluidVolumeUtil.ItemContainerStatus intoTankStatus, FluidVolumeUtil.ItemContainerStatus fromTankStatus) Constructs a newFluidVolumeUtil.FluidTankInteraction
object.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(since="0.6.4", forRemoval=true) public static FluidVolumeUtil.FluidTankInteraction intoTank(FluidVolume fluid) Deprecated, for removal: This API element is subject to removal in a future version. -
fromTank
@Deprecated(since="0.6.4", forRemoval=true) public static FluidVolumeUtil.FluidTankInteraction fromTank(FluidVolume fluid) Deprecated, for removal: This API element is subject to removal in a future version. -
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
intoTankStatus
orfromTankStatus
is#VALID
.
-
didCheckItemStack
public boolean didCheckItemStack()- Returns:
- true if either of
intoTankStatus
orfromTankStatus
is 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.SUCCESS
ifdidMoveAny()
returns true.ActionResult.FAIL
ifwasContainerValid()
returns true.ActionResult.PASS
otherwise.
ActionResult.FAIL
, but using an unrelated item - such as an iron ingot - should returnActionResult.PASS
)
-
amountMoved
Deprecated, for removal: This API element is subject to removal in a future version. -
amountMoved_F
-