Class FluidConstants
java.lang.Object
net.fabricmc.fabric.api.transfer.v1.fluid.FluidConstants
Deprecated.
Experimental feature, we reserve the right to remove or change it without further notice.
The transfer API is a complex addition, and we want to be able to correct possible design mistakes.
Constants for fluid transfer. In general, 1 bucket = 81000 droplets = 1 block.
If you don't know how much droplets you should pick for a specific resource that has a block form, the convention is to use 81000 droplets for what is worth one block of that resource.
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic long
fromBucketFraction(long numerator, long denominator)
Deprecated.Convert a fraction of buckets into droplets.
-
Field Details
-
BUCKET
public static final long BUCKETDeprecated.- See Also:
- Constant Field Values
-
BOTTLE
public static final long BOTTLEDeprecated.- See Also:
- Constant Field Values
-
BLOCK
public static final long BLOCKDeprecated.- See Also:
- Constant Field Values
-
INGOT
public static final long INGOTDeprecated.- See Also:
- Constant Field Values
-
NUGGET
public static final long NUGGETDeprecated.- See Also:
- Constant Field Values
-
DROPLET
public static final long DROPLETDeprecated.- See Also:
- Constant Field Values
-
-
Method Details
-
fromBucketFraction
public static long fromBucketFraction(long numerator, long denominator)Deprecated.Convert a fraction of buckets into droplets.For example, passing
(1, 3)
will return the 1/3 of a bucket as droplets, so 27000.- Returns:
- The amount of droplets that the passed fraction is equivalent to.
- Throws:
IllegalArgumentException
- If the fraction can't be converted to droplets exactly.
-