Class BlockRedstoneWire

java.lang.Object
net.minecraft.src.Block
net.minecraft.src.BlockRedstoneWire

public class BlockRedstoneWire extends Block
  • Constructor Details

    • BlockRedstoneWire

      public BlockRedstoneWire(int par1)
  • Method Details

    • getCollisionBoundingBoxFromPool

      public AxisAlignedBB getCollisionBoundingBoxFromPool(World par1World, int par2, int par3, int par4)
      Returns a bounding box from the pool of bounding boxes (this means this box can change after the pool has been cleared to be reused)
      Overrides:
      getCollisionBoundingBoxFromPool in class Block
    • isOpaqueCube

      public boolean isOpaqueCube()
      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()
      If this block doesn't render as an ordinary block it will return False (examples: signs, buttons, stairs, etc)
      Overrides:
      renderAsNormalBlock in class Block
    • getRenderType

      public int getRenderType()
      The type of render function that is called for this block
      Overrides:
      getRenderType in class Block
    • colorMultiplier

      public int colorMultiplier(IBlockAccess par1IBlockAccess, int par2, int par3, int par4)
      Returns a integer with hex for 0xrrggbb with this color multiplied against the blocks color. Note only called when first determining what to render.
      Overrides:
      colorMultiplier in class Block
    • canPlaceBlockAt

      public boolean canPlaceBlockAt(World par1World, int par2, int par3, int par4)
      Checks to see if its valid to put this block at the specified coordinates. Args: world, x, y, z
      Overrides:
      canPlaceBlockAt in class Block
    • onBlockAdded

      public void onBlockAdded(World par1World, int par2, int par3, int par4)
      Called whenever the block is added into the world. Args: world, x, y, z
      Overrides:
      onBlockAdded in class Block
    • breakBlock

      public void breakBlock(World par1World, int par2, int par3, int par4, int par5, int par6)
      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 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
    • idDropped

      public int idDropped(int par1, Random par2Random, int par3)
      Returns the ID of the items to drop on destruction.
      Overrides:
      idDropped in class Block
    • canRedstoneConnectToSide

      public boolean canRedstoneConnectToSide(IBlockAccess blockAccess, int x, int y, int z, int flatDirection)
      Description copied from class: Block
      Should redstone dust redirect itself to this side of the block
      Overrides:
      canRedstoneConnectToSide in class Block
    • isProvidingStrongPower

      public int isProvidingStrongPower(IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5)
      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
    • isProvidingWeakPower

      public int isProvidingWeakPower(IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5)
      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
    • getConnectingSides

      public int getConnectingSides(IBlockAccess blockAccess, int x, int y, int z, boolean forRendering)
    • canProvidePower

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

      public void randomDisplayTick(World par1World, int par2, int par3, int par4, Random par5Random)
      A randomly called display update to be able to add particles or other items for display
      Overrides:
      randomDisplayTick in class Block
    • isPowerProviderOrWire

      public static boolean isPowerProviderOrWire(IBlockAccess par0IBlockAccess, int par1, int par2, int par3, int par4)
      Returns true if redstone wire can connect to the specified block. Params: World, X, Y, Z, side (not a normal notch-side, this can be 0, 1, 2, 3 or -1)
    • canGroundCoverRestOnBlock

      public boolean canGroundCoverRestOnBlock(World world, int i, int j, int k)
      Returns true if the block coordinate passed can provide power, or is a redstone wire, or if its a repeater that is powered.
      Overrides:
      canGroundCoverRestOnBlock in class Block
    • groundCoverRestingOnVisualOffset

      public float groundCoverRestingOnVisualOffset(IBlockAccess blockAccess, int i, int j, int k)
      Overrides:
      groundCoverRestingOnVisualOffset in class Block
    • triggersBuddy

      public boolean triggersBuddy()
      Description copied from class: Block
      Whether or not the block sets off Buddy Blocks. Set to false for stuff like redstone blocks that can cause feedback loops.
      Overrides:
      triggersBuddy in class Block
    • renderBlock

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

      @Environment(CLIENT) public boolean shouldSideBeRendered(IBlockAccess blockAccess, int iNeighborI, int iNeighborJ, int iNeighborK, int iSide)
      Overrides:
      shouldSideBeRendered in class Block
    • idPicked

      public int idPicked(World par1World, int par2, int par3, int par4)
      only called by clickMiddleMouseButton , and passed to inventory.setCurrentItem (along with isCreative)
      Overrides:
      idPicked in class Block
    • registerIcons

      public void registerIcons(IconRegister par1IconRegister)
      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
    • getRedstoneWireIcon

      public static Icon getRedstoneWireIcon(String par0Str)
    • getIconByIndex

      @Environment(CLIENT) public Icon getIconByIndex(int index)
      Description copied from class: Block
      Called by geometric primitives that FCModelBlock uses, to reference textures not associated with a specific block side.
      Overrides:
      getIconByIndex in class Block