PaperMC/paper-server/nms-patches/LootTable.patch
CraftBukkit/Spigot 2667479a6d SPIGOT-5425: Prevent empty/air loot (again?)
By: md_5 <git@md-5.net>
2019-12-11 15:49:53 +11:00

10 lines
458 B
Diff

--- 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();