Class HandCrankBlock

java.lang.Object
net.minecraft.src.Block
btw.block.blocks.HandCrankBlock
All Implemented Interfaces:
MechanicalBlock

public class HandCrankBlock extends Block implements MechanicalBlock
  • Constructor Details

    • HandCrankBlock

      public HandCrankBlock(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
    • getCollisionBoundingBoxFromPool

      public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int i, int j, int k)
      Overrides:
      getCollisionBoundingBoxFromPool in class Block
    • 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
    • canPlaceBlockAt

      public boolean canPlaceBlockAt(World world, int i, int j, int k)
      Description copied from class: Block
      Checks to see if its valid to put this block at the specified coordinates. Args: world, x, y, z
      Overrides:
      canPlaceBlockAt 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
    • 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
    • randomUpdateTick

      public void randomUpdateTick(World world, int i, int j, int k, Random rand)
      Description copied from class: Block
      Called on server only
      Overrides:
      randomUpdateTick 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
    • collisionRayTrace

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

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

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

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

      public boolean isInputtingMechanicalPower(World world, int i, int j, int k)
      Specified by:
      isInputtingMechanicalPower 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
    • canRestAtPosition

      public boolean canRestAtPosition(World world, int i, int j, int k)
    • checkForOverpower

      public boolean checkForOverpower(World world, int i, int j, int k)
    • breakCrankWithDrop

      public void breakCrankWithDrop(World world, int i, int j, int k)
    • getBaseBoundsFromPool

      protected AxisAlignedBB getBaseBoundsFromPool()
    • getShaftSelectionBoundsFromPool

      protected AxisAlignedBB getShaftSelectionBoundsFromPool()
    • 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
    • shouldSideBeRendered

      @Environment(CLIENT) public boolean shouldSideBeRendered(IBlockAccess blockAccess, int i, int j, int k, int iSide)
      Overrides:
      shouldSideBeRendered in class Block
    • renderBlock

      @Environment(CLIENT) public boolean renderBlock(RenderBlocks renderBlocks, 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
    • getSelectedBoundingBoxFromPool

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