Class BlockRandomDrops

Direct Known Subclasses:
BlockRedstoneOre

public class BlockRandomDrops extends BlockNeedsTool
A block type that drops a random number of items when broken, and isn't affected by the Fortune enchantment (unlike BlockOre).
  • Constructor Details

    • BlockRandomDrops

      public BlockRandomDrops(org.bukkit.Material dropType, int data, int minDrops, int maxDrops, MaterialMatcher neededTool)
      Creates a block type that drops a random number of items when broken.
      Parameters:
      dropType - the item to drop when broken
      data - the block-data or damage value for the dropped item
      minDrops - the minimum number of items to drop when broken
      maxDrops - the maximum number of items to drop when broken
      neededTool - the tool(s) that can break this block, or null if no tool is needed
    • BlockRandomDrops

      public BlockRandomDrops(org.bukkit.Material dropType, int data, int minDrops, int maxDrops)
      Creates a block type that drops a random number of items when broken, and can be broken with no tool.
      Parameters:
      dropType - the item to drop when broken
      data - the block-data or damage value for the dropped item
      minDrops - the minimum number of items to drop when broken
      maxDrops - the maximum number of items to drop when broken
    • BlockRandomDrops

      public BlockRandomDrops(org.bukkit.Material dropType, int minDrops, int maxDrops)
      Creates a block type that drops a random number of items with block-data or damage value 0 when broken, and can be broken with no tool.
      Parameters:
      dropType - the item to drop when broken
      minDrops - the minimum number of items to drop when broken
      maxDrops - the maximum number of items to drop when broken
    • BlockRandomDrops

      public BlockRandomDrops(org.bukkit.Material dropType, int maxDrops)
      Creates a block type that drops a random number of items that's at least 1, with block-data or damage value 0, and can be broken with no tool.
      Parameters:
      dropType - the item to drop when broken
      maxDrops - the maximum number of items to drop when broken
  • Method Details