Class FluidKey.FluidKeyBuilder
java.lang.Object
alexiil.mc.lib.attributes.fluid.volume.FluidKey.FluidKeyBuilder
- Direct Known Subclasses:
ColouredFluidKey.ColouredFluidKeyBuilder
,NormalFluidKey.NormalFluidKeyBuilder
- Enclosing class:
- FluidKey
-
Constructor Summary
ConstructorDescriptionFluidKeyBuilder
(FluidRegistryEntry<?> registryEntry, net.minecraft.util.Identifier spriteId, net.minecraft.text.Text name) Deprecated, for removal: This API element is subject to removal in a future version.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
Modifier and TypeMethodDescriptionAdds the given unit to the set of units used.Sets theFluidKey.cohesion
property to the givenFluidAmount
, or null to use the default value.Sets theFluidKey.density
property to the givenFluidAmount
, or null to use the default value.setGas()
Sets theFluidKey.gaseous
property to true.setIdEntry
(net.minecraft.util.Identifier id) Sets theFluidKey.gaseous
property to false.setLuminosity
(int luminance) Sets theFluidKey.luminosity
property.setName
(net.minecraft.text.Text name) Sets theFluidKey.netherCohesion
property to the givenFluidAmount
, or null to use the default value.Sets theFluidKey.netherViscosity
property to the givenFluidAmount
, or null to use the default value.setRawFluid
(net.minecraft.fluid.Fluid rawFluid) setRegistryEntry
(FluidRegistryEntry<?> registryEntry) setRenderColor
(int renderColor) setSprites
(net.minecraft.util.Identifier stillSprite, net.minecraft.util.Identifier flowingSprite) Sets theFluidKey.thermalCapacity
property to the givenFluidAmount
, or null to allowFluidProperty
s to provide the fluid for this fluid.setTemperature
(FluidTemperature.DiscreteFluidTemperature temperature) Sets theFluidKey.thermalCapacity
property to the givenFluidAmount
, or null to allowFluidProperty
s to provide the fluid for this fluid.Sets theFluidKey.thermalCapacity
property to the givenFluidAmount
, or null to use the default value.Sets theFluidKey.viscosity
property to the givenFluidAmount
, or null to use the default value.
-
Constructor Details
-
FluidKeyBuilder
@Deprecated(since="0.5.0", forRemoval=true) public FluidKeyBuilder(FluidRegistryEntry<?> registryEntry, net.minecraft.util.Identifier spriteId, net.minecraft.text.Text name) Deprecated, for removal: This API element is subject to removal in a future version.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.
-