Class BlockRedstone

public class BlockRedstone extends BlockNeedsAttached
A redstone wire block.
  • Constructor Details

    • BlockRedstone

      public BlockRedstone()
  • Method Details

    • calculateConnections

      public static List<org.bukkit.block.BlockFace> calculateConnections(GlowBlock block)
      Calculates the block data value for a redstone wire block, based on the adjacent blocks, so that appropriate connections are formed.
      block - a redstone wire block
      the block data value
    • setFullyPowered

      protected static void setFullyPowered(GlowBlock block)
      Sets a redstone dust block to the fully-powered state and, if it wasn't already in that state, updates connected blocks so that power propagates.
      block - the block to update
    • 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 BlockNeedsAttached
      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.
    • afterPlace

      public void afterPlace(GlowPlayer player, GlowBlock block, org.bukkit.inventory.ItemStack holding, GlowBlockState oldState)
      Description copied from class: BlockType
      Called after a block has been placed by a player.
      afterPlace in class BlockType
      player - the player who placed the block
      block - the block that was placed
      holding - the the ItemStack that was being held
      oldState - The old block state before the block was placed.
    • 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 BlockNeedsAttached
      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 BlockNeedsAttached
    • receivePulse

      public void receivePulse(GlowBlock me)
      Description copied from class: BlockType
      Called when the BlockType gets pulsed as requested.
      receivePulse in class BlockType
      me - The block that was pulsed