net.minecraft.server.commands

This commit is contained in:
Jake Potrebic
2024-12-14 13:42:43 -08:00
parent 973fe2a945
commit 93114d09f2
40 changed files with 460 additions and 518 deletions

View File

@@ -0,0 +1,10 @@
--- a/net/minecraft/server/commands/LootCommand.java
+++ b/net/minecraft/server/commands/LootCommand.java
@@ -395,6 +_,7 @@
private static int dropInWorld(CommandSourceStack source, Vec3 pos, List<ItemStack> items, LootCommand.Callback callback) throws CommandSyntaxException {
ServerLevel level = source.getLevel();
+ items.removeIf(ItemStack::isEmpty); // CraftBukkit - SPIGOT-6959 Remove empty items for avoid throw an error in new EntityItem
items.forEach(itemStack -> {
ItemEntity itemEntity = new ItemEntity(level, pos.x, pos.y, pos.z, itemStack.copy());
itemEntity.setDefaultPickUpDelay();