net.minecraftforge.fluids

## Class Fluid

- java.lang.Object
- - net.minecraftforge.fluids.Fluid

-     public class Fluid
      extends Object

  Minecraft Forge Fluid Implementation This class is a fluid (liquid or gas) equivalent to "Item." It describes the nature of a fluid and contains its general properties. These properties do not have inherent gameplay mechanics - they are provided so that mods may choose to take advantage of them. Fluid implementations are not required to actively use these properties, nor are objects interfacing with fluids required to make use of them, but it is encouraged. The default values can be used as a reference point for mods adding fluids such as oil or heavy water.
  Author:
    King Lemming

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Fluid(String fluidName)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `canBePlacedInWorld()`
    `int` | `getBlockID()`
    `int` | `getColor()`
    `int` | `getColor(FluidStack stack)`
    `int` | `getColor(World world, int x, int y, int z)`
    `int` | `getDensity()`
    `int` | `getDensity(FluidStack stack)`
    `int` | `getDensity(World world, int x, int y, int z)`
    `Icon` | `getFlowingIcon()`
    `Icon` | `getIcon()`
    `Icon` | `getIcon(FluidStack stack)`
    `Icon` | `getIcon(World world, int x, int y, int z)`
    `int` | `getID()`
    `String` | `getLocalizedName()` Returns the localized name of this fluid.
    `int` | `getLuminosity()`
    `int` | `getLuminosity(FluidStack stack)`
    `int` | `getLuminosity(World world, int x, int y, int z)`
    `String` | `getName()`
    `EnumRarity` | `getRarity()`
    `EnumRarity` | `getRarity(FluidStack stack)`
    `EnumRarity` | `getRarity(World world, int x, int y, int z)`
    `int` | `getSpriteNumber()` Returns 0 for "/terrain.png".
    `Icon` | `getStillIcon()`
    `int` | `getTemperature()`
    `int` | `getTemperature(FluidStack stack)`
    `int` | `getTemperature(World world, int x, int y, int z)`
    `String` | `getUnlocalizedName()` Returns the unlocalized name of this fluid.
    `int` | `getViscosity()`
    `int` | `getViscosity(FluidStack stack)`
    `int` | `getViscosity(World world, int x, int y, int z)`
    `boolean` | `isGaseous()`
    `boolean` | `isGaseous(FluidStack stack)`
    `boolean` | `isGaseous(World world, int x, int y, int z)`
    `static void` | `registerLegacyName(String legacyName, String canonicalName)` Register a legacy liquid name with the Fluids system
    `Fluid` | `setBlockID(Block block)`
    `Fluid` | `setBlockID(int blockID)`
    `Fluid` | `setDensity(int density)`
    `Fluid` | `setFlowingIcon(Icon flowingIcon)`
    `Fluid` | `setGaseous(boolean isGaseous)`
    `Fluid` | `setIcons(Icon commonIcon)`
    `Fluid` | `setIcons(Icon stillIcon, Icon flowingIcon)`
    `Fluid` | `setLuminosity(int luminosity)`
    `Fluid` | `setRarity(EnumRarity rarity)`
    `Fluid` | `setStillIcon(Icon stillIcon)`
    `Fluid` | `setTemperature(int temperature)`
    `Fluid` | `setUnlocalizedName(String unlocalizedName)`
    `Fluid` | `setViscosity(int viscosity)`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### Fluid

          public Fluid(String fluidName)

  - ### Method Detail

    - #### setUnlocalizedName

          public Fluid setUnlocalizedName(String unlocalizedName)

    - #### setBlockID

          public Fluid setBlockID(int blockID)

    - #### setBlockID

          public Fluid setBlockID(Block block)

    - #### setLuminosity

          public Fluid setLuminosity(int luminosity)

    - #### setDensity

          public Fluid setDensity(int density)

    - #### setTemperature

          public Fluid setTemperature(int temperature)

    - #### setViscosity

          public Fluid setViscosity(int viscosity)

    - #### setGaseous

          public Fluid setGaseous(boolean isGaseous)

    - #### setRarity

          public Fluid setRarity(EnumRarity rarity)

    - #### getName

          public final String getName()

    - #### getID

          public final int getID()

    - #### getBlockID

          public final int getBlockID()

    - #### canBePlacedInWorld

          public final boolean canBePlacedInWorld()

    - #### getLocalizedName

          public String getLocalizedName()

      Returns the localized name of this fluid.

    - #### getUnlocalizedName

          public String getUnlocalizedName()

      Returns the unlocalized name of this fluid.

    - #### getSpriteNumber

          public final int getSpriteNumber()

      Returns 0 for "/terrain.png". ALL FLUID TEXTURES MUST BE ON THIS SHEET.

    - #### getLuminosity

          public final int getLuminosity()

    - #### getDensity

          public final int getDensity()

    - #### getTemperature

          public final int getTemperature()

    - #### getViscosity

          public final int getViscosity()

    - #### isGaseous

          public final boolean isGaseous()

    - #### getRarity

          public EnumRarity getRarity()

    - #### getColor

          public int getColor()

    - #### setStillIcon

          public final Fluid setStillIcon(Icon stillIcon)

    - #### setFlowingIcon

          public final Fluid setFlowingIcon(Icon flowingIcon)

    - #### setIcons

          public final Fluid setIcons(Icon stillIcon,
                       Icon flowingIcon)

    - #### setIcons

          public final Fluid setIcons(Icon commonIcon)

    - #### getIcon

          public Icon getIcon()

    - #### getStillIcon

          public Icon getStillIcon()

    - #### getFlowingIcon

          public Icon getFlowingIcon()

    - #### getLuminosity

          public int getLuminosity(FluidStack stack)

    - #### getDensity

          public int getDensity(FluidStack stack)

    - #### getTemperature

          public int getTemperature(FluidStack stack)

    - #### getViscosity

          public int getViscosity(FluidStack stack)

    - #### isGaseous

          public boolean isGaseous(FluidStack stack)

    - #### getRarity

          public EnumRarity getRarity(FluidStack stack)

    - #### getColor

          public int getColor(FluidStack stack)

    - #### getIcon

          public Icon getIcon(FluidStack stack)

    - #### getLuminosity

          public int getLuminosity(World world,
                          int x,
                          int y,
                          int z)

    - #### getDensity

          public int getDensity(World world,
                       int x,
                       int y,
                       int z)

    - #### getTemperature

          public int getTemperature(World world,
                           int x,
                           int y,
                           int z)

    - #### getViscosity

          public int getViscosity(World world,
                         int x,
                         int y,
                         int z)

    - #### isGaseous

          public boolean isGaseous(World world,
                          int x,
                          int y,
                          int z)

    - #### getRarity

          public EnumRarity getRarity(World world,
                             int x,
                             int y,
                             int z)

    - #### getColor

          public int getColor(World world,
                     int x,
                     int y,
                     int z)

    - #### getIcon

          public Icon getIcon(World world,
                     int x,
                     int y,
                     int z)

    - #### registerLegacyName

          public static void registerLegacyName(String legacyName,
                                String canonicalName)

      Register a legacy liquid name with the Fluids system
      Parameters:
        `legacyName` - The legacy name to recognize
        `canonicalName` - The canonical fluid name it will become