Class BlockVine


public class BlockVine extends BlockClimbable
  • Constructor Details

    • BlockVine

      public BlockVine()
  • Method Details

    • 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 BlockClimbable
      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.
    • 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
    • updatePhysicsAfterEvent

      public void updatePhysicsAfterEvent(GlowBlock me)
      Overrides:
      updatePhysicsAfterEvent in class BlockType
    • canAbsorb

      public boolean canAbsorb(GlowBlock block, org.bukkit.block.BlockFace face, org.bukkit.inventory.ItemStack holding)
      Description copied from class: BlockType
      Called when a player attempts to place a block on an existing block of this type. Used to determine if the placement should occur into the air adjacent to the block (normal behavior), or absorbed into the block clicked on.
      Overrides:
      canAbsorb in class BlockType
      Parameters:
      block - The block the player right-clicked
      face - The face on which the click occurred
      holding - The ItemStack the player was holding
      Returns:
      Whether the place should occur into the block given.
    • 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.
    • 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.
    • 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