SPIGOT-5448: Shulker Boxes collapse empty slots when picked up

This commit is contained in:
md_5 2019-12-13 14:06:25 +11:00
parent b97d581af2
commit fd25653f17
2 changed files with 8 additions and 10 deletions

View file

@ -143,3 +143,11 @@
}
}
}
@@ -255,6 +326,7 @@
}
private static void a(ObjectArrayList<Pair<ItemStack, BlockPosition>> objectarraylist, ItemStack itemstack, BlockPosition blockposition) {
+ if (itemstack.isEmpty()) return; // CraftBukkit - SPIGOT-5425
int i = objectarraylist.size();
for (int j = 0; j < i; ++j) {

View file

@ -1,10 +0,0 @@
--- 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();