Update to 1.19.2
This commit is contained in:
31
patches/api/0004-Add-provided-Material-to-getDrops.patch
Normal file
31
patches/api/0004-Add-provided-Material-to-getDrops.patch
Normal file
@@ -0,0 +1,31 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Cryptite <cryptite@gmail.com>
|
||||
Date: Fri, 12 Aug 2022 10:40:48 -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 ed65bb8867bc2b8e67726dee07a82ac3671b0306..3da43fba552b1cb16b9a5480c46a5d0ea0f9c087 100644
|
||||
--- a/src/main/java/org/bukkit/block/Block.java
|
||||
+++ b/src/main/java/org/bukkit/block/Block.java
|
||||
@@ -639,6 +639,20 @@ public interface Block extends Metadatable, net.kyori.adventure.translation.Tran
|
||||
@NotNull
|
||||
Collection<ItemStack> 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<ItemStack> 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.
|
||||
*
|
||||
Reference in New Issue
Block a user