Class BlockSugarCane

public class BlockSugarCane extends BlockNeedsAttached
  • Constructor Details

    • BlockSugarCane

      public BlockSugarCane()
  • Method Details

    • 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
    • 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.
    • canTickRandomly

      public boolean canTickRandomly()
      Description copied from class: BlockType
      Called to check if this block can perform random tick updates.
      canTickRandomly in class BlockType
      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.
      updateBlock in class BlockType
      block - The block that needs an update
    • getDrops

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