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
ConstructorsConstructorDescriptionFluidKeyBuilder(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.cohesionproperty to the givenFluidAmount, or null to use the default value.Sets theFluidKey.densityproperty to the givenFluidAmount, or null to use the default value.setGas()Sets theFluidKey.gaseousproperty to true.setIdEntry(net.minecraft.util.Identifier id) Sets theFluidKey.gaseousproperty to false.setLuminosity(int luminance) Sets theFluidKey.luminosityproperty.setName(net.minecraft.text.Text name) Sets theFluidKey.netherCohesionproperty to the givenFluidAmount, or null to use the default value.Sets theFluidKey.netherViscosityproperty 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.thermalCapacityproperty to the givenFluidAmount, or null to allowFluidPropertys to provide the fluid for this fluid.setTemperature(FluidTemperature.DiscreteFluidTemperature temperature) Sets theFluidKey.thermalCapacityproperty to the givenFluidAmount, or null to allowFluidPropertys to provide the fluid for this fluid.Sets theFluidKey.thermalCapacityproperty to the givenFluidAmount, or null to use the default value.Sets theFluidKey.viscosityproperty 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.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.
-