Class LoomBlock

All Implemented Interfaces:
MechanicalBlock, ITileEntityProvider

public class LoomBlock extends BlockContainer implements MechanicalBlock
  • Constructor Details

    • LoomBlock

      public LoomBlock(int blockID)
  • Method Details

    • createNewTileEntity

      public TileEntity createNewTileEntity(World var1)
      Description copied from interface: ITileEntityProvider
      Returns a new instance of a block's tile entity class. Called on placing the block.
      Specified by:
      createNewTileEntity in interface ITileEntityProvider
    • tickRate

      public int tickRate(World world)
      Description copied from class: Block
      How many world ticks before ticking
      Overrides:
      tickRate in class Block
    • onBlockAdded

      public void onBlockAdded(World world, int x, int y, int z)
      Description copied from class: BlockContainer
      Called whenever the block is added into the world. Args: world, x, y, z
      Overrides:
      onBlockAdded in class BlockContainer
    • breakBlock

      public void breakBlock(World world, int x, int y, int z, int blockID, int metadata)
      Description copied from class: BlockContainer
      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 BlockContainer
    • onBlockPlaced

      public int onBlockPlaced(World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ, int metadata)
      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
    • preBlockPlacedBy

      public int preBlockPlacedBy(World world, int x, int y, int z, int metadata, EntityLivingBase entityLiving)
      Description copied from class: Block
      Similar to onBlockPlacedBy() but called before the block is placed rather than after
      Overrides:
      preBlockPlacedBy in class Block
    • onBlockActivated

      public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ)
      Description copied from class: Block
      Called upon block activation (right click on the block.)
      Overrides:
      onBlockActivated 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 x, int y, int z, Random rand)
      Description copied from class: Block
      Called on server only
      Overrides:
      randomUpdateTick in class Block
    • onNeighborBlockChange

      public void onNeighborBlockChange(World world, int x, int y, int z, int blockID)
      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
    • getFacing

      public int getFacing(int metadata)
      Overrides:
      getFacing in class Block
    • setFacing

      public int setFacing(int metadata, int facing)
      Overrides:
      setFacing in class Block
    • isMechPowered

      public boolean isMechPowered(int metadata)
    • isMechPowered

      public boolean isMechPowered(World world, int x, int y, int z)
    • setMechPowered

      public int setMechPowered(int metadata, boolean isPowered)
    • setMechPowered

      public void setMechPowered(World world, int x, int y, int z, boolean isPowered)
    • isProcessing

      public boolean isProcessing(int metadata)
    • isProcessing

      public boolean isProcessing(World world, int x, int y, int z)
    • setProcessing

      public int setProcessing(int metadata, boolean isPowered)
    • setProcessing

      public void setProcessing(World world, int x, int y, int z, boolean isProcessing)
    • canOutputMechanicalPower

      public boolean canOutputMechanicalPower()
      Specified by:
      canOutputMechanicalPower in interface MechanicalBlock
    • canInputMechanicalPower

      public boolean canInputMechanicalPower()
      Specified by:
      canInputMechanicalPower in interface MechanicalBlock
    • isInputtingMechanicalPower

      public boolean isInputtingMechanicalPower(World world, int x, int y, int z)
      Specified by:
      isInputtingMechanicalPower in interface MechanicalBlock
    • isOutputtingMechanicalPower

      public boolean isOutputtingMechanicalPower(World world, int x, int y, int z)
      Specified by:
      isOutputtingMechanicalPower in interface MechanicalBlock
    • canInputAxlePowerToFacing

      public boolean canInputAxlePowerToFacing(World world, int x, int y, int z, int facing)
      Specified by:
      canInputAxlePowerToFacing in interface MechanicalBlock
    • overpower

      public void overpower(World world, int x, int y, int z)
      Specified by:
      overpower in interface MechanicalBlock
    • isCurrentStateValid

      public boolean isCurrentStateValid(World world, int x, int y, int z)
    • 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
    • renderBlock

      @Environment(CLIENT) public boolean renderBlock(RenderBlocks render, int x, int y, int z)
      Overrides:
      renderBlock in class Block
    • renderBlockAsItem

      @Environment(CLIENT) public void renderBlockAsItem(RenderBlocks render, int metadata, float brightness)
      Overrides:
      renderBlockAsItem in class Block
    • clientNotificationOfMetadataChange

      @Environment(CLIENT) public void clientNotificationOfMetadataChange(World world, int x, int y, int z, int oldMetadata, int newMetadata)
      Overrides:
      clientNotificationOfMetadataChange in class Block
    • randomDisplayTick

      @Environment(CLIENT) public void randomDisplayTick(World world, int x, int y, int z, 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