Class FluidAmount.SafeAddResult
java.lang.Object
alexiil.mc.lib.attributes.fluid.amount.FluidAmount.SafeAddResult
- Enclosing class:
- FluidAmount
public static final class FluidAmount.SafeAddResult
extends java.lang.Object
-
Field Summary
Fields Modifier and Type Field Description BigFluidAmountexactValueThe true value of the twoFluidAmount's added together, equal toFluidAmount.bigAdd(FluidAmount).FluidAmountroundedResult -
Constructor Summary
Constructors Constructor Description SafeAddResult(BigFluidAmount exactValue, java.math.RoundingMode rounding)SafeAddResult(FluidAmount exactValue)SafeAddResult(FluidAmount roundedResult, BigFluidAmount exactValue) -
Method Summary
Modifier and Type Method Description BigFluidAmountgetError()java.lang.StringtoString()
-
Field Details
-
roundedResult
-
exactValue
The true value of the twoFluidAmount's added together, equal toFluidAmount.bigAdd(FluidAmount).
-
-
Constructor Details
-
Method Details
-
toString
public java.lang.String toString()- Overrides:
toStringin classjava.lang.Object
-
getError
- Returns:
- The difference between the
exactValueand theroundedResult. This will always be equal to theexactValue.sub(roundedResult)
-