Class FluidKey.FluidKeyBuilder
java.lang.Object
alexiil.mc.lib.attributes.fluid.volume.FluidKey.FluidKeyBuilder
- Direct Known Subclasses:
ColouredFluidKey.ColouredFluidKeyBuilder
,NormalFluidKey.NormalFluidKeyBuilder
- Enclosing class:
- FluidKey
public static class FluidKey.FluidKeyBuilder
extends java.lang.Object
-
Constructor Summary
Constructors Constructor Description FluidKeyBuilder()
FluidKeyBuilder(FluidRegistryEntry<?> registryEntry, net.minecraft.util.Identifier spriteId, net.minecraft.text.Text name)
Deprecated.As the flowing sprite ID is needed as well.FluidKeyBuilder(FluidRegistryEntry<?> registryEntry, net.minecraft.util.Identifier spriteId, net.minecraft.util.Identifier flowingSpriteId, net.minecraft.text.Text name)
FluidKeyBuilder(net.minecraft.fluid.Fluid fluid)
FluidKeyBuilder(net.minecraft.util.Identifier id)
-
Method Summary
-
Constructor Details
-
FluidKeyBuilder
@Deprecated public FluidKeyBuilder(FluidRegistryEntry<?> registryEntry, net.minecraft.util.Identifier spriteId, net.minecraft.text.Text name)Deprecated.As the flowing sprite ID is needed as well. -
FluidKeyBuilder
public FluidKeyBuilder(FluidRegistryEntry<?> registryEntry, net.minecraft.util.Identifier spriteId, net.minecraft.util.Identifier flowingSpriteId, net.minecraft.text.Text name) -
FluidKeyBuilder
public FluidKeyBuilder() -
FluidKeyBuilder
public FluidKeyBuilder(net.minecraft.util.Identifier id) -
FluidKeyBuilder
public FluidKeyBuilder(net.minecraft.fluid.Fluid fluid)
-
-
Method Details
-
copyFrom
-
setRegistryEntry
-
setIdEntry
- Parameters:
id
- The floating identifier to use to identify this fluid - this will not be backed by a normalDefaultedRegistry
, instead these instances will only be backed by a floatingIdentifier
.
-
setName
-
setSprites
public FluidKey.FluidKeyBuilder setSprites(net.minecraft.util.Identifier stillSprite, net.minecraft.util.Identifier flowingSprite) -
setRenderColor
-
setLuminosity
Sets theFluidKey.luminosity
property.- Parameters:
luminance
- A value between 0 and 15.
-
setUnit
-
addUnit
Adds the given unit to the set of units used. -
setRawFluid
-
setGas
Sets theFluidKey.gaseous
property to true.- Returns:
- this.
-
setLiquid
Sets theFluidKey.gaseous
property to false.- Returns:
- this.
-
setViscosity
Sets theFluidKey.viscosity
property to the givenFluidAmount
, or null to use the default value.- Returns:
- this.
-
setNetherViscosity
Sets theFluidKey.netherViscosity
property to the givenFluidAmount
, or null to use the default value.- Returns:
- this.
-
setCohesion
Sets theFluidKey.cohesion
property to the givenFluidAmount
, or null to use the default value.- Returns:
- this.
-
setNetherCohesion
Sets theFluidKey.netherCohesion
property to the givenFluidAmount
, or null to use the default value.- Returns:
- this.
-
setDensity
Sets theFluidKey.density
property to the givenFluidAmount
, or null to use the default value.- Returns:
- this.
-
setThermalCapacity
Sets theFluidKey.thermalCapacity
property to the givenFluidAmount
, or null to use the default value. (If this is null then it will default to the same value assetDensity(FluidAmount)
).- Returns:
- this.
-
setTemperature
public FluidKey.FluidKeyBuilder setTemperature(FluidTemperature.DiscreteFluidTemperature temperature)Sets theFluidKey.thermalCapacity
property to the givenFluidAmount
, or null to allowFluidProperty
s to provide the fluid for this fluid.- Returns:
- this.
-
setTemperature
public FluidKey.FluidKeyBuilder setTemperature(FluidTemperature.ContinuousFluidTemperature temperature)Sets theFluidKey.thermalCapacity
property to the givenFluidAmount
, or null to allowFluidProperty
s to provide the fluid for this fluid.- Returns:
- this.
-