Class TorchBlockBase

java.lang.Object
net.minecraft.src.Block
btw.block.blocks.TorchBlockBase
Direct Known Subclasses:
BlockRedstoneTorch, TorchBlockBurningBase, TorchBlockUnlitBase

public class TorchBlockBase extends Block
  • Constructor Details

    • TorchBlockBase

      protected TorchBlockBase(int iBlockID)
  • Method Details

    • getCollisionBoundingBoxFromPool

      public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int i, int j, int k)
      Overrides:
      getCollisionBoundingBoxFromPool 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
    • getRenderType

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

      public boolean canPlaceBlockAt(World world, int i, int j, int k)
      Description copied from class: Block
      Checks to see if its valid to put this block at the specified coordinates. Args: world, x, y, z
      Overrides:
      canPlaceBlockAt 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
    • 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
    • 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 iNeighborID)
      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
    • getBlockBoundsFromPoolBasedOnState

      public AxisAlignedBB getBlockBoundsFromPoolBasedOnState(IBlockAccess blockAccess, int i, int j, int k)
      Overrides:
      getBlockBoundsFromPoolBasedOnState in class Block
    • isBlockRestingOnThatBelow

      public boolean isBlockRestingOnThatBelow(IBlockAccess blockAccess, int i, int j, int k)
      Description copied from class: Block
      returns true if the block is sitting on the one below, like a torch resting on the ground
      Overrides:
      isBlockRestingOnThatBelow 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
    • canRotateAroundBlockOnTurntableToFacing

      public boolean canRotateAroundBlockOnTurntableToFacing(World world, int i, int j, int k, int iFacing)
      Overrides:
      canRotateAroundBlockOnTurntableToFacing in class Block
    • getNewMetadataRotatedAroundBlockOnTurntableToFacing

      public int getNewMetadataRotatedAroundBlockOnTurntableToFacing(World world, int i, int j, int k, int iInitialFacing, int iRotatedFacing)
      Overrides:
      getNewMetadataRotatedAroundBlockOnTurntableToFacing in class Block
    • onNeighborDisrupted

      public void onNeighborDisrupted(World world, int i, int j, int k, int iToFacing)
      Overrides:
      onNeighborDisrupted in class Block
    • canPlaceTorchOn

      protected boolean canPlaceTorchOn(World world, int i, int j, int k)
    • validateState

      protected boolean validateState(World world, int i, int j, int k, int iNeighborID)
    • getOrientation

      public int getOrientation(IBlockAccess blockAccess, int i, int j, int k)
    • getOrientation

      public static int getOrientation(int iMetadata)
    • setOrientation

      public void setOrientation(World world, int i, int j, int k, int iOrientation)
    • setOrientation

      public static int setOrientation(int iMetadata, int iOrientation)
    • isRainingOnTorch

      public boolean isRainingOnTorch(World world, int i, int j, int k)
    • renderBlock

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