Class HopperBlock

All Implemented Interfaces:
MechanicalBlock, ITileEntityProvider

public class HopperBlock extends BlockContainer implements MechanicalBlock
  • Field Details

  • Constructor Details

    • HopperBlock

      public HopperBlock(int iBlockID)
  • Method Details

    • tickRate

      public int tickRate(World world)
      Description copied from class: Block
      How many world ticks before ticking
      Overrides:
      tickRate in class Block
    • onBlockAdded

      public void onBlockAdded(World world, int i, int j, int k)
      Description copied from class: BlockContainer
      Called whenever the block is added into the world. Args: world, x, y, z
      Overrides:
      onBlockAdded in class BlockContainer
    • isOpaqueCube

      public boolean isOpaqueCube()
      Description copied from class: Block
      // +++START EDIT+++ // ---END EDIT--- 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
    • renderAsNormalBlock

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

      public void onNeighborBlockChange(World world, int i, int j, int k, int iBlockID)
      Description copied from class: Block
      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 // +++START EDIT+++ FCNOTE: Only called on server // ---END EDIT---
      Overrides:
      onNeighborBlockChange in class Block
    • onBlockActivated

      public boolean onBlockActivated(World world, int i, int j, int k, EntityPlayer player, int iFacing, float fXClick, float fYClick, float fZClick)
      Description copied from class: Block
      Called upon block activation (right click on the block.)
      Overrides:
      onBlockActivated in class Block
    • createNewTileEntity

      public TileEntity createNewTileEntity(World world)
      Description copied from interface: ITileEntityProvider
      Returns a new instance of a block's tile entity class. Called on placing the block.
      Specified by:
      createNewTileEntity in interface ITileEntityProvider
    • updateTick

      public void updateTick(World world, int i, int j, int k, Random random)
      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
    • breakBlock

      public void breakBlock(World world, int i, int j, int k, int iBlockID, int iMetadata)
      Description copied from class: BlockContainer
      Called on server worlds only when the block has been replaced by a different block ID, or the same block with a different metadata value, but before the new metadata value is set. Args: World, x, y, z, old block ID, old metadata
      Overrides:
      breakBlock in class BlockContainer
    • onEntityCollidedWithBlock

      public void onEntityCollidedWithBlock(World world, int i, int j, int k, Entity entity)
      Description copied from class: Block
      Triggered whenever an entity collides with this block (enters into the block). Args: world, x, y, z, entity
      Overrides:
      onEntityCollidedWithBlock in class Block
    • collisionRayTrace

      public MovingObjectPosition collisionRayTrace(World world, int i, int j, int k, Vec3 startRay, Vec3 endRay)
      Overrides:
      collisionRayTrace in class Block
    • onArrowCollide

      public void onArrowCollide(World world, int i, int j, int k, EntityArrow arrow)
      Overrides:
      onArrowCollide in class Block
    • getHarvestToolLevel

      public int getHarvestToolLevel(IBlockAccess blockAccess, int i, int j, int k)
      Overrides:
      getHarvestToolLevel in class Block
    • dropComponentItemsOnBadBreak

      public boolean dropComponentItemsOnBadBreak(World world, int i, int j, int k, int iMetadata, float fChanceOfDrop)
      Description copied from class: Block
      Called by explosions and improper tool use. Should return true if the block processes its own drops through this method, false otherwise Note that the block may no longer be at the specified position when this is called
      Overrides:
      dropComponentItemsOnBadBreak in class Block
    • hasComparatorInputOverride

      public boolean hasComparatorInputOverride()
      Description copied from class: Block
      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)
      Description copied from class: Block
      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
    • canOutputMechanicalPower

      public boolean canOutputMechanicalPower()
      Specified by:
      canOutputMechanicalPower in interface MechanicalBlock
    • canInputMechanicalPower

      public boolean canInputMechanicalPower()
      Specified by:
      canInputMechanicalPower in interface MechanicalBlock
    • isInputtingMechanicalPower

      public boolean isInputtingMechanicalPower(World world, int i, int j, int k)
      Specified by:
      isInputtingMechanicalPower in interface MechanicalBlock
    • canInputAxlePowerToFacing

      public boolean canInputAxlePowerToFacing(World world, int i, int j, int k, int iFacing)
      Specified by:
      canInputAxlePowerToFacing in interface MechanicalBlock
    • isOutputtingMechanicalPower

      public boolean isOutputtingMechanicalPower(World world, int i, int j, int k)
      Specified by:
      isOutputtingMechanicalPower in interface MechanicalBlock
    • overpower

      public void overpower(World world, int i, int j, int k)
      Specified by:
      overpower in interface MechanicalBlock
    • isBlockOn

      public boolean isBlockOn(IBlockAccess iBlockAccess, int i, int j, int k)
    • setBlockOn

      public void setBlockOn(World world, int i, int j, int k, boolean bOn)
    • hasFilter

      public boolean hasFilter(IBlockAccess iBlockAccess, int i, int j, int k)
    • setHasFilter

      public void setHasFilter(World world, int i, int j, int k, boolean bOn)
    • breakHopper

      public void breakHopper(World world, int i, int j, int k)
    • 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
    • getIcon

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

      @Environment(CLIENT) public AxisAlignedBB getSelectedBoundingBoxFromPool(World world, int i, int j, int k)
      Overrides:
      getSelectedBoundingBoxFromPool in class Block
    • shouldSideBeRendered

      @Environment(CLIENT) public boolean shouldSideBeRendered(IBlockAccess blockAccess, int iNeighborI, int iNeighborJ, int iNeighborK, 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
    • renderBlockAsItem

      @Environment(CLIENT) public void renderBlockAsItem(RenderBlocks renderBlocks, int iItemDamage, float fBrightness)
      Overrides:
      renderBlockAsItem in class Block