Class BlockSilverfish

java.lang.Object
net.minecraft.src.Block
net.minecraft.src.BlockSilverfish
Direct Known Subclasses:
LegacySilverfishBlock, SilverfishBlock

public class BlockSilverfish extends Block
  • Field Details

    • silverfishStoneTypes

      public static final String[] silverfishStoneTypes
      Block names that can be a silverfish stone.
  • Constructor Details

    • BlockSilverfish

      public BlockSilverfish(int par1)
  • Method Details

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

      public void onBlockDestroyedByPlayer(World par1World, int par2, int par3, int par4, int par5)
      Called right before the block is destroyed by a player. Args: world, x, y, z, metaData
      Overrides:
      onBlockDestroyedByPlayer in class Block
    • quantityDropped

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

      public static boolean getPosingIdByMetadata(int par0)
      Gets the blockID of the block this block is pretending to be according to this block's metadata.
    • getMetadataForBlockType

      public static int getMetadataForBlockType(int par0)
      Returns the metadata to use when a Silverfish hides in the block. Sets the block to BlockSilverfish with this metadata. It changes the displayed texture client side to look like a normal block.
    • createStackedBlock

      protected ItemStack createStackedBlock(int par1)
      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 Block
    • getDamageValue

      public int getDamageValue(World par1World, int par2, int par3, int par4)
      Get the block's damage value (for use with pick block).
      Overrides:
      getDamageValue in class Block
    • getSubBlocks

      public void getSubBlocks(int par1, CreativeTabs par2CreativeTabs, List par3List)
      returns a list of blocks with the same ID, but different meta (eg: wood returns 4 blocks)
      Overrides:
      getSubBlocks in class Block