Class BlockFire


public class BlockFire extends BlockNeedsAttached
  • Constructor Details

    • BlockFire

      public BlockFire()
  • Method Details

    • canOverride

      public boolean canOverride(GlowBlock block, org.bukkit.block.BlockFace face, org.bukkit.inventory.ItemStack holding)
      Description copied from class: BlockType
      Called to check if this block can be overridden by a block place which would occur inside it.
      Overrides:
      canOverride in class BlockType
      Parameters:
      block - The block being targeted by the placement
      face - The face on which the click occurred
      holding - The ItemStack the player was holding
      Returns:
      Whether this block can be overridden.
    • 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
    • getDrops

      @NotNull public @NotNull Collection<org.bukkit.inventory.ItemStack> getDrops(GlowBlock block, org.bukkit.inventory.ItemStack tool)
      Description copied from class: BlockType
      Get the items that will be dropped by digging the block.
      Overrides:
      getDrops in class BlockType
      Parameters:
      block - The block being dug.
      tool - The tool used or null if fists or no tool was used.
      Returns:
      The drops that should be returned.
    • getAttachedFace

      protected org.bukkit.block.BlockFace getAttachedFace(GlowBlock me)
      Overrides:
      getAttachedFace in class BlockNeedsAttached
    • canTickRandomly

      public boolean canTickRandomly()
      Description copied from class: BlockType
      Called to check if this block can perform random tick updates.
      Overrides:
      canTickRandomly in class BlockType
      Returns:
      Whether this block updates on tick.
    • updateBlock

      public void updateBlock(GlowBlock block)
      Description copied from class: BlockType
      Called when this block needs to be updated.
      Overrides:
      updateBlock in class BlockType
      Parameters:
      block - The block that needs an update
    • 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
    • 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.
    • 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.