Class BuddyBlock

java.lang.Object
net.minecraft.src.Block
btw.block.blocks.BuddyBlock

public class BuddyBlock extends Block
  • Constructor Details

    • BuddyBlock

      public BuddyBlock(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
    • 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
    • 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
    • onBlockPlacedBy

      public void onBlockPlacedBy(World world, int i, int j, int k, EntityLivingBase entityLiving, ItemStack stack)
      Description copied from class: Block
      Called when the block is placed in the world. // +++START EDIT+++ FCNOTE: Called AFTER the block is placed, unlike onBlockPlaced() // ---END EDIT---
      Overrides:
      onBlockPlacedBy in class Block
    • onNeighborBlockChange

      public void onNeighborBlockChange(World world, int i, int j, int k, int iNeighborBlockID)
      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
    • 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 i, int j, int k, Random rand)
      Description copied from class: Block
      Called on server only
      Overrides:
      randomUpdateTick in class Block
    • isProvidingWeakPower

      public int isProvidingWeakPower(IBlockAccess blockAccess, int i, int j, int k, int iSide)
      Description copied from class: Block
      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 blockAccess, int i, int j, int k, int iSide)
      Description copied from class: Block
      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
    • canProvidePower

      public boolean canProvidePower()
      Description copied from class: Block
      Can this block provide power. Only wire currently seems to have this change based on its state.
      Overrides:
      canProvidePower 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
    • 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
    • onPreBlockPlacedByPiston

      public int onPreBlockPlacedByPiston(World world, int i, int j, int k, int iMetadata, int iDirectionMoved)
      Description copied from class: Block
      Returns the metadata that will be placed
      Overrides:
      onPreBlockPlacedByPiston 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
    • getPowerProvided

      public int getPowerProvided(IBlockAccess blockAccess, int i, int j, int k, int iSide)
    • isRedstoneOn

      public boolean isRedstoneOn(IBlockAccess iblockaccess, int i, int j, int k)
    • setBlockRedstoneOn

      public void setBlockRedstoneOn(World world, int i, int j, int k, boolean bOn)
    • notifyNeigborsToFacingOfPowerChange

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