diff options
Diffstat (limited to 'patch-remap/mache-spigotflower-stripped/net/minecraft/server/commands/LootCommand.java.patch')
-rw-r--r-- | patch-remap/mache-spigotflower-stripped/net/minecraft/server/commands/LootCommand.java.patch | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/patch-remap/mache-spigotflower-stripped/net/minecraft/server/commands/LootCommand.java.patch b/patch-remap/mache-spigotflower-stripped/net/minecraft/server/commands/LootCommand.java.patch new file mode 100644 index 0000000000..0f00292435 --- /dev/null +++ b/patch-remap/mache-spigotflower-stripped/net/minecraft/server/commands/LootCommand.java.patch @@ -0,0 +1,14 @@ +--- a/net/minecraft/server/commands/LootCommand.java ++++ b/net/minecraft/server/commands/LootCommand.java +@@ -248,8 +247,9 @@ + private static int dropInWorld(CommandSourceStack commandsourcestack, Vec3 vec3, List<ItemStack> list, LootCommand.Callback lootcommand_callback) throws CommandSyntaxException { + ServerLevel serverlevel = commandsourcestack.getLevel(); + +- list.forEach((itemstack) -> { +- ItemEntity itementity = new ItemEntity(serverlevel, vec3.x, vec3.y, vec3.z, itemstack.copy()); ++ items.removeIf(ItemStack::isEmpty); // CraftBukkit - SPIGOT-6959 Remove empty items for avoid throw an error in new EntityItem ++ items.forEach((itemstack) -> { ++ ItemEntity entityitem = new ItemEntity(worldserver, pos.x, pos.y, pos.z, itemstack.copy()); + + itementity.setDefaultPickUpDelay(); + serverlevel.addFreshEntity(itementity); |