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.luminosityproperty.- Parameters:
luminance- A value between 0 and 15.
-
setUnit
-
addUnit
Adds the given unit to the set of units used. -
setRawFluid
-
setGas
Sets theFluidKey.gaseousproperty to true.- Returns:
- this.
-
setLiquid
Sets theFluidKey.gaseousproperty to false.- Returns:
- this.
-
setViscosity
Sets theFluidKey.viscosityproperty to the givenFluidAmount, or null to use the default value.- Returns:
- this.
-
setNetherViscosity
Sets theFluidKey.netherViscosityproperty to the givenFluidAmount, or null to use the default value.- Returns:
- this.
-
setCohesion
Sets theFluidKey.cohesionproperty to the givenFluidAmount, or null to use the default value.- Returns:
- this.
-
setNetherCohesion
Sets theFluidKey.netherCohesionproperty to the givenFluidAmount, or null to use the default value.- Returns:
- this.
-
setDensity
Sets theFluidKey.densityproperty to the givenFluidAmount, or null to use the default value.- Returns:
- this.
-
setThermalCapacity
Sets theFluidKey.thermalCapacityproperty 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.thermalCapacityproperty to the givenFluidAmount, or null to allowFluidPropertys to provide the fluid for this fluid.- Returns:
- this.
-
setTemperature
public FluidKey.FluidKeyBuilder setTemperature(FluidTemperature.ContinuousFluidTemperature temperature)Sets theFluidKey.thermalCapacityproperty to the givenFluidAmount, or null to allowFluidPropertys to provide the fluid for this fluid.- Returns:
- this.
-