Class SilverfishBlock


public class SilverfishBlock extends BlockSilverfish
  • Field Details

    • referenceBlock

      public final Block referenceBlock
    • referenceBlockMetadata

      public final int referenceBlockMetadata
    • crackIcons

      @Environment(CLIENT) public Icon[] crackIcons
  • Constructor Details

    • SilverfishBlock

      public SilverfishBlock(int iBlockID, Block refBlock, int refBlockMetadata)
      Parameters:
      iBlockID -
      refBlock - Block
      refBlockMetadata - Block Metadata
  • Method Details

    • 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
    • createStackedBlock

      protected ItemStack createStackedBlock(int iMetadata)
      Description copied from class: BlockSilverfish
      Returns an item stack containing a single instance of the current block type. 'i' is the block's subtype/damage and is ignored for blocks which do not support subtypes. Blocks which cannot be harvested should return null.
      Overrides:
      createStackedBlock in class BlockSilverfish
    • dropBlockAsItemWithChance

      public void dropBlockAsItemWithChance(World world, int x, int y, int z, int iMetadata, float fChance, int iFortuneModifier)
      Description copied from class: Block
      Drops the block items with a specified chance of dropping the specified items
      Overrides:
      dropBlockAsItemWithChance in class Block
    • isBlockInfestedBy

      public boolean isBlockInfestedBy(EntityLiving entity)
      Description copied from class: Block
      If this block is infested by linked entity, used by silverfish
      Overrides:
      isBlockInfestedBy in class Block
    • registerIcons

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

      @Environment(CLIENT) public Icon getIcon(int iSide, int iMetadata)
      Description copied from class: BlockSilverfish
      From the specified side and block metadata retrieves the blocks texture. Args: side, metadata
      Overrides:
      getIcon in class BlockSilverfish
    • randomDisplayTick

      @Environment(CLIENT) public void randomDisplayTick(World world, int i, int j, int k, Random rand)
      Description copied from class: Block
      A randomly called display update to be able to add particles or other items for display
      Overrides:
      randomDisplayTick in class Block
    • getSubBlocks

      @Environment(CLIENT) public void getSubBlocks(int par1, CreativeTabs par2CreativeTabs, List par3List)
      Description copied from class: BlockSilverfish
      returns a list of blocks with the same ID, but different meta (eg: wood returns 4 blocks)
      Overrides:
      getSubBlocks in class BlockSilverfish
    • renderBlockSecondPass

      @Environment(CLIENT) public void renderBlockSecondPass(RenderBlocks renderBlocks, int i, int j, int k, boolean bFirstPassResult)
      Description copied from class: Block
      If the block has a second pass, like a kiln cooking overlay texture, it should Override this method. This method does not call the overlay by default to cut down on rendering time, since this function is called by every single loaded block. Note that this function is necessary to prevent potential recursion within RenderBlock, if it were to call its own overlays directly, and then potentially get called with a texture overlay itself through RenderBlockWithTexture.
      Overrides:
      renderBlockSecondPass in class Block