SPIGOT-4987: Shulkerbox does not save empty slots

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2019-05-27 10:00:56 +10:00
parent d1e70b9323
commit 3f2b383463
2 changed files with 35 additions and 14 deletions

View File

@@ -1,14 +0,0 @@
--- a/net/minecraft/server/LootTable.java
+++ b/net/minecraft/server/LootTable.java
@@ -40,6 +40,11 @@
public static Consumer<ItemStack> a(Consumer<ItemStack> consumer) {
return (itemstack) -> {
+ // CraftBukkit start - SPIGOT-4940: no empty loot
+ if (itemstack.isEmpty()) {
+ return;
+ }
+ // CraftBukkit end
if (itemstack.getCount() < itemstack.getMaxStackSize()) {
consumer.accept(itemstack);
} else {