net.minecraftforge.fluids

## Class BlockFluidBase

- java.lang.Object
- - net.minecraft.block.Block
  - - net.minecraftforge.fluids.BlockFluidBase

- All Implemented Interfaces:
    IFluidBlock
  Direct Known Subclasses:
    BlockFluidClassic, BlockFluidFinite

      public abstract class BlockFluidBase
      extends Block
      implements IFluidBlock

  This is a base implementation for Fluid blocks. It is highly recommended that you extend this class or one of the Forge-provided child classes.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class net.minecraft.block.Block

      `Block.SoundType`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected static java.util.Map<Block,java.lang.Boolean>` | `defaultDisplacements`
    `protected int` | `density`
    `protected int` | `densityDir`
    `protected java.util.Map<Block,java.lang.Boolean>` | `displacements`
    `protected java.lang.String` | `fluidName`
    `protected int` | `maxScaledLight`
    `protected int` | `quantaPerBlock`
    `protected float` | `quantaPerBlockFloat`
    `protected int` | `renderPass`
    `protected int` | `temperature`
    `protected int` | `tickRate`

    - ### Fields inherited from class net.minecraft.block.Block

      `blockConstructorCalled, blockHardness, blockIcon, blockMaterial, blockParticleGravity, blockRegistry, blockResistance, canBlockGrass, capturedDrops, captureDrops, enableStats, harvesters, isBlockContainer, lightOpacity, lightValue, maxX, maxY, maxZ, minX, minY, minZ, needsRandomTick, opaque, slipperiness, soundTypeAnvil, soundTypeCloth, soundTypeGlass, soundTypeGrass, soundTypeGravel, soundTypeLadder, soundTypeMetal, soundTypePiston, soundTypeSand, soundTypeSnow, soundTypeStone, soundTypeWood, stepSound, textureName, useNeighborBrightness`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `BlockFluidBase(Fluid fluid, Material material)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `abstract boolean` | `canCollideCheck(int meta, boolean fullHit)`
    `boolean` | `canDisplace(IBlockAccess world, int x, int y, int z)` Returns true if the block at (x, y, z) is displaceable.
    `boolean` | `displaceIfPossible(World world, int x, int y, int z)` Attempt to displace the block at (x, y, z), return true if it was displaced.
    `boolean` | `func_149698_L()`
    `boolean` | `getBlocksMovement(IBlockAccess world, int x, int y, int z)`
    `AxisAlignedBB` | `getCollisionBoundingBoxFromPool(World world, int x, int y, int z)`
    `static int` | `getDensity(IBlockAccess world, int x, int y, int z)`
    `float` | `getFilledPercentage(World world, int x, int y, int z)` Returns the amount of a single block is filled.
    `static double` | `getFlowDirection(IBlockAccess world, int x, int y, int z)`
    `Vec3` | `getFlowVector(IBlockAccess world, int x, int y, int z)`
    `Fluid` | `getFluid()` Returns the Fluid associated with this Block.
    `Item` | `getItemDropped(int par1, java.util.Random par2Random, int par3)`
    `int` | `getLightValue(IBlockAccess world, int x, int y, int z)` Get a light value for the block at the specified coordinates, normal ranges are between 0 and 15
    `abstract int` | `getMaxRenderHeightMeta()`
    `int` | `getMixedBrightnessForBlock(IBlockAccess world, int x, int y, int z)`
    `float` | `getQuantaPercentage(IBlockAccess world, int x, int y, int z)`
    `abstract int` | `getQuantaValue(IBlockAccess world, int x, int y, int z)`
    `int` | `getQuantaValueAbove(IBlockAccess world, int x, int y, int z, int aboveThis)`
    `int` | `getQuantaValueBelow(IBlockAccess world, int x, int y, int z, int belowThis)`
    `int` | `getRenderBlockPass()`
    `int` | `getRenderType()`
    `static int` | `getTemperature(IBlockAccess world, int x, int y, int z)`
    `boolean` | `isOpaqueCube()`
    `void` | `onBlockAdded(World world, int x, int y, int z)`
    `void` | `onNeighborBlockChange(World world, int x, int y, int z, Block block)`
    `int` | `quantityDropped(java.util.Random par1Random)`
    `boolean` | `renderAsNormalBlock()`
    `BlockFluidBase` | `setDensity(int density)`
    `BlockFluidBase` | `setMaxScaledLight(int maxScaledLight)`
    `BlockFluidBase` | `setQuantaPerBlock(int quantaPerBlock)`
    `BlockFluidBase` | `setRenderPass(int renderPass)`
    `BlockFluidBase` | `setTemperature(int temperature)`
    `BlockFluidBase` | `setTickRate(int tickRate)`
    `boolean` | `shouldSideBeRendered(IBlockAccess world, int x, int y, int z, int side)`
    `int` | `tickRate(World world)`
    `void` | `velocityToAddToEntity(World world, int x, int y, int z, Entity entity, Vec3 vec)`

    - ### Methods inherited from class net.minecraft.block.Block

      `addCollisionBoxesToList, addDestroyEffects, addHitEffects, beginLeavesDecay, breakBlock, canBeReplacedByLeaves, canBlockStay, canConnectRedstone, canCreatureSpawn, canDropFromExplosion, canEntityDestroy, canHarvestBlock, canPlaceBlockAt, canPlaceBlockOnSide, canPlaceTorchOnTop, canProvidePower, canRenderInPass, canReplace, canSilkHarvest, canSilkHarvest, canSustainLeaves, canSustainPlant, captureDrops, collisionRayTrace, colorMultiplier, createStackedBlock, createTileEntity, damageDropped, disableStats, dropBlockAsItem, dropBlockAsItem, dropBlockAsItemWithChance, dropXpOnBlockBreak, fillWithRain, func_149730_j, func_149735_b, getAmbientOcclusionLightValue, getBedDirection, getBedSpawnPosition, getBlockBoundsMaxX, getBlockBoundsMaxY, getBlockBoundsMaxZ, getBlockBoundsMinX, getBlockBoundsMinY, getBlockBoundsMinZ, getBlockById, getBlockColor, getBlockFromItem, getBlockFromName, getBlockHardness, getBlockTextureFromSide, getCanBlockGrass, getComparatorInputOverride, getCreativeTabToDisplayOn, getDamageValue, getDrops, getEnableStats, getEnchantPowerBonus, getExpDrop, getExplosionResistance, getExplosionResistance, getFireSpreadSpeed, getFlammability, getHarvestLevel, getHarvestTool, getIcon, getIcon, getIdFromBlock, getItem, getItemIconName, getLightOpacity, getLightOpacity, getLightValue, getLocalizedName, getMapColor, getMaterial, getMobilityFlag, getPickBlock, getPlayerRelativeBlockHardness, getRenderColor, getSelectedBoundingBoxFromPool, getSubBlocks, getTextureName, getTickRandomly, getUnlocalizedName, getUseNeighborBrightness, getValidRotations, getWeakChanges, harvestBlock, hasComparatorInputOverride, hasTileEntity, hasTileEntity, isAir, isAssociatedBlock, isBeaconBase, isBed, isBedFoot, isBlockNormalCube, isBlockSolid, isBurning, isCollidable, isEqualTo, isFertile, isFireSource, isFlammable, isFlowerPot, isFoliage, isLadder, isLeaves, isNormalCube, isNormalCube, isProvidingStrongPower, isProvidingWeakPower, isReplaceable, isReplaceableOreGen, isSideSolid, isToolEffective, isWood, onBlockActivated, onBlockClicked, onBlockDestroyedByExplosion, onBlockDestroyedByPlayer, onBlockEventReceived, onBlockExploded, onBlockHarvested, onBlockPlaced, onBlockPlacedBy, onBlockPreDestroy, onEntityCollidedWithBlock, onEntityWalking, onFallenUpon, onNeighborChange, onPlantGrow, onPostBlockPlaced, quantityDropped, quantityDroppedWithBonus, randomDisplayTick, recolourBlock, registerBlockIcons, registerBlocks, removedByPlayer, rotateBlock, setBedOccupied, setBlockBounds, setBlockBoundsBasedOnState, setBlockBoundsForItemRender, setBlockName, setBlockTextureName, setBlockUnbreakable, setCreativeTab, setHardness, setHarvestLevel, setHarvestLevel, setLightLevel, setLightOpacity, setResistance, setStepSound, setTickRandomly, shouldCheckWeakPower, updateTick`

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

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

    - ### Methods inherited from interface net.minecraftforge.fluids.IFluidBlock

      `canDrain, drain`

- - ### Field Detail

    - #### defaultDisplacements

          protected static final java.util.Map<Block,java.lang.Boolean> defaultDisplacements

    - #### displacements

          protected java.util.Map<Block,java.lang.Boolean> displacements

    - #### quantaPerBlock

          protected int quantaPerBlock

    - #### quantaPerBlockFloat

          protected float quantaPerBlockFloat

    - #### density

          protected int density

    - #### densityDir

          protected int densityDir

    - #### temperature

          protected int temperature

    - #### tickRate

          protected int tickRate

    - #### renderPass

          protected int renderPass

    - #### maxScaledLight

          protected int maxScaledLight

    - #### fluidName

          protected final java.lang.String fluidName

  - ### Constructor Detail

    - #### BlockFluidBase

          public BlockFluidBase(Fluid fluid,
                        Material material)

  - ### Method Detail

    - #### setQuantaPerBlock

          public BlockFluidBase setQuantaPerBlock(int quantaPerBlock)

    - #### setDensity

          public BlockFluidBase setDensity(int density)

    - #### setTemperature

          public BlockFluidBase setTemperature(int temperature)

    - #### setTickRate

          public BlockFluidBase setTickRate(int tickRate)

    - #### setRenderPass

          public BlockFluidBase setRenderPass(int renderPass)

    - #### setMaxScaledLight

          public BlockFluidBase setMaxScaledLight(int maxScaledLight)

    - #### canDisplace

          public boolean canDisplace(IBlockAccess world,
                            int x,
                            int y,
                            int z)

      Returns true if the block at (x, y, z) is displaceable. Does not displace the block.

    - #### displaceIfPossible

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

      Attempt to displace the block at (x, y, z), return true if it was displaced.

    - #### getQuantaValue

          public abstract int getQuantaValue(IBlockAccess world,
                           int x,
                           int y,
                           int z)

    - #### canCollideCheck

          public abstract boolean canCollideCheck(int meta,
                                boolean fullHit)

      Overrides:
        `canCollideCheck` in class `Block`

    - #### getMaxRenderHeightMeta

          public abstract int getMaxRenderHeightMeta()

    - #### onBlockAdded

          public void onBlockAdded(World world,
                          int x,
                          int y,
                          int z)

      Overrides:
        `onBlockAdded` in class `Block`

    - #### onNeighborBlockChange

          public void onNeighborBlockChange(World world,
                                   int x,
                                   int y,
                                   int z,
                                   Block block)

      Overrides:
        `onNeighborBlockChange` in class `Block`

    - #### func_149698_L

          public boolean func_149698_L()

      Overrides:
        `func_149698_L` in class `Block`

    - #### getBlocksMovement

          public boolean getBlocksMovement(IBlockAccess world,
                                  int x,
                                  int y,
                                  int z)

      Overrides:
        `getBlocksMovement` in class `Block`

    - #### getCollisionBoundingBoxFromPool

          public AxisAlignedBB getCollisionBoundingBoxFromPool(World world,
                                                      int x,
                                                      int y,
                                                      int z)

      Overrides:
        `getCollisionBoundingBoxFromPool` in class `Block`

    - #### getItemDropped

          public Item getItemDropped(int par1,
                            java.util.Random par2Random,
                            int par3)

      Overrides:
        `getItemDropped` in class `Block`

    - #### quantityDropped

          public int quantityDropped(java.util.Random par1Random)

      Overrides:
        `quantityDropped` in class `Block`

    - #### tickRate

          public int tickRate(World world)

      Overrides:
        `tickRate` in class `Block`

    - #### velocityToAddToEntity

          public void velocityToAddToEntity(World world,
                                   int x,
                                   int y,
                                   int z,
                                   Entity entity,
                                   Vec3 vec)

      Overrides:
        `velocityToAddToEntity` in class `Block`

    - #### getLightValue

          public int getLightValue(IBlockAccess world,
                          int x,
                          int y,
                          int z)

      Description copied from class: `Block`
      Get a light value for the block at the specified coordinates, normal ranges are between 0 and 15
      Overrides:
        `getLightValue` in class `Block`
      Parameters:
        `world` - The current world
        `x` - X Position
        `y` - Y position
        `z` - Z position
      Returns:
        The light value

    - #### getRenderType

          public int getRenderType()

      Overrides:
        `getRenderType` in class `Block`

    - #### isOpaqueCube

          public boolean isOpaqueCube()

      Overrides:
        `isOpaqueCube` in class `Block`

    - #### renderAsNormalBlock

          public boolean renderAsNormalBlock()

      Overrides:
        `renderAsNormalBlock` in class `Block`

    - #### getMixedBrightnessForBlock

          public int getMixedBrightnessForBlock(IBlockAccess world,
                                       int x,
                                       int y,
                                       int z)

      Overrides:
        `getMixedBrightnessForBlock` in class `Block`

    - #### getRenderBlockPass

          public int getRenderBlockPass()

      Overrides:
        `getRenderBlockPass` in class `Block`

    - #### shouldSideBeRendered

          public boolean shouldSideBeRendered(IBlockAccess world,
                                     int x,
                                     int y,
                                     int z,
                                     int side)

      Overrides:
        `shouldSideBeRendered` in class `Block`

    - #### getDensity

          public static final int getDensity(IBlockAccess world,
                       int x,
                       int y,
                       int z)

    - #### getTemperature

          public static final int getTemperature(IBlockAccess world,
                           int x,
                           int y,
                           int z)

    - #### getFlowDirection

          public static double getFlowDirection(IBlockAccess world,
                                int x,
                                int y,
                                int z)

    - #### getQuantaValueBelow

          public final int getQuantaValueBelow(IBlockAccess world,
                                int x,
                                int y,
                                int z,
                                int belowThis)

    - #### getQuantaValueAbove

          public final int getQuantaValueAbove(IBlockAccess world,
                                int x,
                                int y,
                                int z,
                                int aboveThis)

    - #### getQuantaPercentage

          public final float getQuantaPercentage(IBlockAccess world,
                                  int x,
                                  int y,
                                  int z)

    - #### getFlowVector

          public Vec3 getFlowVector(IBlockAccess world,
                           int x,
                           int y,
                           int z)

    - #### getFluid

          public Fluid getFluid()

      Description copied from interface: `IFluidBlock`
      Returns the Fluid associated with this Block.
      Specified by:
        `getFluid` in interface `IFluidBlock`

    - #### getFilledPercentage

          public float getFilledPercentage(World world,
                                  int x,
                                  int y,
                                  int z)

      Description copied from interface: `IFluidBlock`
      Returns the amount of a single block is filled. Value between 0 and 1. 1 meaning the entire 1x1x1 cube is full, 0 meaning completely empty. If the return value is negative. It will be treated as filling the block from the top down instead of bottom up.
      Specified by:
        `getFilledPercentage` in interface `IFluidBlock`
      Returns: