net.minecraftforge.fluids

## Class BlockFluidClassic

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

- All Implemented Interfaces:
    IFluidBlock

      public class BlockFluidClassic
      extends BlockFluidBase

  This is a fluid block implementation which emulates vanilla Minecraft fluid behavior. It is highly recommended that you use/extend this class for "classic" fluid blocks.

- - ### 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 int[]` | `flowCost`
    `protected boolean[]` | `isOptimalFlowDirection`
    `protected FluidStack` | `stack`

    - ### Fields inherited from class net.minecraftforge.fluids.BlockFluidBase

      `defaultDisplacements, density, densityDir, displacements, fluidName, maxScaledLight, quantaPerBlock, quantaPerBlockFloat, renderPass, temperature, 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
    `BlockFluidClassic(Fluid fluid, Material material)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected int` | `calculateFlowCost(World world, int x, int y, int z, int recurseDepth, int side)`
    `boolean` | `canCollideCheck(int meta, boolean fullHit)`
    `boolean` | `canDrain(World world, int x, int y, int z)` Check to see if a block can be drained.
    `protected boolean` | `canFlowInto(IBlockAccess world, int x, int y, int z)`
    `FluidStack` | `drain(World world, int x, int y, int z, boolean doDrain)` Attempt to drain the block.
    `protected void` | `flowIntoBlock(World world, int x, int y, int z, int meta)`
    `protected int` | `getLargerQuanta(IBlockAccess world, int x, int y, int z, int compare)`
    `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
    `int` | `getMaxRenderHeightMeta()`
    `protected boolean[]` | `getOptimalFlowDirections(World world, int x, int y, int z)`
    `int` | `getQuantaValue(IBlockAccess world, int x, int y, int z)`
    `boolean` | `isFlowingVertically(IBlockAccess world, int x, int y, int z)`
    `boolean` | `isSourceBlock(IBlockAccess world, int x, int y, int z)`
    `BlockFluidClassic` | `setFluidStack(FluidStack stack)`
    `BlockFluidClassic` | `setFluidStackAmount(int amount)`
    `void` | `updateTick(World world, int x, int y, int z, java.util.Random rand)`

    - ### Methods inherited from class net.minecraftforge.fluids.BlockFluidBase

      `canDisplace, displaceIfPossible, func_149698_L, getBlocksMovement, getCollisionBoundingBoxFromPool, getDensity, getFilledPercentage, getFlowDirection, getFlowVector, getFluid, getItemDropped, getMixedBrightnessForBlock, getQuantaPercentage, getQuantaValueAbove, getQuantaValueBelow, getRenderBlockPass, getRenderType, getTemperature, isOpaqueCube, onBlockAdded, onNeighborBlockChange, quantityDropped, renderAsNormalBlock, setDensity, setMaxScaledLight, setQuantaPerBlock, setRenderPass, setTemperature, setTickRate, shouldSideBeRendered, tickRate, velocityToAddToEntity`

    - ### 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`

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

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

- - ### Field Detail

    - #### isOptimalFlowDirection

          protected boolean[] isOptimalFlowDirection

    - #### flowCost

          protected int[] flowCost

    - #### stack

          protected FluidStack stack

  - ### Constructor Detail

    - #### BlockFluidClassic

          public BlockFluidClassic(Fluid fluid,
                           Material material)

  - ### Method Detail

    - #### setFluidStack

          public BlockFluidClassic setFluidStack(FluidStack stack)

    - #### setFluidStackAmount

          public BlockFluidClassic setFluidStackAmount(int amount)

    - #### getQuantaValue

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

      Specified by:
        `getQuantaValue` in class `BlockFluidBase`

    - #### canCollideCheck

          public boolean canCollideCheck(int meta,
                                boolean fullHit)

      Specified by:
        `canCollideCheck` in class `BlockFluidBase`

    - #### getMaxRenderHeightMeta

          public int getMaxRenderHeightMeta()

      Specified by:
        `getMaxRenderHeightMeta` in class `BlockFluidBase`

    - #### 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 `BlockFluidBase`
      Parameters:
        `world` - The current world
        `x` - X Position
        `y` - Y position
        `z` - Z position
      Returns:
        The light value

    - #### updateTick

          public void updateTick(World world,
                        int x,
                        int y,
                        int z,
                        java.util.Random rand)

      Overrides:
        `updateTick` in class `Block`

    - #### isFlowingVertically

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

    - #### isSourceBlock

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

    - #### getOptimalFlowDirections

          protected boolean[] getOptimalFlowDirections(World world,
                                           int x,
                                           int y,
                                           int z)

    - #### calculateFlowCost

          protected int calculateFlowCost(World world,
                              int x,
                              int y,
                              int z,
                              int recurseDepth,
                              int side)

    - #### flowIntoBlock

          protected void flowIntoBlock(World world,
                           int x,
                           int y,
                           int z,
                           int meta)

    - #### canFlowInto

          protected boolean canFlowInto(IBlockAccess world,
                            int x,
                            int y,
                            int z)

    - #### getLargerQuanta

          protected int getLargerQuanta(IBlockAccess world,
                            int x,
                            int y,
                            int z,
                            int compare)

    - #### drain

          public FluidStack drain(World world,
                         int x,
                         int y,
                         int z,
                         boolean doDrain)

      Description copied from interface: `IFluidBlock`
      Attempt to drain the block. This method should be called by devices such as pumps. NOTE: The block is intended to handle its own state changes.
        `doDrain` - If false, the drain will only be simulated.
      Returns:

    - #### canDrain

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

      Description copied from interface: `IFluidBlock`
      Check to see if a block can be drained. This method should be called by devices such as pumps.
      Returns: