Class BlockFenceGate


public class BlockFenceGate extends BlockDirectional
  • Constructor Details

    • BlockFenceGate

      public BlockFenceGate(int par1)
  • Method Details

    • getCollisionBoundingBoxFromPool

      public AxisAlignedBB getCollisionBoundingBoxFromPool(World par1World, int par2, int par3, int par4)
      Returns a bounding box from the pool of bounding boxes (this means this box can change after the pool has been cleared to be reused)
      Overrides:
      getCollisionBoundingBoxFromPool in class Block
    • isOpaqueCube

      public boolean isOpaqueCube()
      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()
      If this block doesn't render as an ordinary block it will return False (examples: signs, buttons, stairs, etc)
      Overrides:
      renderAsNormalBlock in class Block
    • getBlocksMovement

      public boolean getBlocksMovement(IBlockAccess par1IBlockAccess, int par2, int par3, int par4)
      Description copied from class: Block
      FCNOTE: This is misnamed and returns true if the block *doesn't* block movement
      Overrides:
      getBlocksMovement in class Block
    • getRenderType

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

      public void onBlockPlacedBy(World par1World, int par2, int par3, int par4, EntityLivingBase par5EntityLivingBase, ItemStack par6ItemStack)
      Called when the block is placed in the world.
      Overrides:
      onBlockPlacedBy in class Block
    • isFenceGateOpen

      public static boolean isFenceGateOpen(int par0)
      Returns if the fence gate is open according to its metadata.
    • canPlaceBlockAt

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

      public int getWeightOnPathBlocked(IBlockAccess blockAccess, int i, int j, int k)
      Overrides:
      getWeightOnPathBlocked in class Block
    • onBlockActivated

      public boolean onBlockActivated(World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9)
      Description copied from class: Block
      Called upon block activation (right click on the block.)
      Overrides:
      onBlockActivated in class Block
    • canPathThroughBlock

      public boolean canPathThroughBlock(IBlockAccess blockAccess, int i, int j, int k, Entity entity, PathFinder pathFinder)
      Overrides:
      canPathThroughBlock in class Block
    • isBreakableBarricade

      public boolean isBreakableBarricade(World world, int i, int j, int k, boolean advancedBreaker)
      Overrides:
      isBreakableBarricade in class Block
    • isBreakableBarricadeOpen

      public boolean isBreakableBarricadeOpen(IBlockAccess blockAccess, int i, int j, int k)
      Overrides:
      isBreakableBarricadeOpen 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
    • getBlockBoundsFromPoolBasedOnState

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

      public boolean shouldWallConnectToThisBlockToFacing(IBlockAccess blockAccess, int x, int y, int z, int facing)
      Overrides:
      shouldWallConnectToThisBlockToFacing in class Block
    • shouldFenceConnectToThisBlockToFacing

      public boolean shouldFenceConnectToThisBlockToFacing(IBlockAccess blockAccess, int x, int y, int z, int facing)
      Overrides:
      shouldFenceConnectToThisBlockToFacing in class Block
    • isNextToWall

      protected boolean isNextToWall(IBlockAccess blockAccess, int x, int y, int z)
    • shouldSideBeRendered

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

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

      public void registerIcons(IconRegister par1IconRegister)
      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

      public Icon getIcon(int par1, int par2)
      From the specified side and block metadata retrieves the blocks texture. Args: side, metadata
      Overrides:
      getIcon in class Block