Class DetectorBlock

java.lang.Object
net.minecraft.src.Block
btw.block.blocks.DetectorBlock

public class DetectorBlock extends Block
  • Constructor Details

    • DetectorBlock

      public DetectorBlock(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
    • onNeighborBlockChange

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

      public int isProvidingWeakPower(IBlockAccess iblockaccess, int i, int j, int k, int l)
      Description copied from class: Block
      Returns true if the block is emitting indirect/weak redstone power on the specified side. If isBlockNormalCube returns true, standard redstone propagation rules will apply instead and this will not be called. Args: World, X, Y, Z, side. Note that the side is reversed - eg it is 1 (up) when checking the bottom of the block.
      Overrides:
      isProvidingWeakPower in class Block
    • isProvidingStrongPower

      public int isProvidingStrongPower(IBlockAccess blockAccess, int i, int j, int k, int iFacing)
      Description copied from class: Block
      Returns true if the block is emitting direct/strong redstone power on the specified side. Args: World, X, Y, Z, side. Note that the side is reversed - eg it is 1 (up) when checking the bottom of the block.
      Overrides:
      isProvidingStrongPower in class Block
    • canProvidePower

      public boolean canProvidePower()
      Description copied from class: Block
      Can this block provide power. Only wire currently seems to have this change based on its state.
      Overrides:
      canProvidePower in class Block
    • onArrowCollide

      public void onArrowCollide(World world, int i, int j, int k, EntityArrow arrow)
      Overrides:
      onArrowCollide 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
    • 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
    • isBlockOn

      public boolean isBlockOn(IBlockAccess blockAccess, int i, int j, int k)
    • isBlockOnFromMetadata

      public boolean isBlockOnFromMetadata(int iMetadata)
    • setBlockOn

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

      public boolean placeDetectorLogicIfNecessary(World world, int i, int j, int k)
    • checkForDetection

      public boolean checkForDetection(World world, int i, int j, int k)
    • 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
    • hasComparatorInputOverride

      public boolean hasComparatorInputOverride(World world, int x, int y, int z, int direction)
      Overrides:
      hasComparatorInputOverride in class Block
    • getComparatorInputOverride

      public int getComparatorInputOverride(World world, int x, int y, int z, int direction)
      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
    • 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 meta)
      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 access, int i, int j, int k, 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
    • renderBlock

      @Environment(CLIENT) public boolean renderBlock(RenderBlocks renderer, int i, int j, int k)
      Overrides:
      renderBlock 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