Enum Class FluidAmount.FluidMergeRounding
java.lang.Object
java.lang.Enum<FluidAmount.FluidMergeRounding>
alexiil.mc.lib.attributes.fluid.amount.FluidAmount.FluidMergeRounding
- All Implemented Interfaces:
- Serializable,- Comparable<FluidAmount.FluidMergeRounding>,- Constable
- Enclosing class:
- FluidAmount
Specifies how merged 
FluidAmount's should handle rounding.- 
Nested Class SummaryNested classes/interfaces inherited from class java.lang.EnumEnum.EnumDesc<E extends Enum<E>>
- 
Enum Constant SummaryEnum ConstantsEnum ConstantDescriptionSpecifies that any fluid amounts that don't completely fit together should fail.Move only an amount which can be validly moved, leaving the rest in the source.Always empty the source, but leave the target with (potentially) slightly different amount fluid than the exact sum of the two volumes.Always empty the source, but leave the target with (potentially) slightly less fluid than the exact sum of the two volumes.Always empty the source, but leave the target with (potentially) slightly different amount fluid than the exact sum of the two volumes.Always empty the source, but leave the target with (potentially) slightly different amount of fluid than the exact sum of the two volumes.Always empty the source, but leave the target with (potentially) slightly different amount of fluid than the exact sum of the two volumes.Always empty the source, but leave the target with (potentially) slightly different amount of fluid than the exact sum of the two volumes.Throw anArithmeticExceptionif the end result needs to be rounded.Always empty the source, but leave the target with (potentially) slightly more fluid than the exact sum of the two volumes.
- 
Field SummaryFieldsModifier and TypeFieldDescriptionThe rounding mode to use, or null if this requires special handling.
- 
Method SummaryModifier and TypeMethodDescriptionfromRounding(RoundingMode rounding)Returns the enum constant of this class with the specified name.static FluidAmount.FluidMergeRounding[]values()Returns an array containing the constants of this enum class, in the order they are declared.
- 
Enum Constant Details- 
FAILSpecifies that any fluid amounts that don't completely fit together should fail.
- 
MAXIMUM_POSSIBLEMove only an amount which can be validly moved, leaving the rest in the source. (As such fluid will never be lost, but you might get some leftovers).
- 
ROUND_UPAlways empty the source, but leave the target with (potentially) slightly more fluid than the exact sum of the two volumes.Use FluidAmount.safeAdd(FluidAmount, RoundingMode)with aRoundingModeofUP.
- 
ROUND_DOWNAlways empty the source, but leave the target with (potentially) slightly less fluid than the exact sum of the two volumes.Use FluidAmount.safeAdd(FluidAmount, RoundingMode)with aRoundingModeofDOWN.
- 
ROUND_CEILINGAlways empty the source, but leave the target with (potentially) slightly different amount fluid than the exact sum of the two volumes.Use FluidAmount.safeAdd(FluidAmount, RoundingMode)with aRoundingModeofUP.
- 
ROUND_FLOORAlways empty the source, but leave the target with (potentially) slightly different amount fluid than the exact sum of the two volumes.Use FluidAmount.safeAdd(FluidAmount, RoundingMode)with aRoundingModeofFLOOR.
- 
ROUND_HALF_UPAlways empty the source, but leave the target with (potentially) slightly different amount of fluid than the exact sum of the two volumes.Use FluidAmount.safeAdd(FluidAmount, RoundingMode)with aRoundingModeofHALF_UP.
- 
ROUND_HALF_DOWNAlways empty the source, but leave the target with (potentially) slightly different amount of fluid than the exact sum of the two volumes.Use FluidAmount.safeAdd(FluidAmount, RoundingMode)with aRoundingModeofHALF_DOWN.
- 
ROUND_HALF_EVENAlways empty the source, but leave the target with (potentially) slightly different amount of fluid than the exact sum of the two volumes.Use FluidAmount.safeAdd(FluidAmount, RoundingMode)with aRoundingModeofHALF_EVEN.
- 
ROUND_UNNECESSARYThrow anArithmeticExceptionif the end result needs to be rounded.
 
- 
- 
Field Details- 
DEFAULT
- 
roundingThe rounding mode to use, or null if this requires special handling.
 
- 
- 
Method Details- 
valuesReturns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
 
- 
valueOfReturns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
- name- the name of the enum constant to be returned.
- Returns:
- the enum constant with the specified name
- Throws:
- IllegalArgumentException- if this enum class has no constant with the specified name
- NullPointerException- if the argument is null
 
- 
fromRounding
 
-