Class BlockFluid

java.lang.Object
net.minecraft.src.Block
net.minecraft.src.BlockFluid
Direct Known Subclasses:
BlockFlowing, BlockStationary

public abstract class BlockFluid extends Block
  • Field Details

    • isAnySideBeingRendered

      @Environment(CLIENT) public static boolean isAnySideBeingRendered
  • Constructor Details

    • BlockFluid

      protected BlockFluid(int par1, Material par2Material)
  • Method Details

    • getBlocksMovement

      public boolean getBlocksMovement(IBlockAccess par1IBlockAccess, int par2, int par3, int par4)
      Description copied from class: Block
      FCNOTE: This is misnamed and returns true if the block *doesn't* block movement
      Overrides:
      getBlocksMovement in class Block
    • getBlockColor

      public int getBlockColor()
      Overrides:
      getBlockColor in class Block
    • colorMultiplier

      public int colorMultiplier(IBlockAccess par1IBlockAccess, int par2, int par3, int par4)
      Returns a integer with hex for 0xrrggbb with this color multiplied against the blocks color. Note only called when first determining what to render.
      Overrides:
      colorMultiplier in class Block
    • getFluidHeightPercent

      public static float getFluidHeightPercent(int par0)
      Returns the percentage of the fluid block that is air, based on the given flow decay of the fluid.
    • getIcon

      public Icon getIcon(int par1, int par2)
      From the specified side and block metadata retrieves the blocks texture. Args: side, metadata
      Overrides:
      getIcon in class Block
    • getFlowDecay

      protected int getFlowDecay(World par1World, int par2, int par3, int par4)
      Returns the amount of fluid decay at the coordinates, or -1 if the block at the coordinates is not the same material as the fluid.
    • getEffectiveFlowDecay

      protected int getEffectiveFlowDecay(IBlockAccess par1IBlockAccess, int par2, int par3, int par4)
      Returns the flow decay but converts values indicating falling liquid (values >=8) to their effective source block value of zero.
    • renderAsNormalBlock

      public boolean renderAsNormalBlock()
      If this block doesn't render as an ordinary block it will return False (examples: signs, buttons, stairs, etc)
      Overrides:
      renderAsNormalBlock in class Block
    • isOpaqueCube

      public 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.
      Overrides:
      isOpaqueCube in class Block
    • canCollideCheck

      public boolean canCollideCheck(int par1, boolean par2)
      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
    • isBlockSolid

      public boolean isBlockSolid(IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5)
      Returns Returns true if the given side of this block type should be rendered (if it's solid or not), if the adjacent block is at the given coordinates. Args: blockAccess, x, y, z, side
      Overrides:
      isBlockSolid in class Block
    • getCollisionBoundingBoxFromPool

      public AxisAlignedBB getCollisionBoundingBoxFromPool(World par1World, int par2, int par3, int par4)
      // +++START EDIT+++ // ---END EDIT--- 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
    • getRenderType

      public int getRenderType()
      The type of render function that is called for this block
      Overrides:
      getRenderType in class Block
    • idDropped

      public int idDropped(int par1, Random par2Random, int par3)
      Returns the ID of the items to drop on destruction.
      Overrides:
      idDropped in class Block
    • quantityDropped

      public int quantityDropped(Random par1Random)
      Returns the quantity of items to drop on block destruction.
      Overrides:
      quantityDropped in class Block
    • velocityToAddToEntity

      public void velocityToAddToEntity(World par1World, int par2, int par3, int par4, Entity par5Entity, Vec3 par6Vec3)
      // +++START EDIT+++ // ---END EDIT--- 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
    • tickRate

      public int tickRate(World par1World)
      How many world ticks before ticking
      Overrides:
      tickRate in class Block
    • getMixedBrightnessForBlock

      public int getMixedBrightnessForBlock(IBlockAccess par1IBlockAccess, int par2, int par3, int par4)
      Goes straight to getLightBrightnessForSkyBlocks for Blocks, does some fancy computing for Fluids
      Overrides:
      getMixedBrightnessForBlock in class Block
    • getBlockBrightness

      public float getBlockBrightness(IBlockAccess par1IBlockAccess, int par2, int par3, int par4)
      How bright to render this block based on the light its receiving. Args: iBlockAccess, x, y, z
      Overrides:
      getBlockBrightness in class Block
    • getRenderBlockPass

      public int getRenderBlockPass()
      Returns which pass should this block be rendered on. 0 for solids and 1 for alpha
      Overrides:
      getRenderBlockPass in class Block
    • randomDisplayTick

      public void randomDisplayTick(World par1World, int par2, int par3, int par4, Random par5Random)
      A randomly called display update to be able to add particles or other items for display
      Overrides:
      randomDisplayTick in class Block
    • getFlowDirection

      public static double getFlowDirection(IBlockAccess par0IBlockAccess, int par1, int par2, int par3, Material par4Material)
      the sin and cos of this number determine the surface gradient of the flowing block.
    • onBlockAdded

      public void onBlockAdded(World par1World, int par2, int par3, int par4)
      Called whenever the block is added into the world. Args: world, x, y, z
      Overrides:
      onBlockAdded in class Block
    • onNeighborBlockChange

      public void onNeighborBlockChange(World par1World, int par2, int par3, int par4, int par5)
      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
    • triggerLavaMixEffects

      protected void triggerLavaMixEffects(World par1World, int par2, int par3, int par4)
      Creates fizzing sound and smoke. Used when lava flows over block or mixes with water.
    • registerIcons

      public void registerIcons(IconRegister par1IconRegister)
      When this method is called, your block should register all the icons it needs with the given IconRegister. This is the only chance you get to register icons.
      Overrides:
      registerIcons in class Block
    • getFluidIcon

      public static Icon getFluidIcon(String par0Str)
    • getCanBlockBeIncinerated

      public boolean getCanBlockBeIncinerated(World world, int i, int j, int k)
      Description copied from class: Block
      Used by Hibachi to determine if it can remove the block above it when lit
      Overrides:
      getCanBlockBeIncinerated in class Block
    • getStackRetrievedByBlockDispenser

      public ItemStack getStackRetrievedByBlockDispenser(World world, int i, int j, int k)
      Description copied from class: Block
      If the stack returned is null, the block will not be retrieved
      Overrides:
      getStackRetrievedByBlockDispenser in class Block
    • shouldSideBeRendered

      @Environment(CLIENT) public boolean shouldSideBeRendered(IBlockAccess blockAccess, int i, int j, int k, int iSide)
      Overrides:
      shouldSideBeRendered in class Block
    • renderBlock

      @Environment(CLIENT) public boolean renderBlock(RenderBlocks renderer, int i, int j, int k)
      Overrides:
      renderBlock in class Block