13
0
geforkt von Mirrors/Paper

SPIGOT-5641: Add Block.getDrops(ItemStack, Entity)

By: md_5 <git@md-5.net>
Dieser Commit ist enthalten in:
Bukkit/Spigot 2020-04-05 16:51:54 +10:00
Ursprung 2272d756ab
Commit 23efa7fb0c

Datei anzeigen

@ -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>