Class SawBlock

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

public class SawBlock extends Block implements MechanicalBlock
  • Field Details

  • Constructor Details

    • SawBlock

      public SawBlock(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
    • onBlockPlaced

      public int onBlockPlaced(World world, int i, int j, int k, int iFacing, float fClickX, float fClickY, float fClickZ, int iMetadata)
      Description copied from class: Block
      Called when a block is placed using its ItemBlock. Args: World, X, Y, Z, side, hitX, hitY, hitZ, block metadata
      Overrides:
      onBlockPlaced in class Block
    • onBlockPlacedBy

      public void onBlockPlacedBy(World world, int i, int j, int k, EntityLivingBase entityLiving, ItemStack stack)
      Description copied from class: Block
      Called when the block is placed in the world. // +++START EDIT+++ FCNOTE: Called AFTER the block is placed, unlike onBlockPlaced() // ---END EDIT---
      Overrides:
      onBlockPlacedBy in class Block
    • onBlockAdded

      public void onBlockAdded(World world, int i, int j, int k)
      Description copied from class: Block
      Called whenever the block is added into the world. Args: world, x, y, z // +++START EDIT+++ FCNOTE: Called on server only // ---END EDIT---
      Overrides:
      onBlockAdded 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
    • getCollisionBoundingBoxFromPool

      public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int i, int j, int k)
      Overrides:
      getCollisionBoundingBoxFromPool in class Block
    • getBlockBoundsFromPoolBasedOnState

      public AxisAlignedBB getBlockBoundsFromPoolBasedOnState(IBlockAccess blockAccess, int i, int j, int k)
      Overrides:
      getBlockBoundsFromPoolBasedOnState 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
    • updateTick

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

      public boolean hasCenterHardPointToFacing(IBlockAccess blockAccess, int i, int j, int k, int iFacing, boolean bIgnoreTransparency)
      Description copied from class: Block
      medium sized attachment points like the top of fence posts (approx 1/4 block width)
      Overrides:
      hasCenterHardPointToFacing in class Block
    • hasLargeCenterHardPointToFacing

      public boolean hasLargeCenterHardPointToFacing(IBlockAccess blockAccess, int i, int j, int k, int iFacing, boolean bIgnoreTransparency)
      Description copied from class: Block
      large attachment points that can support a full block width
      Overrides:
      hasLargeCenterHardPointToFacing 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
    • getFacing

      public int getFacing(int iMetadata)
      Overrides:
      getFacing in class Block
    • setFacing

      public int setFacing(int iMetadata, int iFacing)
      Overrides:
      setFacing in class Block
    • canRotateOnTurntable

      public boolean canRotateOnTurntable(IBlockAccess iBlockAccess, int i, int j, int k)
      Overrides:
      canRotateOnTurntable in class Block
    • canTransmitRotationVerticallyOnTurntable

      public boolean canTransmitRotationVerticallyOnTurntable(IBlockAccess blockAccess, int i, int j, int k)
      Overrides:
      canTransmitRotationVerticallyOnTurntable in class Block
    • rotateAroundJAxis

      public boolean rotateAroundJAxis(World world, int i, int j, int k, boolean bReverse)
      Description copied from class: Block
      Returns true if the facing has actually changed as a result of this call
      Overrides:
      rotateAroundJAxis in class Block
    • toggleFacing

      public boolean toggleFacing(World world, int i, int j, int k, boolean bReverse)
      Description copied from class: Block
      Cycle through all the possible facings for a block returns true if the facing has actually changed as a result of this call
      Overrides:
      toggleFacing in class Block
    • isIncineratedInCrucible

      public boolean isIncineratedInCrucible()
      Overrides:
      isIncineratedInCrucible in class Block
    • isCurrentPowerStateValid

      protected boolean isCurrentPowerStateValid(World world, int i, int j, int k)
    • 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)
    • scheduleUpdateIfRequired

      protected void scheduleUpdateIfRequired(World world, int i, int j, int k)
    • getBlockBoundsFromPoolForBaseHeight

      public AxisAlignedBB getBlockBoundsFromPoolForBaseHeight(IBlockAccess blockAccess, int i, int j, int k, float fBaseHeight)
    • sawBlockToFront

      protected void sawBlockToFront(World world, int i, int j, int k, Random random)
    • breakSaw

      public void breakSaw(World world, int i, int j, int k)
    • 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
    • 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 side, int metadata)
      Description copied from class: Block
      From the specified side and block metadata retrieves the blocks texture. Args: side, metadata
      Overrides:
      getIcon in class Block
    • getBlockTexture

      @Environment(CLIENT) public Icon getBlockTexture(IBlockAccess blockAccess, int x, int y, int z, int side)
      Description copied from class: Block
      Retrieves the block texture to use based on the display side. Args: iBlockAccess, x, y, z, side
      Overrides:
      getBlockTexture in class Block
    • randomDisplayTick

      @Environment(CLIENT) public void randomDisplayTick(World world, int i, int j, int k, Random random)
      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
    • 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 x, int y, int z)
      Overrides:
      renderBlock in class Block
    • renderBlade

      @Environment(CLIENT) protected boolean renderBlade(RenderBlocks renderer, int x, int y, int z)
    • renderBlockAsItem

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