diff options
Diffstat (limited to 'patches/server/0788-Add-getDrops-to-BlockState.patch')
-rw-r--r-- | patches/server/0788-Add-getDrops-to-BlockState.patch | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/patches/server/0788-Add-getDrops-to-BlockState.patch b/patches/server/0788-Add-getDrops-to-BlockState.patch index 93f48ad578..ba33e973c5 100644 --- a/patches/server/0788-Add-getDrops-to-BlockState.patch +++ b/patches/server/0788-Add-getDrops-to-BlockState.patch @@ -7,26 +7,17 @@ Originally added isPreferredTool to BlockData but upstream added that. diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockState.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockState.java -index 08716e757b2e100f7bc47a046f02db664d882aba..d11d854ae90b99aa2ce227994d07fe1fe9b4a60a 100644 +index 08716e757b2e100f7bc47a046f02db664d882aba..2cfaa59a0bb6b5253b5a8dcc38ae65e0f085fd3f 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockState.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockState.java -@@ -337,5 +337,33 @@ public class CraftBlockState implements BlockState { +@@ -337,5 +337,24 @@ public class CraftBlockState implements BlockState { public boolean isCollidable() { return this.data.getBlock().hasCollision; } + + @Override -+ public java.util.Collection<org.bukkit.inventory.ItemStack> getDrops() { -+ return this.getDrops(null); -+ } -+ -+ @Override -+ public java.util.Collection<org.bukkit.inventory.ItemStack> getDrops(org.bukkit.inventory.ItemStack item) { -+ return this.getDrops(item, null); -+ } -+ -+ @Override + public java.util.Collection<org.bukkit.inventory.ItemStack> getDrops(org.bukkit.inventory.ItemStack item, org.bukkit.entity.Entity entity) { ++ this.requirePlaced(); + net.minecraft.world.item.ItemStack nms = org.bukkit.craftbukkit.inventory.CraftItemStack.asNMSCopy(item); + + // Modelled off EntityHuman#hasBlock |