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.
  Author:
    King Lemming, OvermindDL1

- - ### Field Summary

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

      `anvil, beacon, bed, bedrock, blockClay, blockDiamond, blockEmerald, blockGold, blockHardness, blockID, blockIron, blockLapis, blockMaterial, blockNetherQuartz, blockParticleGravity, blockRedstone, blockResistance, blocksList, blockSnow, bookShelf, brewingStand, brick, cactus, cake, canBlockGrass, carpet, carrot, cauldron, chest, chestTrapped, cloth, coalBlock, cobblestone, cobblestoneMossy, cobblestoneWall, cocoaPlant, commandBlock, crops, daylightSensor, deadBush, dirt, dispenser, doorIron, doorWood, dragonEgg, dropper, enchantmentTable, enderChest, endPortal, endPortalFrame, fence, fenceGate, fenceIron, fire, flowerPot, furnaceBurning, furnaceIdle, glass, glowStone, grass, gravel, hardenedClay, hay, hopperBlock, ice, jukebox, ladder, lavaMoving, lavaStill, leaves, lever, lightOpacity, lightValue, lockedChest, melon, melonStem, mobSpawner, mushroomBrown, mushroomCapBrown, mushroomCapRed, mushroomRed, music, mycelium, netherBrick, netherFence, netherrack, netherStalk, obsidian, opaqueCubeLookup, oreCoal, oreDiamond, oreEmerald, oreGold, oreIron, oreLapis, oreNetherQuartz, oreRedstone, oreRedstoneGlowing, pistonBase, pistonExtension, pistonMoving, pistonStickyBase, planks, plantRed, plantYellow, portal, potato, pressurePlateGold, pressurePlateIron, pressurePlatePlanks, pressurePlateStone, pumpkin, pumpkinLantern, pumpkinStem, rail, railActivator, railDetector, railPowered, redstoneComparatorActive, redstoneComparatorIdle, redstoneLampActive, redstoneLampIdle, redstoneRepeaterActive, redstoneRepeaterIdle, redstoneWire, reed, sand, sandStone, sapling, signPost, signWall, silverfish, skull, slipperiness, slowSand, snow, soundAnvilFootstep, soundClothFootstep, soundGlassFootstep, soundGrassFootstep, soundGravelFootstep, soundLadderFootstep, soundMetalFootstep, soundPowderFootstep, soundSandFootstep, soundSnowFootstep, soundStoneFootstep, soundWoodFootstep, sponge, stainedClay, stairsBrick, stairsCobblestone, stairsNetherBrick, stairsNetherQuartz, stairsSandStone, stairsStoneBrick, stairsWoodBirch, stairsWoodJungle, stairsWoodOak, stairsWoodSpruce, stepSound, stone, stoneBrick, stoneButton, stoneDoubleSlab, stoneSingleSlab, tallGrass, thinGlass, tilledField, tnt, torchRedstoneActive, torchRedstoneIdle, torchWood, trapdoor, tripWire, tripWireSource, useNeighborBrightness, vine, waterlily, waterMoving, waterStill, web, whiteStone, wood, woodDoubleSlab, woodenButton, woodSingleSlab, workbench`

  - ### Constructor Summary

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

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `abstract boolean` | `canCollideCheck(int meta, boolean fullHit)` Returns whether this block is collideable based on the arguments passed in \n@param par1 block metaData \n@param par2 whether the player right-clicked while holding a boat
    `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_82506_l()`
    `float` | `getBlockBrightness(IBlockAccess world, int x, int y, int z)`
    `boolean` | `getBlocksMovement(IBlockAccess world, int x, int y, int z)`
    `AxisAlignedBB` | `getCollisionBoundingBoxFromPool(World world, int x, int y, int z)` Returns a bounding box from the pool of bounding boxes (this means this box can change after the pool has been cleared to be reused)
    `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.
    `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()` The type of render function that is called for this block
    `static int` | `getTemperature(IBlockAccess world, int x, int y, int z)`
    `int` | `idDropped(int par1, Random par2Random, int par3)` Returns the ID of the items to drop on destruction.
    `boolean` | `isOpaqueCube()` Is this block (a) opaque and (b) a full 1m cube? This determines whether or not to render the shared face of two adjacent blocks and also whether the player can attach torches, redstone wire, etc to this block.
    `void` | `onBlockAdded(World world, int x, int y, int z)` Called whenever the block is added into the world.
    `void` | `onNeighborBlockChange(World world, int x, int y, int z, int blockId)` Lets the block know when one of its neighbor changes.
    `int` | `quantityDropped(Random par1Random)` Returns the quantity of items to drop on block destruction.
    `boolean` | `renderAsNormalBlock()` If this block doesn't render as an ordinary block it will return False (examples: signs, buttons, stairs, etc)
    `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)` How many world ticks before ticking
    `void` | `velocityToAddToEntity(World world, int x, int y, int z, Entity entity, Vec3 vec)` Can add to the passed in vector for a movement vector to be applied to the entity.

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

      `addBlockDestroyEffects, addBlockHitEffects, addCollisionBoxesToList, addCreativeItems, beginLeavesDecay, breakBlock, canBeReplacedByLeaves, canBlockStay, canConnectRedstone, canCreatureSpawn, canDragonDestroy, canDropFromExplosion, canEntityDestroy, canHarvestBlock, canPlaceBlockAt, canPlaceBlockOnSide, canPlaceBlockOnSide, canPlaceTorchOnTop, canProvidePower, canRenderInPass, canSilkHarvest, canSustainLeaves, canSustainPlant, collisionRayTrace, colorMultiplier, createTileEntity, damageDropped, dropBlockAsItem, dropBlockAsItemWithChance, fillWithRain, getAmbientOcclusionLightValue, getBedDirection, getBedSpawnPosition, getBlockBoundsMaxX, getBlockBoundsMaxY, getBlockBoundsMaxZ, getBlockBoundsMinX, getBlockBoundsMinY, getBlockBoundsMinZ, getBlockColor, getBlockDropped, getBlockHardness, getBlockTexture, getBlockTextureFromSide, getComparatorInputOverride, getCreativeTabToDisplayOn, getDamageValue, getEnableStats, getEnchantPowerBonus, getExplosionResistance, getExplosionResistance, getFireSpreadSpeed, getFlammability, getIcon, getItemIconName, getLightOpacity, getLocalizedName, getMobilityFlag, getPickBlock, getPlayerRelativeBlockHardness, getRenderColor, getSelectedBoundingBoxFromPool, getSubBlocks, getTickRandomly, getUnlocalizedName, getValidRotations, harvestBlock, hasComparatorInputOverride, hasTileEntity, hasTileEntity, idPicked, isAirBlock, isAssociatedBlockID, isAssociatedBlockID, isBeaconBase, isBed, isBedFoot, isBlockBurning, isBlockFoliage, isBlockNormalCube, isBlockReplaceable, isBlockSolid, isBlockSolidOnSide, isCollidable, isFertile, isFireSource, isFlammable, isFlowerPot, isGenMineableReplaceable, isLadder, isLeaves, isNormalCube, isProvidingStrongPower, isProvidingWeakPower, isWood, onBlockActivated, onBlockClicked, onBlockDestroyedByExplosion, onBlockDestroyedByPlayer, onBlockEventReceived, onBlockExploded, onBlockHarvested, onBlockPlaced, onBlockPlacedBy, onBlockPreDestroy, onEntityCollidedWithBlock, onEntityWalking, onFallenUpon, onNeighborTileChange, onPlantGrow, onPostBlockPlaced, quantityDropped, quantityDroppedWithBonus, randomDisplayTick, recolourBlock, registerIcons, removeBlockByPlayer, rotateBlock, setBedOccupied, setBlockBounds, setBlockBoundsBasedOnState, setBlockBoundsForItemRender, setBlockUnbreakable, setBurnProperties, setCreativeTab, setHardness, setLightOpacity, setLightValue, setResistance, setStepSound, setTextureName, setTickRandomly, setUnlocalizedName, updateTick, weakTileChanges`

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

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

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

      `canDrain, drain`

- - ### Constructor Detail

    - #### BlockFluidBase

          public BlockFluidBase(int id,
                        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)

      Description copied from class: `Block`
      Returns whether this block is collideable based on the arguments passed in \n@param par1 block metaData \n@param par2 whether the player right-clicked while holding a boat
      Overrides:
        `canCollideCheck` in class `Block`

    - #### getMaxRenderHeightMeta

          public abstract int getMaxRenderHeightMeta()

    - #### onBlockAdded

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

      Description copied from class: `Block`
      Called whenever the block is added into the world. Args: world, x, y, z
      Overrides:
        `onBlockAdded` in class `Block`

    - #### onNeighborBlockChange

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

      Description copied from class: `Block`
      Lets the block know when one of its neighbor changes. Doesn't know which neighbor changed (coordinates passed are their own) Args: x, y, z, neighbor blockID
      Overrides:
        `onNeighborBlockChange` in class `Block`

    - #### func_82506_l

          public boolean func_82506_l()

      Overrides:
        `func_82506_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)

      Description copied from class: `Block`
      Returns a bounding box from the pool of bounding boxes (this means this box can change after the pool has been cleared to be reused)
      Overrides:
        `getCollisionBoundingBoxFromPool` in class `Block`

    - #### idDropped

          public int idDropped(int par1,
                      Random par2Random,
                      int par3)

      Description copied from class: `Block`
      Returns the ID of the items to drop on destruction.
      Overrides:
        `idDropped` in class `Block`

    - #### quantityDropped

          public int quantityDropped(Random par1Random)

      Description copied from class: `Block`
      Returns the quantity of items to drop on block destruction.
      Overrides:
        `quantityDropped` in class `Block`

    - #### tickRate

          public int tickRate(World world)

      Description copied from class: `Block`
      How many world ticks before ticking
      Overrides:
        `tickRate` in class `Block`

    - #### velocityToAddToEntity

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

      Description copied from class: `Block`
      Can add to the passed in vector for a movement vector to be applied to the entity. Args: x, y, z, entity, vec3d
      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()

      Description copied from class: `Block`
      The type of render function that is called for this block
      Overrides:
        `getRenderType` in class `Block`

    - #### isOpaqueCube

          public boolean isOpaqueCube()

      Description copied from class: `Block`
      Is this block (a) opaque and (b) a full 1m cube? This determines whether or not to render the shared face of two adjacent blocks and also whether the player can attach torches, redstone wire, etc to this block.
      Overrides:
        `isOpaqueCube` in class `Block`

    - #### renderAsNormalBlock

          public boolean renderAsNormalBlock()

      Description copied from class: `Block`
      If this block doesn't render as an ordinary block it will return False (examples: signs, buttons, stairs, etc)
      Overrides:
        `renderAsNormalBlock` in class `Block`

    - #### getBlockBrightness

          public float getBlockBrightness(IBlockAccess world,
                                 int x,
                                 int y,
                                 int z)

      Overrides:
        `getBlockBrightness` 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`
      Overrides:
        `getFilledPercentage` in class `Block`
      Returns: