11 lines
664 B
Diff
11 lines
664 B
Diff
--- a/net/minecraft/server/commands/CommandLoot.java
|
|
+++ b/net/minecraft/server/commands/CommandLoot.java
|
|
@@ -237,6 +237,7 @@
|
|
private static int dropInWorld(CommandListenerWrapper commandlistenerwrapper, Vec3D vec3d, List<ItemStack> list, CommandLoot.a commandloot_a) throws CommandSyntaxException {
|
|
WorldServer worldserver = commandlistenerwrapper.getLevel();
|
|
|
|
+ list.removeIf(ItemStack::isEmpty); // CraftBukkit - SPIGOT-6959 Remove empty items for avoid throw an error in new EntityItem
|
|
list.forEach((itemstack) -> {
|
|
EntityItem entityitem = new EntityItem(worldserver, vec3d.x, vec3d.y, vec3d.z, itemstack.copy());
|
|
|