Class BlockNeedsAttached

Direct Known Subclasses:
BlockAttachable, BlockCarpet, BlockCocoa, BlockCrops, BlockDeadBush, BlockDoublePlant, BlockFire, BlockMushroom, BlockNetherWart, BlockRails, BlockRedstone, BlockRedstoneComparator, BlockRedstoneRepeater, BlockRedstoneTorch, BlockSapling, BlockSign, BlockSnow, BlockSugarCane, BlockTallGrass, BlockTorch

public class BlockNeedsAttached extends BlockType
  • Constructor Details

    • BlockNeedsAttached

      public BlockNeedsAttached()
  • Method Details

    • onNearBlockChanged

      public void onNearBlockChanged(GlowBlock block, org.bukkit.block.BlockFace face, GlowBlock changedBlock, org.bukkit.Material oldType, byte oldData, org.bukkit.Material newType, byte newData)
      Description copied from class: BlockType
      Called when a neighboring block (within a 3x3x3 cube) has changed its type or data and physics checks should occur.
      onNearBlockChanged in class BlockType
      block - The block to perform physics checks for
      face - The BlockFace to the changed block, or null if unavailable
      changedBlock - The neighboring block that has changed
      oldType - The old type of the changed block
      oldData - The old data of the changed block
      newType - The new type of the changed block
      newData - The new data of the changed block
    • updatePhysicsAfterEvent

      public void updatePhysicsAfterEvent(GlowBlock me)
      updatePhysicsAfterEvent in class BlockType
    • canAttachTo

      public boolean canAttachTo(GlowBlock block, org.bukkit.block.BlockFace against)
      Called to determine if the target block can be attached to when right clicking it.
      block - The location the block is being placed at.
      against - The face the block is being placed against.
      Whether the black can be attached to.
    • canPlaceAt

      public boolean canPlaceAt(GlowPlayer player, GlowBlock block, org.bukkit.block.BlockFace against)
      Description copied from class: BlockType
      Check whether the block can be placed at the given location.
      canPlaceAt in class BlockType
      player - The player who placed the block.
      block - The location the block is being placed at.
      against - The face the block is being placed against.
      Whether the placement is valid.
    • dropMe

      protected void dropMe(GlowBlock me)
    • getAttachedFace

      protected org.bukkit.block.BlockFace getAttachedFace(GlowBlock me)