mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-09 03:43:40 +01:00
SPIGOT-5425: Prevent empty/air loot (again?)
By: md_5 <git@md-5.net>
This commit is contained in:
parent
7dbf1ee072
commit
2667479a6d
1 changed files with 10 additions and 0 deletions
10
paper-server/nms-patches/LootTable.patch
Normal file
10
paper-server/nms-patches/LootTable.patch
Normal file
|
@ -0,0 +1,10 @@
|
|||
--- a/net/minecraft/server/LootTable.java
|
||||
+++ b/net/minecraft/server/LootTable.java
|
||||
@@ -39,6 +39,7 @@
|
||||
public static Consumer<ItemStack> a(Consumer<ItemStack> consumer) {
|
||||
return (itemstack) -> {
|
||||
if (itemstack.getCount() < itemstack.getMaxStackSize()) {
|
||||
+ if (itemstack.isEmpty()) return; // CraftBukkit
|
||||
consumer.accept(itemstack);
|
||||
} else {
|
||||
int i = itemstack.getCount();
|
Loading…
Reference in a new issue