From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Cryptite Date: Wed, 29 Sep 2021 08:40:37 -0500 Subject: [PATCH] Add provided Material to getDrops diff --git a/src/main/java/org/bukkit/block/Block.java b/src/main/java/org/bukkit/block/Block.java index cd63406809aadbcc53857aaef31053915278dfc0..ab4982d52185bbc80d506da2a961345d46710efa 100644 --- a/src/main/java/org/bukkit/block/Block.java +++ b/src/main/java/org/bukkit/block/Block.java @@ -602,6 +602,20 @@ public interface Block extends Metadatable, net.kyori.adventure.translation.Tran @NotNull Collection getDrops(@NotNull ItemStack tool, @Nullable Entity entity); + // Slice start + /** + * Returns a list of items which would drop by the entity destroying this + * block as though it were a given Material with a specific tool + * + * @param blockType The block type to use as the source loot + * @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 getDrops(@NotNull Material blockType, @NotNull ItemStack tool, @Nullable Entity entity); + // Slice end + /** * Returns if the given item is a preferred choice to break this Block. *