Class BlockCommandBlock

All Implemented Interfaces:
ITileEntityProvider

public class BlockCommandBlock extends BlockContainer
  • Constructor Details

    • BlockCommandBlock

      public BlockCommandBlock(int par1)
  • Method Details

    • createNewTileEntity

      public TileEntity createNewTileEntity(World par1World)
      Returns a new instance of a block's tile entity class. Called on placing the 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
    • updateTick

      public void updateTick(World par1World, int par2, int par3, int par4, Random par5Random)
      Ticks the block if it's been scheduled
      Overrides:
      updateTick in class Block
    • tickRate

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

      public boolean onBlockActivated(World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9)
      Called upon block activation (right click on the block.)
      Overrides:
      onBlockActivated in class Block
    • hasComparatorInputOverride

      public boolean hasComparatorInputOverride()
      If this returns true, then comparators facing away from this block will use the value from getComparatorInputOverride instead of the actual redstone signal strength.
      Overrides:
      hasComparatorInputOverride in class Block
    • getComparatorInputOverride

      public int getComparatorInputOverride(World par1World, int par2, int par3, int par4, int par5)
      If hasComparatorInputOverride returns true, the return value from this is used instead of the redstone signal strength when this block inputs to a comparator.
      Overrides:
      getComparatorInputOverride in class Block
    • onBlockPlacedBy

      public void onBlockPlacedBy(World par1World, int par2, int par3, int par4, EntityLivingBase par5EntityLivingBase, ItemStack par6ItemStack)
      Called when the block is placed in the world.
      Overrides:
      onBlockPlacedBy in class Block
    • quantityDropped

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