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.
      Overrides:
      onNearBlockChanged in class BlockType
      Parameters:
      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)
      Overrides:
      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.
      Parameters:
      block - The location the block is being placed at.
      against - The face the block is being placed against.
      Returns:
      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.
      Overrides:
      canPlaceAt in class BlockType
      Parameters:
      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.
      Returns:
      Whether the placement is valid.
    • dropMe

      protected void dropMe(GlowBlock me)
    • getAttachedFace

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