Class BlockFire

java.lang.Object
net.minecraft.src.Block
net.minecraft.src.BlockFire
Direct Known Subclasses:
StokedFireBlock

public class BlockFire extends Block
  • Field Details

    • chanceToEncourageFire

      public static int[] chanceToEncourageFire
      The chance this block will encourage nearby blocks to catch on fire
    • abilityToCatchFire

      public static int[] abilityToCatchFire
      This is an array indexed by block ID the larger the number in the array the more likely a block type will catch fires
  • Constructor Details

    • BlockFire

      protected BlockFire(int par1)
  • Method Details

    • getCollisionBoundingBoxFromPool

      public AxisAlignedBB getCollisionBoundingBoxFromPool(World par1World, int par2, int par3, int par4)
      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
    • 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
    • quantityDropped

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

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

      public boolean func_82506_l()
      Overrides:
      func_82506_l in class Block
    • canNeighborBurn

      protected boolean canNeighborBurn(World par1World, int par2, int par3, int par4)
      Returns true if at least one block next to this one can burn.
    • isCollidable

      public boolean isCollidable()
      // +++START EDIT+++

      // ---END EDIT--- Returns if this block is collidable (only used by Fire). Args: x, y, z

      Overrides:
      isCollidable in class Block
    • canPlaceBlockAt

      public boolean canPlaceBlockAt(World par1World, int par2, int par3, int par4)
      // +++START EDIT+++ // ---END EDIT--- Checks to see if its valid to put this block at the specified coordinates. Args: world, x, y, z
      Overrides:
      canPlaceBlockAt 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
    • 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
    • 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
    • updateTick

      public void updateTick(World world, int x, int y, int z, Random rand)
      Description copied from class: Block
      Ticks the block if it's been scheduled // +++START EDIT+++ FCNOTE: Called on server only // ---END EDIT---
      Overrides:
      updateTick in class Block
    • canBlockCatchFire

      public boolean canBlockCatchFire(IBlockAccess blockAccess, int x, int y, int z)
    • getDoesFireDamageToEntities

      public boolean getDoesFireDamageToEntities(World world, int x, int y, int z)
      Overrides:
      getDoesFireDamageToEntities in class Block
    • getCanBlockLightItemOnFire

      public boolean getCanBlockLightItemOnFire(IBlockAccess blockAccess, int x, int y, int z)
      Overrides:
      getCanBlockLightItemOnFire in class Block
    • getStackRetrievedByBlockDispenser

      public ItemStack getStackRetrievedByBlockDispenser(World world, int x, int y, int z)
      Description copied from class: Block
      If the stack returned is null, the block will not be retrieved
      Overrides:
      getStackRetrievedByBlockDispenser in class Block
    • hasInfiniteBurnNeighbor

      public boolean hasInfiniteBurnNeighbor(World world, int x, int y, int z)
    • doesBlockBelowExtinguishFire

      public boolean doesBlockBelowExtinguishFire(World world, int x, int y, int z)
    • tryToDestroyBlockWithFire

      public void tryToDestroyBlockWithFire(World world, int x, int y, int z, int chanceToDestroy, Random random, int sourceMetadata)
    • onBlockDestroyedByFire

      protected static void onBlockDestroyedByFire(World world, int x, int y, int z, int fireAge, boolean forcedFireSpread)
    • checkForFireSpreadFromLocation

      public static void checkForFireSpreadFromLocation(World world, int x, int y, int z, Random rand, int sourceFireAge)
    • checkForSmoulderingSpreadFromLocation

      public static void checkForSmoulderingSpreadFromLocation(World world, int x, int y, int z)
      Returns true if there's any flammable material within range
    • hasFlammableNeighborsWithinSmoulderRange

      public static boolean hasFlammableNeighborsWithinSmoulderRange(World world, int x, int y, int z)
    • isFlammableOrHasFlammableNeighbors

      public static boolean isFlammableOrHasFlammableNeighbors(World world, int x, int y, int z)
    • checkForFireSpreadAndDestructionToOneBlockLocation

      public static void checkForFireSpreadAndDestructionToOneBlockLocation(World world, int x, int y, int z)
    • checkForFireSpreadAndDestructionToOneBlockLocation

      public static void checkForFireSpreadAndDestructionToOneBlockLocation(World world, int x, int y, int z, Random rand, int sourceFireAge, int spreadTopBound)
    • getChanceOfNeighborsEncouragingFireCustom

      protected static int getChanceOfNeighborsEncouragingFireCustom(World world, int x, int y, int z)
    • getChanceToEncourageFire

      public static int getChanceToEncourageFire(World world, int x, int y, int z, int prevChance)
    • canBlockBeDestroyedByFire

      public static boolean canBlockBeDestroyedByFire(int blockID)
    • canFireReplaceBlock

      public static boolean canFireReplaceBlock(World world, int x, int y, int z)
    • registerIcons

      @Environment(CLIENT) public void registerIcons(IconRegister register)
      Description copied from class: Block
      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
    • getFireIcon

      public Icon getFireIcon(int par1)
    • getIcon

      @Environment(CLIENT) public Icon getIcon(int par1, int par2)
      Description copied from class: Block
      From the specified side and block metadata retrieves the blocks texture. Args: side, metadata
      Overrides:
      getIcon in class Block
    • renderBlock

      @Environment(CLIENT) public boolean renderBlock(RenderBlocks renderer, int x, int y, int z)
      Overrides:
      renderBlock in class Block
    • renderAsNormalBlock

      @Environment(CLIENT) 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
    • getRenderType

      @Environment(CLIENT) public int getRenderType()
      Description copied from class: Block
      The type of render function that is called for this block
      Overrides:
      getRenderType in class Block
    • shouldFirePreferToDisplayUpwards

      @Environment(CLIENT) public boolean shouldFirePreferToDisplayUpwards(IBlockAccess blockAccess, int i, int j, int k)
    • isBlockInfiniteBurnToTopForRender

      @Environment(CLIENT) public boolean isBlockInfiniteBurnToTopForRender(IBlockAccess blockAccess, int i, int j, int k)