Class BlockLiquid

Direct Known Subclasses:
BlockLava, BlockWater

public abstract class BlockLiquid extends BlockType
  • Constructor Details

    • BlockLiquid

      protected BlockLiquid(org.bukkit.Material bucketType)
  • Method Details

    • isCollectible

      public abstract boolean isCollectible(GlowBlockState block)
      Check if the BlockState block is collectible by a bucket.
      Parameters:
      block - The block state to check
      Returns:
      Boolean representing if its collectible
    • 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
    • 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
    • receivePulse

      public void receivePulse(GlowBlock block)
      Pulse the block to calculate its flow.
      Overrides:
      receivePulse in class BlockType
      Parameters:
      block - The block to calculate flow of.
    • updatePhysicsAfterEvent

      public void updatePhysicsAfterEvent(GlowBlock me)
      Overrides:
      updatePhysicsAfterEvent 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.
    • getBucketType

      public org.bukkit.Material getBucketType()
      Get the bucket type to replace the empty bucket when the liquid has been collected.
      Returns:
      The associated bucket types material