Class FluidConstants
java.lang.Object
net.fabricmc.fabric.api.transfer.v1.fluid.FluidConstants
Constants for fluid transfer. In general, 1 bucket = 81000 droplets = 1 block.
If you don't know how many 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
Modifier and TypeFieldDescriptionstatic final long
static final long
static final long
static final long
static final long
static final int
Lava temperature, in Kelvin.static final int
static final int
static final long
static final int
For flowable fluids, the viscosity should matchVISCOSITY_RATIO
*FlowableFluid.getFlowSpeed(net.minecraft.world.WorldView)
.static final int
Water temperature, in Kelvin.static final int
-
Method Summary
Modifier and TypeMethodDescriptionstatic long
fromBucketFraction
(long numerator, long denominator) Convert a fraction of buckets into droplets.
-
Field Details
-
BUCKET
public static final long BUCKET- See Also:
-
BOTTLE
public static final long BOTTLE- See Also:
-
BLOCK
public static final long BLOCK- See Also:
-
INGOT
public static final long INGOT- See Also:
-
NUGGET
public static final long NUGGET- See Also:
-
DROPLET
public static final long DROPLET- See Also:
-
WATER_TEMPERATURE
public static final int WATER_TEMPERATUREWater temperature, in Kelvin.- See Also:
-
LAVA_TEMPERATURE
public static final int LAVA_TEMPERATURELava temperature, in Kelvin.- See Also:
-
WATER_VISCOSITY
public static final int WATER_VISCOSITY- See Also:
-
LAVA_VISCOSITY
public static final int LAVA_VISCOSITY- See Also:
-
LAVA_VISCOSITY_NETHER
public static final int LAVA_VISCOSITY_NETHER- See Also:
-
VISCOSITY_RATIO
public static final int VISCOSITY_RATIOFor flowable fluids, the viscosity should matchVISCOSITY_RATIO
*FlowableFluid.getFlowSpeed(net.minecraft.world.WorldView)
.- See Also:
-
-
Method Details
-
fromBucketFraction
public static long fromBucketFraction(long numerator, long denominator) 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.
-