Class BlockHopper


public class BlockHopper extends BlockContainer
  • Constructor Details

    • BlockHopper

      public BlockHopper()
  • Method Details

    • setFacingDirection

      public void setFacingDirection(org.bukkit.block.BlockState bs, org.bukkit.block.BlockFace face)
      Sets a hopper to face a given direction.
      Parameters:
      bs - the hopper's BlockState
      face - the direction to face
    • createBlockEntity

      public BlockEntity createBlockEntity(GlowChunk chunk, int cx, int cy, int cz)
      Description copied from class: BlockType
      Create a new block entity at the given location.
      Overrides:
      createBlockEntity in class BlockType
      Parameters:
      chunk - The chunk to create the block entity at.
      cx - The x coordinate in the chunk.
      cy - The y coordinate in the chunk.
      cz - The z coordinate in the chunk.
      Returns:
      The new BlockEntity, or null if no block entity is used.
    • placeBlock

      public void placeBlock(GlowPlayer player, GlowBlockState state, org.bukkit.block.BlockFace face, org.bukkit.inventory.ItemStack holding, org.bukkit.util.Vector clickedLoc)
      Description copied from class: BlockType
      Called when a block is placed to calculate what the block will become.
      Overrides:
      placeBlock in class BlockType
      Parameters:
      player - the player who placed the block
      state - the BlockState to edit
      face - the face off which the block is being placed
      holding - the ItemStack that was being held
      clickedLoc - where in the block the click occurred
    • getNeededMiningTool

      protected MaterialMatcher getNeededMiningTool(GlowBlock block)
      Overrides:
      getNeededMiningTool in class BlockContainer
    • receivePulse

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

      public void onRedstoneUpdate(GlowBlock block)
      Overrides:
      onRedstoneUpdate in class BlockType
    • isPulseOnce

      public boolean isPulseOnce(GlowBlock block)
      Description copied from class: BlockType
      Whether the block should only be pulsed once.
      Overrides:
      isPulseOnce in class BlockType
      Parameters:
      block - the block
      Returns:
      true if the block should be pulsed once, false otherwise.
    • getPulseTickSpeed

      public int getPulseTickSpeed(GlowBlock block)
      Description copied from class: BlockType
      The rate at which the block should be pulsed.
      Overrides:
      getPulseTickSpeed in class BlockType
      Parameters:
      block - the block
      Returns:
      0 if the block should not pulse, or a number of ticks between pulses.