Class BlockDetectorRail


public class BlockDetectorRail extends BlockRailBase
  • Constructor Details

    • BlockDetectorRail

      public BlockDetectorRail(int par1)
  • Method Details

    • tickRate

      public int tickRate(World par1World)
      How many world ticks before ticking
      Overrides:
      tickRate in class Block
    • 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
    • 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
    • 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
    • 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 BlockRailBase
    • hasComparatorInputOverride

      public boolean hasComparatorInputOverride()
      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)
      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
    • 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
    • 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
    • shouldPlateActivateBasedOnMinecart

      public boolean shouldPlateActivateBasedOnMinecart(World world, int i, int j, int k, int iMinecartType, Entity riddenByEntity)
    • registerIcons

      @Environment(CLIENT) public void registerIcons(IconRegister par1IconRegister)
      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 par1, int par2)
      Description copied from class: Block
      From the specified side and block metadata retrieves the blocks texture. Args: side, metadata
      Overrides:
      getIcon in class Block