Block drops API

Discussion in 'Bukkit Preview' started by Zeerix, Jan 17, 2012.

  1. Offline

    Zeerix

    Added the following methods to org.bukkit.block.Block:
    Code:
    // Breaks the block and spawns items as if a player had digged it
    boolean breakNaturally();
    
    // Same as breakNaturally(), except that it checks if the given tool causes items to drop on that type of block
    boolean breakNaturally(ItemStack tool);
    
    // Returns a list of items which would drop by destroying this block; no changes are made to the block
    Collection<ItemStack> getDrops();
    
    // Same as getDrops(), except that it checks if the given tool causes items to drop on that type of block
    Collection<ItemStack> getDrops(ItemStack tool);
    
     

Share This Page