Package dev.architectury.core.fluid
Interface ArchitecturyFluidAttributes
- All Known Implementing Classes:
SimpleArchitecturyFluidAttributes
public interface ArchitecturyFluidAttributes
Attributes of a fluid.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns whether this fluid can be converted to a source block when a flowing fluid is adjacent to two source blocks.@Nullable net.minecraft.world.level.block.LiquidBlockgetBlock()Returns the block form of this fluid.@Nullable net.minecraft.world.item.ItemReturns the filled bucket item for this fluid.default intgetColor()Returns the color of the fluid.default intgetColor(@Nullable FluidStack stack) Returns the color of the fluid.intgetColor(@Nullable FluidStack stack, @Nullable net.minecraft.world.level.BlockAndTintGetter level, @Nullable net.minecraft.core.BlockPos pos) Deprecated, for removal: This API element is subject to removal in a future version.default intgetColor(@Nullable net.minecraft.world.level.material.FluidState state, @Nullable net.minecraft.world.level.BlockAndTintGetter level, @Nullable net.minecraft.core.BlockPos pos) Returns the color of the fluid.default intReturns the density of the fluid, this is 1000 for water and 3000 for lava on forge.default intgetDensity(@Nullable FluidStack stack) Returns the density of the fluid, this is 1000 for water and 3000 for lava on forge.intgetDensity(@Nullable FluidStack stack, @Nullable net.minecraft.world.level.BlockAndTintGetter level, @Nullable net.minecraft.core.BlockPos pos) Returns the density of the fluid, this is 1000 for water and 3000 for lava on forge.default intReturns the drop in fluid level per block travelled.intgetDropOff(@Nullable net.minecraft.world.level.LevelReader level) Returns the drop in fluid level per block travelled.default @Nullable net.minecraft.sounds.SoundEventReturns the empty sound of the fluid.default @Nullable net.minecraft.sounds.SoundEventgetEmptySound(@Nullable FluidStack stack) Returns the empty sound of the fluid.@Nullable net.minecraft.sounds.SoundEventgetEmptySound(@Nullable FluidStack stack, @Nullable net.minecraft.world.level.BlockAndTintGetter level, @Nullable net.minecraft.core.BlockPos pos) Returns the empty sound of the fluid.floatReturns the explosion resistance of this fluid.default @Nullable net.minecraft.sounds.SoundEventReturns the fill sound of the fluid.default @Nullable net.minecraft.sounds.SoundEventgetFillSound(@Nullable FluidStack stack) Returns the fill sound of the fluid.@Nullable net.minecraft.sounds.SoundEventgetFillSound(@Nullable FluidStack stack, @Nullable net.minecraft.world.level.BlockAndTintGetter level, @Nullable net.minecraft.core.BlockPos pos) Returns the fill sound of the fluid.net.minecraft.world.level.material.FluidReturns the flowing fluid.default net.minecraft.resources.ResourceLocationReturns the texture location of this fluid in its flowing form.default net.minecraft.resources.ResourceLocationgetFlowingTexture(@Nullable FluidStack stack) Returns the texture location of this fluid in its flowing form.net.minecraft.resources.ResourceLocationgetFlowingTexture(@Nullable FluidStack stack, @Nullable net.minecraft.world.level.BlockAndTintGetter level, @Nullable net.minecraft.core.BlockPos pos) Deprecated, for removal: This API element is subject to removal in a future version.Please use and overridegetFlowingTexture(FluidState, BlockAndTintGetter, BlockPos)orgetFlowingTexture(FluidStack)instead, this method will be removed in a future version.default net.minecraft.resources.ResourceLocationgetFlowingTexture(@Nullable net.minecraft.world.level.material.FluidState state, @Nullable net.minecraft.world.level.BlockAndTintGetter level, @Nullable net.minecraft.core.BlockPos pos) Returns the texture location of this fluid in its flowing form.default intReturns the luminosity of the fluid, this is between 0 and 15.default intgetLuminosity(@Nullable FluidStack stack) Returns the luminosity of the fluid, this is between 0 and 15.intgetLuminosity(@Nullable FluidStack stack, @Nullable net.minecraft.world.level.BlockAndTintGetter level, @Nullable net.minecraft.core.BlockPos pos) Returns the luminosity of the fluid, this is between 0 and 15.default net.minecraft.network.chat.ComponentgetName()Returns the name of this fluid.default net.minecraft.network.chat.ComponentgetName(@Nullable FluidStack stack) Returns the name of this fluid.default @Nullable net.minecraft.resources.ResourceLocationReturns the overlay texture location of this fluid behind transparent blocks.default @Nullable net.minecraft.resources.ResourceLocationgetOverlayTexture(@Nullable FluidStack stack) Returns the overlay texture location of this fluid behind transparent blocks.default @Nullable net.minecraft.resources.ResourceLocationgetOverlayTexture(@Nullable net.minecraft.world.level.material.FluidState state, @Nullable net.minecraft.world.level.BlockAndTintGetter level, @Nullable net.minecraft.core.BlockPos pos) Returns the overlay texture location of this fluid behind transparent blocks.default net.minecraft.world.item.RarityReturns the rarity of the fluid.default net.minecraft.world.item.RaritygetRarity(@Nullable FluidStack stack) Returns the rarity of the fluid.net.minecraft.world.item.RaritygetRarity(@Nullable FluidStack stack, @Nullable net.minecraft.world.level.BlockAndTintGetter level, @Nullable net.minecraft.core.BlockPos pos) Returns the rarity of the fluid.default intReturns the maximum distance this fluid will consider as a flowable hole candidate.intgetSlopeFindDistance(@Nullable net.minecraft.world.level.LevelReader level) Returns the maximum distance this fluid will consider as a flowable hole candidate.net.minecraft.world.level.material.FluidReturns the still fluid.default net.minecraft.resources.ResourceLocationReturns the texture location of this fluid in its source form.default net.minecraft.resources.ResourceLocationgetSourceTexture(@Nullable FluidStack stack) Returns the texture location of this fluid in its source form.net.minecraft.resources.ResourceLocationgetSourceTexture(@Nullable FluidStack stack, @Nullable net.minecraft.world.level.BlockAndTintGetter level, @Nullable net.minecraft.core.BlockPos pos) Deprecated, for removal: This API element is subject to removal in a future version.Please use and overridegetSourceTexture(FluidState, BlockAndTintGetter, BlockPos)orgetSourceTexture(FluidStack)instead, this method will be removed in a future version.default net.minecraft.resources.ResourceLocationgetSourceTexture(@Nullable net.minecraft.world.level.material.FluidState state, @Nullable net.minecraft.world.level.BlockAndTintGetter level, @Nullable net.minecraft.core.BlockPos pos) Returns the texture location of this fluid in its source form.default intReturns the temperature of the fluid.default intgetTemperature(@Nullable FluidStack stack) Returns the temperature of the fluid.intgetTemperature(@Nullable FluidStack stack, @Nullable net.minecraft.world.level.BlockAndTintGetter level, @Nullable net.minecraft.core.BlockPos pos) Returns the temperature of the fluid.default intReturns the tick delay between each flow update.intgetTickDelay(@Nullable net.minecraft.world.level.LevelReader level) Returns the tick delay between each flow update.default @Nullable StringReturns the translation key of the name of this fluid.@Nullable StringgetTranslationKey(@Nullable FluidStack stack) Returns the translation key of the name of this fluid.default intReturns the viscosity of the fluid.default intgetViscosity(@Nullable FluidStack stack) Returns the viscosity of the fluid.intgetViscosity(@Nullable FluidStack stack, @Nullable net.minecraft.world.level.BlockAndTintGetter level, @Nullable net.minecraft.core.BlockPos pos) Returns the viscosity of the fluid.default booleanReturns whether this fluid is lighter than air.default booleanisLighterThanAir(@Nullable FluidStack stack) Returns whether this fluid is lighter than air.booleanisLighterThanAir(@Nullable FluidStack stack, @Nullable net.minecraft.world.level.BlockAndTintGetter level, @Nullable net.minecraft.core.BlockPos pos) Returns whether this fluid is lighter than air.
-
Method Details
-
getTranslationKey
Returns the translation key of the name of this fluid.- Parameters:
stack- the fluid stack, can benull- Returns:
- the translation key
-
getTranslationKey
Returns the translation key of the name of this fluid.- Returns:
- the translation key
-
getName
Returns the name of this fluid.- Parameters:
stack- the fluid stack, can benull- Returns:
- the name
-
getName
default net.minecraft.network.chat.Component getName()Returns the name of this fluid.- Returns:
- the name
-
getFlowingFluid
net.minecraft.world.level.material.Fluid getFlowingFluid()Returns the flowing fluid.- Returns:
- the flowing fluid
-
getSourceFluid
net.minecraft.world.level.material.Fluid getSourceFluid()Returns the still fluid.- Returns:
- the still fluid
-
canConvertToSource
boolean canConvertToSource()Returns whether this fluid can be converted to a source block when a flowing fluid is adjacent to two source blocks. A fluid that can be converted to a source block means that the fluid can be multiplied infinitely.- Returns:
- whether this fluid can be converted to a source block
-
getSlopeFindDistance
int getSlopeFindDistance(@Nullable @Nullable net.minecraft.world.level.LevelReader level) Returns the maximum distance this fluid will consider as a flowable hole candidate.- Parameters:
level- the level, can benull- Returns:
- the maximum distance
- See Also:
-
WaterFluid.getSlopeFindDistance(LevelReader)LavaFluid.getSlopeFindDistance(LevelReader)
-
getSlopeFindDistance
default int getSlopeFindDistance()Returns the maximum distance this fluid will consider as a flowable hole candidate.- Returns:
- the maximum distance
- See Also:
-
WaterFluid.getSlopeFindDistance(LevelReader)LavaFluid.getSlopeFindDistance(LevelReader)
-
getDropOff
int getDropOff(@Nullable @Nullable net.minecraft.world.level.LevelReader level) Returns the drop in fluid level per block travelled.- Parameters:
level- the level, can benull- Returns:
- the drop in fluid level per block travelled
- See Also:
-
WaterFluid.getDropOff(LevelReader)LavaFluid.getDropOff(LevelReader)
-
getDropOff
default int getDropOff()Returns the drop in fluid level per block travelled.- Returns:
- the drop in fluid level per block travelled
- See Also:
-
WaterFluid.getDropOff(LevelReader)LavaFluid.getDropOff(LevelReader)
-
getBucketItem
@Nullable @Nullable net.minecraft.world.item.Item getBucketItem()Returns the filled bucket item for this fluid.- Returns:
- the filled bucket item
-
getTickDelay
int getTickDelay(@Nullable @Nullable net.minecraft.world.level.LevelReader level) Returns the tick delay between each flow update.- Parameters:
level- the level, can benull- Returns:
- the tick delay
- See Also:
-
WaterFluid.getTickDelay(LevelReader)LavaFluid.getTickDelay(LevelReader)
-
getTickDelay
default int getTickDelay()Returns the tick delay between each flow update.- Returns:
- the tick delay
- See Also:
-
WaterFluid.getTickDelay(LevelReader)LavaFluid.getTickDelay(LevelReader)
-
getExplosionResistance
float getExplosionResistance()Returns the explosion resistance of this fluid.- Returns:
- the explosion resistance
- See Also:
-
WaterFluid.getExplosionResistance()LavaFluid.getExplosionResistance()
-
getBlock
@Nullable @Nullable net.minecraft.world.level.block.LiquidBlock getBlock()Returns the block form of this fluid.- Returns:
- the block form
- See Also:
-
Blocks.WATERBlocks.LAVA
-
getSourceTexture
@Deprecated(forRemoval=true) net.minecraft.resources.ResourceLocation getSourceTexture(@Nullable @Nullable FluidStack stack, @Nullable @Nullable net.minecraft.world.level.BlockAndTintGetter level, @Nullable @Nullable net.minecraft.core.BlockPos pos) Deprecated, for removal: This API element is subject to removal in a future version.Please use and overridegetSourceTexture(FluidState, BlockAndTintGetter, BlockPos)orgetSourceTexture(FluidStack)instead, this method will be removed in a future version.Returns the texture location of this fluid in its source form.The vanilla water location is
"block/water_still".- Parameters:
stack- the fluid stack, can benulllevel- the level, can benullpos- the position, can benull- Returns:
- the texture location
-
getSourceTexture
default net.minecraft.resources.ResourceLocation getSourceTexture(@Nullable @Nullable net.minecraft.world.level.material.FluidState state, @Nullable @Nullable net.minecraft.world.level.BlockAndTintGetter level, @Nullable @Nullable net.minecraft.core.BlockPos pos) Returns the texture location of this fluid in its source form.The vanilla water location is
"block/water_still".- Parameters:
state- the fluid state, can benulllevel- the level, can benullpos- the position, can benull- Returns:
- the texture location
-
getSourceTexture
default net.minecraft.resources.ResourceLocation getSourceTexture(@Nullable @Nullable FluidStack stack) Returns the texture location of this fluid in its source form.The vanilla water location is
"block/water_still".- Parameters:
stack- the fluid stack, can benull- Returns:
- the texture location
-
getSourceTexture
default net.minecraft.resources.ResourceLocation getSourceTexture()Returns the texture location of this fluid in its source form.The vanilla water location is
"block/water_still".- Returns:
- the texture location
-
getFlowingTexture
@Deprecated(forRemoval=true) net.minecraft.resources.ResourceLocation getFlowingTexture(@Nullable @Nullable FluidStack stack, @Nullable @Nullable net.minecraft.world.level.BlockAndTintGetter level, @Nullable @Nullable net.minecraft.core.BlockPos pos) Deprecated, for removal: This API element is subject to removal in a future version.Please use and overridegetFlowingTexture(FluidState, BlockAndTintGetter, BlockPos)orgetFlowingTexture(FluidStack)instead, this method will be removed in a future version.Returns the texture location of this fluid in its flowing form.The vanilla water location is
"block/water_flow".- Parameters:
stack- the fluid stack, can benulllevel- the level, can benullpos- the position, can benull- Returns:
- the texture location
-
getFlowingTexture
default net.minecraft.resources.ResourceLocation getFlowingTexture(@Nullable @Nullable net.minecraft.world.level.material.FluidState state, @Nullable @Nullable net.minecraft.world.level.BlockAndTintGetter level, @Nullable @Nullable net.minecraft.core.BlockPos pos) Returns the texture location of this fluid in its flowing form.The vanilla water location is
"block/water_flow".- Parameters:
state- the fluid state, can benulllevel- the level, can benullpos- the position, can benull- Returns:
- the texture location
-
getFlowingTexture
default net.minecraft.resources.ResourceLocation getFlowingTexture(@Nullable @Nullable FluidStack stack) Returns the texture location of this fluid in its flowing form.The vanilla water location is
"block/water_flow".- Parameters:
stack- the fluid stack, can benull- Returns:
- the texture location
-
getFlowingTexture
default net.minecraft.resources.ResourceLocation getFlowingTexture()Returns the texture location of this fluid in its flowing form.The vanilla water location is
"block/water_flow".- Returns:
- the texture location
-
getOverlayTexture
@Nullable default @Nullable net.minecraft.resources.ResourceLocation getOverlayTexture(@Nullable @Nullable net.minecraft.world.level.material.FluidState state, @Nullable @Nullable net.minecraft.world.level.BlockAndTintGetter level, @Nullable @Nullable net.minecraft.core.BlockPos pos) Returns the overlay texture location of this fluid behind transparent blocks.The vanilla water location is
"block/water_overlay".- Parameters:
state- the fluid state, can benulllevel- the level, can benullpos- the position, can benull- Returns:
- the texture location, can be
null
-
getOverlayTexture
@Nullable default @Nullable net.minecraft.resources.ResourceLocation getOverlayTexture(@Nullable @Nullable FluidStack stack) Returns the overlay texture location of this fluid behind transparent blocks.The vanilla water location is
"block/water_overlay".- Parameters:
stack- the fluid stack, can benull- Returns:
- the texture location, can be
null
-
getOverlayTexture
@Nullable default @Nullable net.minecraft.resources.ResourceLocation getOverlayTexture()Returns the overlay texture location of this fluid behind transparent blocks.The vanilla water location is
"block/water_overlay".- Returns:
- the texture location, can be
null
-
getColor
@Deprecated(forRemoval=true) int getColor(@Nullable @Nullable FluidStack stack, @Nullable @Nullable net.minecraft.world.level.BlockAndTintGetter level, @Nullable @Nullable net.minecraft.core.BlockPos pos) Deprecated, for removal: This API element is subject to removal in a future version.Please use and overridegetColor(FluidState, BlockAndTintGetter, BlockPos)orgetColor(FluidStack)instead, this method will be removed in a future version.Returns the color of the fluid.- Parameters:
stack- the fluid stack, can benulllevel- the level, can benullpos- the position, can benull- Returns:
- the color
-
getColor
default int getColor(@Nullable @Nullable net.minecraft.world.level.material.FluidState state, @Nullable @Nullable net.minecraft.world.level.BlockAndTintGetter level, @Nullable @Nullable net.minecraft.core.BlockPos pos) Returns the color of the fluid.- Parameters:
state- the fluid state, can benulllevel- the level, can benullpos- the position, can benull- Returns:
- the color
-
getColor
Returns the color of the fluid.- Parameters:
stack- the fluid stack, can benull- Returns:
- the color
-
getColor
default int getColor()Returns the color of the fluid.- Returns:
- the color
-
getLuminosity
int getLuminosity(@Nullable @Nullable FluidStack stack, @Nullable @Nullable net.minecraft.world.level.BlockAndTintGetter level, @Nullable @Nullable net.minecraft.core.BlockPos pos) Returns the luminosity of the fluid, this is between 0 and 15.- Parameters:
stack- the fluid stack, can benulllevel- the level, can benullpos- the position, can benull- Returns:
- the luminosity
-
getLuminosity
Returns the luminosity of the fluid, this is between 0 and 15.- Parameters:
stack- the fluid stack, can benull- Returns:
- the luminosity
-
getLuminosity
default int getLuminosity()Returns the luminosity of the fluid, this is between 0 and 15.- Returns:
- the luminosity
-
getDensity
int getDensity(@Nullable @Nullable FluidStack stack, @Nullable @Nullable net.minecraft.world.level.BlockAndTintGetter level, @Nullable @Nullable net.minecraft.core.BlockPos pos) Returns the density of the fluid, this is 1000 for water and 3000 for lava on forge.- Parameters:
stack- the fluid stack, can benulllevel- the level, can benullpos- the position, can benull- Returns:
- the density
-
getDensity
Returns the density of the fluid, this is 1000 for water and 3000 for lava on forge.- Parameters:
stack- the fluid stack, can benull- Returns:
- the density
-
getDensity
default int getDensity()Returns the density of the fluid, this is 1000 for water and 3000 for lava on forge.- Returns:
- the density
-
getTemperature
int getTemperature(@Nullable @Nullable FluidStack stack, @Nullable @Nullable net.minecraft.world.level.BlockAndTintGetter level, @Nullable @Nullable net.minecraft.core.BlockPos pos) Returns the temperature of the fluid. The temperature is in kelvin, for example, 300 kelvin is equal to room temperature.- Parameters:
stack- the fluid stack, can benulllevel- the level, can benullpos- the position, can benull- Returns:
- the temperature
-
getTemperature
Returns the temperature of the fluid. The temperature is in kelvin, for example, 300 kelvin is equal to room temperature.- Parameters:
stack- the fluid stack, can benull- Returns:
- the temperature
-
getTemperature
default int getTemperature()Returns the temperature of the fluid. The temperature is in kelvin, for example, 300 kelvin is equal to room temperature.- Returns:
- the temperature
-
getViscosity
int getViscosity(@Nullable @Nullable FluidStack stack, @Nullable @Nullable net.minecraft.world.level.BlockAndTintGetter level, @Nullable @Nullable net.minecraft.core.BlockPos pos) Returns the viscosity of the fluid. A lower viscosity means that the fluid will flow faster. The default value is 1000 for water.- Parameters:
stack- the fluid stack, can benulllevel- the level, can benullpos- the position, can benull- Returns:
- the viscosity
-
getViscosity
Returns the viscosity of the fluid. A lower viscosity means that the fluid will flow faster. The default value is 1000 for water.- Parameters:
stack- the fluid stack, can benull- Returns:
- the viscosity
-
getViscosity
default int getViscosity()Returns the viscosity of the fluid. A lower viscosity means that the fluid will flow faster. The default value is 1000 for water.- Returns:
- the viscosity
-
isLighterThanAir
boolean isLighterThanAir(@Nullable @Nullable FluidStack stack, @Nullable @Nullable net.minecraft.world.level.BlockAndTintGetter level, @Nullable @Nullable net.minecraft.core.BlockPos pos) Returns whether this fluid is lighter than air. This is used to determine whether the fluid should be rendered upside down like gas.- Parameters:
stack- the fluid stack, can benulllevel- the level, can benullpos- the position, can benull- Returns:
trueif the fluid is lighter than air
-
isLighterThanAir
Returns whether this fluid is lighter than air. This is used to determine whether the fluid should be rendered upside down like gas.- Parameters:
stack- the fluid stack, can benull- Returns:
trueif the fluid is lighter than air
-
isLighterThanAir
default boolean isLighterThanAir()Returns whether this fluid is lighter than air. This is used to determine whether the fluid should be rendered upside down like gas.- Returns:
trueif the fluid is lighter than air
-
getRarity
net.minecraft.world.item.Rarity getRarity(@Nullable @Nullable FluidStack stack, @Nullable @Nullable net.minecraft.world.level.BlockAndTintGetter level, @Nullable @Nullable net.minecraft.core.BlockPos pos) Returns the rarity of the fluid.- Parameters:
stack- the fluid stack, can benulllevel- the level, can benullpos- the position, can benull- Returns:
- the rarity
-
getRarity
Returns the rarity of the fluid.- Parameters:
stack- the fluid stack, can benull- Returns:
- the rarity
-
getRarity
default net.minecraft.world.item.Rarity getRarity()Returns the rarity of the fluid.- Returns:
- the rarity
-
getFillSound
@Nullable @Nullable net.minecraft.sounds.SoundEvent getFillSound(@Nullable @Nullable FluidStack stack, @Nullable @Nullable net.minecraft.world.level.BlockAndTintGetter level, @Nullable @Nullable net.minecraft.core.BlockPos pos) Returns the fill sound of the fluid.- Parameters:
stack- the fluid stack, can benulllevel- the level, can benullpos- the position, can benull- Returns:
- the fill sound
- See Also:
-
SoundEvents.BUCKET_FILLSoundEvents.BUCKET_FILL_LAVA
-
getFillSound
@Nullable default @Nullable net.minecraft.sounds.SoundEvent getFillSound(@Nullable @Nullable FluidStack stack) Returns the fill sound of the fluid.- Parameters:
stack- the fluid stack, can benull- Returns:
- the fill sound
- See Also:
-
SoundEvents.BUCKET_FILLSoundEvents.BUCKET_FILL_LAVA
-
getFillSound
@Nullable default @Nullable net.minecraft.sounds.SoundEvent getFillSound()Returns the fill sound of the fluid.- Returns:
- the fill sound
- See Also:
-
SoundEvents.BUCKET_FILLSoundEvents.BUCKET_FILL_LAVA
-
getEmptySound
@Nullable @Nullable net.minecraft.sounds.SoundEvent getEmptySound(@Nullable @Nullable FluidStack stack, @Nullable @Nullable net.minecraft.world.level.BlockAndTintGetter level, @Nullable @Nullable net.minecraft.core.BlockPos pos) Returns the empty sound of the fluid.- Parameters:
stack- the fluid stack, can benulllevel- the level, can benullpos- the position, can benull- Returns:
- the empty sound
- See Also:
-
SoundEvents.BUCKET_EMPTYSoundEvents.BUCKET_EMPTY_LAVA
-
getEmptySound
@Nullable default @Nullable net.minecraft.sounds.SoundEvent getEmptySound(@Nullable @Nullable FluidStack stack) Returns the empty sound of the fluid.- Parameters:
stack- the fluid stack, can benull- Returns:
- the empty sound
- See Also:
-
SoundEvents.BUCKET_EMPTYSoundEvents.BUCKET_EMPTY_LAVA
-
getEmptySound
@Nullable default @Nullable net.minecraft.sounds.SoundEvent getEmptySound()Returns the empty sound of the fluid.- Returns:
- the empty sound
- See Also:
-
SoundEvents.BUCKET_EMPTYSoundEvents.BUCKET_EMPTY_LAVA
-
getColor(FluidState, BlockAndTintGetter, BlockPos)orgetColor(FluidStack)instead, this method will be removed in a future version.