Class AxleBlock

java.lang.Object
net.minecraft.src.Block
btw.block.blocks.AxleBlock
Direct Known Subclasses:
AxlePowerSourceBlock

public class AxleBlock extends Block
  • Field Details

    • AXLE_WIDTH

      protected static final double AXLE_WIDTH
      See Also:
    • AXLE_HALF_WIDTH

      protected static final double AXLE_HALF_WIDTH
      See Also:
    • AXLE_TICK_RATE

      public static final int AXLE_TICK_RATE
      See Also:
    • axleFacingsForAlignment

      protected static final int[][] axleFacingsForAlignment
    • iconSide

      @Environment(CLIENT) public Icon iconSide
    • iconSideOn

      @Environment(CLIENT) public Icon iconSideOn
    • iconSideOnOverpowered

      @Environment(CLIENT) public Icon iconSideOnOverpowered
    • isPowerOnForCurrentRender

      @Environment(CLIENT) public boolean isPowerOnForCurrentRender
    • isOverpoweredForCurrentRender

      @Environment(CLIENT) public boolean isOverpoweredForCurrentRender
  • Constructor Details

    • AxleBlock

      public AxleBlock(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
    • 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
    • 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
    • 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
    • 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
    • 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
    • getMobilityFlag

      public int getMobilityFlag()
      Description copied from class: Block
      Returns the mobility information of the block, 0 = free, 1 = can't push but can move over, 2 = total immobility and stop pistons // +++START EDIT+++ FCMOD: 3 = can be piston shoveled, but free otherwise // ---END EDIT---
      Overrides:
      getMobilityFlag 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
    • getMechanicalPowerLevelProvidedToAxleAtFacing

      public int getMechanicalPowerLevelProvidedToAxleAtFacing(World world, int i, int j, int k, int iFacing)
      Overrides:
      getMechanicalPowerLevelProvidedToAxleAtFacing 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
    • 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
    • canGroundCoverRestOnBlock

      public boolean canGroundCoverRestOnBlock(World world, int i, int j, int k)
      Overrides:
      canGroundCoverRestOnBlock in class Block
    • groundCoverRestingOnVisualOffset

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

      public int getAxisAlignment(IBlockAccess iBlockAccess, int i, int j, int k)
    • setAxisAlignment

      public void setAxisAlignment(World world, int i, int j, int k, int iAxisAlignment)
    • getAxisAlignmentFromMetadata

      public int getAxisAlignmentFromMetadata(int iMetadata)
    • setAxisAlignmentBasedOnFacing

      public void setAxisAlignmentBasedOnFacing(World world, int i, int j, int k, int iFacing)
    • setAxisAlignmentInMetadataBasedOnFacing

      public int setAxisAlignmentInMetadataBasedOnFacing(int iMetadata, int iFacing)
    • getPowerLevel

      public int getPowerLevel(IBlockAccess iBlockAccess, int i, int j, int k)
    • getPowerLevelFromMetadata

      public int getPowerLevelFromMetadata(int iMetadata)
    • setPowerLevel

      public void setPowerLevel(World world, int i, int j, int k, int iPowerLevel)
    • setPowerLevelInMetadata

      public int setPowerLevelInMetadata(int iMetadata, int iPowerLevel)
    • setPowerLevelWithoutNotify

      public void setPowerLevelWithoutNotify(World world, int i, int j, int k, int iPowerLevel)
    • isAxleOrientedTowardsFacing

      public boolean isAxleOrientedTowardsFacing(IBlockAccess iBlockAccess, int i, int j, int k, int iFacing)
    • breakAxle

      public void breakAxle(World world, int i, int j, int k)
    • validatePowerLevel

      protected void validatePowerLevel(World world, int i, int j, int k)
    • overpower

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

      @Environment(CLIENT) public Icon getBlockTexture(IBlockAccess blockAccess, int i, int j, int k, int iSide)
      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
    • getAxleSideTextureForOnState

      @Environment(CLIENT) public Icon getAxleSideTextureForOnState(boolean bIsOn)
    • 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
    • clientCheckIfPowered

      @Environment(CLIENT) public boolean clientCheckIfPowered(IBlockAccess blockAccess, int i, int j, int k)
    • shouldSideBeRendered

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

      @Environment(CLIENT) public void clientBreakBlock(World world, int i, int j, int k, int iBlockID, int iMetadata)
      Overrides:
      clientBreakBlock in class Block
    • clientBlockAdded

      @Environment(CLIENT) public void clientBlockAdded(World world, int i, int j, int k)
      Overrides:
      clientBlockAdded in class Block
    • renderBlock

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

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