mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-19 06:42:02 +01:00
SPIGOT-5641: Add Block.getDrops(ItemStack, Entity)
By: md_5 <git@md-5.net>
This commit is contained in:
parent
2272d756ab
commit
23efa7fb0c
@ -8,6 +8,7 @@ import org.bukkit.Material;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.block.data.Bisected;
|
||||
import org.bukkit.block.data.BlockData;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.metadata.Metadatable;
|
||||
import org.bukkit.util.BoundingBox;
|
||||
@ -408,6 +409,17 @@ public interface Block extends Metadatable {
|
||||
@NotNull
|
||||
Collection<ItemStack> getDrops(@NotNull ItemStack tool);
|
||||
|
||||
/**
|
||||
* Returns a list of items which would drop by the entity destroying this
|
||||
* block with a specific tool
|
||||
*
|
||||
* @param tool The tool or item in hand used for digging
|
||||
* @param entity the entity destroying the block
|
||||
* @return a list of dropped items for this type of block
|
||||
*/
|
||||
@NotNull
|
||||
Collection<ItemStack> getDrops(@NotNull ItemStack tool, @Nullable Entity entity);
|
||||
|
||||
/**
|
||||
* Checks if this block is passable.
|
||||
* <p>
|
||||
|
Loading…
Reference in New Issue
Block a user