mirror of
https://hub.spigotmc.org/stash/scm/spigot/bukkit.git
synced 2025-08-05 16:49:39 +00:00
[Bleeding] Added Block.breakNaturally and Block.getDrops
This commit is contained in:
parent
86f33b82c9
commit
d384da1e7c
1 changed files with 34 additions and 1 deletions
|
@ -1,9 +1,12 @@
|
|||
package org.bukkit.block;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
import org.bukkit.Chunk;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
/**
|
||||
* Represents a block. This is a live object, and only one Block may exist for
|
||||
|
@ -143,7 +146,6 @@ public interface Block {
|
|||
*
|
||||
* @return Location of block
|
||||
*/
|
||||
|
||||
Location getLocation();
|
||||
|
||||
/**
|
||||
|
@ -302,4 +304,35 @@ public interface Block {
|
|||
* @return reaction
|
||||
*/
|
||||
PistonMoveReaction getPistonMoveReaction();
|
||||
|
||||
/**
|
||||
* Breaks the block and spawns items as if a player had digged it
|
||||
*
|
||||
* @return true if the block was destroyed
|
||||
*/
|
||||
boolean breakNaturally();
|
||||
|
||||
/**
|
||||
* Breaks the block and spawns items as if a player had digged it with a specific tool
|
||||
*
|
||||
* @param tool The tool or item in hand used for digging
|
||||
* @return true if the block was destroyed
|
||||
*/
|
||||
boolean breakNaturally(ItemStack tool);
|
||||
|
||||
/**
|
||||
* Returns a list of items which would drop by destroying this block
|
||||
*
|
||||
* @return a list of dropped items for this type of block
|
||||
*/
|
||||
Collection<ItemStack> getDrops();
|
||||
|
||||
/**
|
||||
* Returns a list of items which would drop by destroying this block with a specific tool
|
||||
*
|
||||
* @param tool The tool or item in hand used for digging
|
||||
* @return a list of dropped items for this type of block
|
||||
*/
|
||||
Collection<ItemStack> getDrops(ItemStack tool);
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue