diff --git a/patches/unapplied/server/Add-missing-fishing-event-state.patch b/patches/server/Add-missing-fishing-event-state.patch similarity index 100% rename from patches/unapplied/server/Add-missing-fishing-event-state.patch rename to patches/server/Add-missing-fishing-event-state.patch diff --git a/patches/unapplied/server/Adopt-MaterialRerouting.patch b/patches/server/Adopt-MaterialRerouting.patch similarity index 100% rename from patches/unapplied/server/Adopt-MaterialRerouting.patch rename to patches/server/Adopt-MaterialRerouting.patch diff --git a/patches/unapplied/server/Allow-Bukkit-plugin-to-use-Paper-PluginLoader-API.patch b/patches/server/Allow-Bukkit-plugin-to-use-Paper-PluginLoader-API.patch similarity index 100% rename from patches/unapplied/server/Allow-Bukkit-plugin-to-use-Paper-PluginLoader-API.patch rename to patches/server/Allow-Bukkit-plugin-to-use-Paper-PluginLoader-API.patch diff --git a/patches/unapplied/server/Brigadier-based-command-API.patch b/patches/server/Brigadier-based-command-API.patch similarity index 98% rename from patches/unapplied/server/Brigadier-based-command-API.patch rename to patches/server/Brigadier-based-command-API.patch index bbbd09e8dc..62564d9dfb 100644 --- a/patches/unapplied/server/Brigadier-based-command-API.patch +++ b/patches/server/Brigadier-based-command-API.patch @@ -2131,7 +2131,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + // Paper end CommandSourceStack commandlistenerwrapper = (CommandSourceStack) parseresults.getContext().getSource(); - commandlistenerwrapper.getServer().getProfiler().push(() -> { + Profiler.get().push(() -> { @@ -0,0 +0,0 @@ public class Commands { }); } @@ -2270,12 +2270,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 WorldDataConfiguration worlddataconfiguration = new WorldDataConfiguration(MinecraftServer.getSelectedPacks(this.packRepository, true), this.worldData.enabledFeatures()); @@ -0,0 +0,0 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop list : this.pattern.ingredients()) { RecipeChoice choice = CraftRecipe.toBukkit(list); - if (choice != null) { + if (choice != RecipeChoice.empty()) { // Paper @@ -22,49 +22,25 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftRecipe.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftRecipe.java @@ -0,0 +0,0 @@ public interface CraftRecipe extends Recipe { + stack = Ingredient.of(((RecipeChoice.MaterialChoice) bukkit).getChoices().stream().map((mat) -> CraftItemType.bukkitToMinecraft(mat))); } else if (bukkit instanceof RecipeChoice.ExactChoice) { - stack = new Ingredient(((RecipeChoice.ExactChoice) bukkit).getChoices().stream().map((mat) -> new net.minecraft.world.item.crafting.Ingredient.ItemValue(CraftItemStack.asNMSCopy(mat)))); - stack.exact = true; + stack = Ingredient.ofStacks(((RecipeChoice.ExactChoice) bukkit).getChoices().stream().map((mat) -> CraftItemStack.asNMSCopy(mat))); + // Paper start - support "empty" choices + } else if (bukkit == RecipeChoice.empty()) { -+ stack = Ingredient.EMPTY; ++ stack = Ingredient.of(); + // Paper end } else { throw new IllegalArgumentException("Unknown recipe stack instance " + bukkit); } @@ -0,0 +0,0 @@ public interface CraftRecipe extends Recipe { - list.getItems(); + List> items = list.items(); - if (list.itemStacks.length == 0) { + if (items.isEmpty()) { - return null; + return RecipeChoice.empty(); // Paper - null breaks API contracts } - if (list.exact) { -diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftSmithingTransformRecipe.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftSmithingTransformRecipe.java -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftSmithingTransformRecipe.java -+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftSmithingTransformRecipe.java -@@ -0,0 +0,0 @@ public class CraftSmithingTransformRecipe extends SmithingTransformRecipe implem - public void addToCraftingManager() { - ItemStack result = this.getResult(); - -- MinecraftServer.getServer().getRecipeManager().addRecipe(new RecipeHolder<>(CraftNamespacedKey.toMinecraft(this.getKey()), new net.minecraft.world.item.crafting.SmithingTransformRecipe(this.toNMS(this.getTemplate(), false), this.toNMS(this.getBase(), false), this.toNMS(this.getAddition(), false), CraftItemStack.asNMSCopy(result), this.willCopyDataComponents()))); // Paper - Option to prevent data components copy -+ MinecraftServer.getServer().getRecipeManager().addRecipe(new RecipeHolder<>(CraftNamespacedKey.toMinecraft(this.getKey()), new net.minecraft.world.item.crafting.SmithingTransformRecipe(this.toNMS(this.getTemplate(), false), this.toNMS(this.getBase(), false), this.toNMS(this.getAddition(), false), CraftItemStack.asNMSCopy(result), this.willCopyDataComponents()))); // Paper - Option to prevent data components copy & support empty RecipeChoice - } - } -diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftSmithingTrimRecipe.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftSmithingTrimRecipe.java -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftSmithingTrimRecipe.java -+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftSmithingTrimRecipe.java -@@ -0,0 +0,0 @@ public class CraftSmithingTrimRecipe extends SmithingTrimRecipe implements Craft - - @Override - public void addToCraftingManager() { -- MinecraftServer.getServer().getRecipeManager().addRecipe(new RecipeHolder<>(CraftNamespacedKey.toMinecraft(this.getKey()), new net.minecraft.world.item.crafting.SmithingTrimRecipe(this.toNMS(this.getTemplate(), false), this.toNMS(this.getBase(), false), this.toNMS(this.getAddition(), false), this.willCopyDataComponents()))); // Paper - Option to prevent data components copy -+ MinecraftServer.getServer().getRecipeManager().addRecipe(new RecipeHolder<>(CraftNamespacedKey.toMinecraft(this.getKey()), new net.minecraft.world.item.crafting.SmithingTrimRecipe(this.toNMS(this.getTemplate(), false), this.toNMS(this.getBase(), false), this.toNMS(this.getAddition(), false), this.willCopyDataComponents()))); // Paper - Option to prevent data components copy & support empty RecipeChoice - } - } + if (list.isExact()) { diff --git a/src/test/java/io/papermc/paper/inventory/recipe/TestRecipeChoice.java b/src/test/java/io/papermc/paper/inventory/recipe/TestRecipeChoice.java new file mode 100644 index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 diff --git a/patches/unapplied/server/Fix-removing-recipes-from-RecipeIterator.patch b/patches/server/Fix-removing-recipes-from-RecipeIterator.patch similarity index 97% rename from patches/unapplied/server/Fix-removing-recipes-from-RecipeIterator.patch rename to patches/server/Fix-removing-recipes-from-RecipeIterator.patch index 1254139d85..6c8c77d21b 100644 --- a/patches/unapplied/server/Fix-removing-recipes-from-RecipeIterator.patch +++ b/patches/server/Fix-removing-recipes-from-RecipeIterator.patch @@ -17,7 +17,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + private Recipe currentRecipe; // Paper - fix removing recipes from RecipeIterator public RecipeIterator() { - this.recipes = MinecraftServer.getServer().getRecipeManager().byType.entries().iterator(); + this.recipes = MinecraftServer.getServer().getRecipeManager().recipes.byType.entries().iterator(); @@ -0,0 +0,0 @@ public class RecipeIterator implements Iterator { @Override diff --git a/patches/unapplied/server/Fix-sending-disconnect-packet-in-phases-where-it-doe.patch b/patches/server/Fix-sending-disconnect-packet-in-phases-where-it-doe.patch similarity index 100% rename from patches/unapplied/server/Fix-sending-disconnect-packet-in-phases-where-it-doe.patch rename to patches/server/Fix-sending-disconnect-packet-in-phases-where-it-doe.patch diff --git a/patches/unapplied/server/General-ItemMeta-fixes.patch b/patches/server/General-ItemMeta-fixes.patch similarity index 96% rename from patches/unapplied/server/General-ItemMeta-fixes.patch rename to patches/server/General-ItemMeta-fixes.patch index 066086e780..4de96d1e23 100644 --- a/patches/unapplied/server/General-ItemMeta-fixes.patch +++ b/patches/server/General-ItemMeta-fixes.patch @@ -34,7 +34,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 @@ -0,0 +0,0 @@ public abstract class BlockEntity { CompoundTag nbttagcompound = new CompoundTag(); - this.saveAdditional(nbttagcompound, registryLookup); + this.saveAdditional(nbttagcompound, registries); + // Paper start - store PDC here as well + if (this.persistentDataContainer != null && !this.persistentDataContainer.isEmpty()) { + nbttagcompound.put("PublicBukkitValues", this.persistentDataContainer.toTagCompound()); @@ -1066,8 +1066,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 Applicator put(ItemMetaKeyType key, T value) { this.builder.set(key.TYPE, value); @@ -0,0 +0,0 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { - private CraftFoodComponent food; private CraftToolComponent tool; + private CraftEquippableComponent equippable; private CraftJukeboxComponent jukebox; - private int damage; + private Integer damage; // Paper - may not be set @@ -1139,8 +1139,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 @Overridden boolean isEmpty() { -- return !(this.hasDisplayName() || this.hasItemName() || this.hasLocalizedName() || this.hasEnchants() || (this.lore != null) || this.hasCustomModelData() || this.hasBlockData() || this.hasRepairCost() || !this.unhandledTags.build().isEmpty() || !this.removedTags.isEmpty() || !this.persistentDataContainer.isEmpty() || this.hideFlag != 0 || this.isHideTooltip() || this.isUnbreakable() || this.hasEnchantmentGlintOverride() || this.isFireResistant() || this.hasMaxStackSize() || this.hasRarity() || this.hasFood() || this.hasTool() || this.hasJukeboxPlayable() || this.hasDamage() || this.hasMaxDamage() || this.hasAttributeModifiers() || this.customTag != null || this.canPlaceOnPredicates != null || this.canBreakPredicates != null); // Paper -+ return !(this.hasDisplayName() || this.hasItemName() || this.hasLocalizedName() || this.hasEnchants() || (this.lore != null) || this.hasCustomModelData() || this.hasBlockData() || this.hasRepairCost() || !this.unhandledTags.build().isEmpty() || !this.removedTags.isEmpty() || !this.persistentDataContainer.isEmpty() || this.hideFlag != 0 || this.isHideTooltip() || this.isUnbreakable() || this.hasEnchantmentGlintOverride() || this.isFireResistant() || this.hasMaxStackSize() || this.hasRarity() || this.hasFood() || this.hasTool() || this.hasJukeboxPlayable() || this.hasDamageValue() || this.hasMaxDamage() || this.hasAttributeModifiers() || this.customTag != null || this.canPlaceOnPredicates != null || this.canBreakPredicates != null); // Paper +- return !(this.hasDisplayName() || this.hasItemName() || this.hasLocalizedName() || this.hasEnchants() || (this.lore != null) || this.hasCustomModelData() || this.hasEnchantable() || this.hasBlockData() || this.hasRepairCost() || !this.unhandledTags.build().isEmpty() || !this.removedTags.isEmpty() || !this.persistentDataContainer.isEmpty() || this.hideFlag != 0 || this.isHideTooltip() || this.hasTooltipStyle() || this.hasItemModel() || this.isUnbreakable() || this.hasEnchantmentGlintOverride() || this.isGlider() || this.hasDamageResistant() || this.hasMaxStackSize() || this.hasRarity() || this.hasUseRemainder() || this.hasUseCooldown() || this.hasFood() || this.hasTool() || this.hasJukeboxPlayable() || this.hasEquippable() || this.hasDamage() || this.hasMaxDamage() || this.hasAttributeModifiers() || this.customTag != null || this.canPlaceOnPredicates != null || this.canBreakPredicates != null); // Paper ++ return !(this.hasDisplayName() || this.hasItemName() || this.hasLocalizedName() || this.hasEnchants() || (this.lore != null) || this.hasCustomModelData() || this.hasEnchantable() || this.hasBlockData() || this.hasRepairCost() || !this.unhandledTags.build().isEmpty() || !this.removedTags.isEmpty() || !this.persistentDataContainer.isEmpty() || this.hideFlag != 0 || this.isHideTooltip() || this.hasTooltipStyle() || this.hasItemModel() || this.isUnbreakable() || this.hasEnchantmentGlintOverride() || this.isGlider() || this.hasDamageResistant() || this.hasMaxStackSize() || this.hasRarity() || this.hasUseRemainder() || this.hasUseCooldown() || this.hasFood() || this.hasTool() || this.hasJukeboxPlayable() || this.hasEquippable() || this.hasDamageValue() || this.hasMaxDamage() || this.hasAttributeModifiers() || this.customTag != null || this.canPlaceOnPredicates != null || this.canBreakPredicates != null); // Paper } // Paper start @@ -1179,15 +1179,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 } else { @@ -0,0 +0,0 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { - @Override - public FoodComponent getFood() { -- return (this.hasFood()) ? new CraftFoodComponent(this.food) : new CraftFoodComponent(new FoodProperties(0, 0, false, 0, Optional.empty(), Collections.emptyList())); -+ return (this.hasFood()) ? new CraftFoodComponent(this.food) : new CraftFoodComponent(new FoodProperties(0, 0, false, FoodProperties.DEFAULT_EAT_SECONDS, Optional.empty(), Collections.emptyList())); // Paper - create a valid food properties - } - - @Override -@@ -0,0 +0,0 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { - @Override public Multimap getAttributeModifiers(@Nullable EquipmentSlot slot) { - this.checkAttributeList(); @@ -1282,7 +1273,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + CraftMetaItem.Applicator tag = new CraftMetaItem.Applicator() {}; // Paper - support updating profile after resolving it this.applyToItem(tag); DataComponentPatch patch = tag.build(); - Tag nbt = DataComponentPatch.CODEC.encodeStart(MinecraftServer.getDefaultRegistryAccess().createSerializationContext(NbtOps.INSTANCE), patch).getOrThrow(); + net.minecraft.nbt.Tag nbt = DataComponentPatch.CODEC.encodeStart(MinecraftServer.getDefaultRegistryAccess().createSerializationContext(NbtOps.INSTANCE), patch).getOrThrow(); @@ -0,0 +0,0 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { @Override @@ -1345,7 +1336,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 } @@ -0,0 +0,0 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { - && (this.hasCustomModelData() ? that.hasCustomModelData() && this.customModelData.equals(that.customModelData) : !that.hasCustomModelData()) + && (this.hasEnchantable() ? that.hasEnchantable() && this.enchantableValue.equals(that.enchantableValue) : !that.hasEnchantable()) && (this.hasBlockData() ? that.hasBlockData() && this.blockData.equals(that.blockData) : !that.hasBlockData()) && (this.hasRepairCost() ? that.hasRepairCost() && this.repairCost == that.repairCost : !that.hasRepairCost()) - && (this.hasAttributeModifiers() ? that.hasAttributeModifiers() && CraftMetaItem.compareModifiers(this.attributeModifiers, that.attributeModifiers) : !that.hasAttributeModifiers()) @@ -1354,8 +1345,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 && (this.removedTags.equals(that.removedTags)) && (Objects.equals(this.customTag, that.customTag)) @@ -0,0 +0,0 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { - && (this.hasFood() ? that.hasFood() && this.food.equals(that.food) : !that.hasFood()) && (this.hasTool() ? that.hasTool() && this.tool.equals(that.tool) : !that.hasTool()) + && (this.hasEquippable() ? that.hasEquippable() && this.equippable.equals(that.equippable) : !that.hasEquippable()) && (this.hasJukeboxPlayable() ? that.hasJukeboxPlayable() && this.jukebox.equals(that.jukebox) : !that.hasJukeboxPlayable()) - && (this.hasDamage() ? that.hasDamage() && this.damage == that.damage : !that.hasDamage()) + && (Objects.equals(this.damage, that.damage)) // Paper - preserve empty/0 damage @@ -1363,9 +1354,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 && (this.canPlaceOnPredicates != null ? that.canPlaceOnPredicates != null && this.canPlaceOnPredicates.equals(that.canPlaceOnPredicates) : that.canPlaceOnPredicates == null) // Paper && (this.canBreakPredicates != null ? that.canBreakPredicates != null && this.canBreakPredicates.equals(that.canBreakPredicates) : that.canBreakPredicates == null) // Paper @@ -0,0 +0,0 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { - hash = 61 * hash + (this.hasFood() ? this.food.hashCode() : 0); hash = 61 * hash + (this.hasTool() ? this.tool.hashCode() : 0); hash = 61 * hash + (this.hasJukeboxPlayable() ? this.jukebox.hashCode() : 0); + hash = 61 * hash + (this.hasEquippable() ? this.equippable.hashCode() : 0); - hash = 61 * hash + (this.hasDamage() ? this.damage : 0); - hash = 61 * hash + (this.hasMaxDamage() ? 1231 : 1237); - hash = 61 * hash + (this.hasAttributeModifiers() ? this.attributeModifiers.hashCode() : 0); @@ -1607,9 +1598,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 private List customEffects; - private Color color; + private Integer color; // Paper - keep color component consistent with vanilla (top byte is ignored) + private String customName; CraftMetaPotion(CraftMetaItem meta) { - super(meta); @@ -0,0 +0,0 @@ class CraftMetaPotion extends CraftMetaItem implements PotionMeta { potionContents.customColor().ifPresent((customColor) -> { @@ -1625,9 +1616,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 Optional> defaultPotion = (this.hasBasePotionType()) ? Optional.of(CraftPotionType.bukkitToMinecraftHolder(this.type)) : Optional.empty(); - Optional potionColor = (this.hasColor()) ? Optional.of(this.color.asRGB()) : Optional.empty(); + Optional potionColor = (this.hasColor()) ? Optional.of(this.color) : Optional.empty(); // Paper + Optional customName = Optional.ofNullable(this.customName); List effectList = new ArrayList<>(); - if (this.customEffects != null) { @@ -0,0 +0,0 @@ class CraftMetaPotion extends CraftMetaItem implements PotionMeta { @Override @@ -2036,34 +2027,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + } + // Paper end - General ItemMeta Fixes } -diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/components/CraftFoodComponent.java b/src/main/java/org/bukkit/craftbukkit/inventory/components/CraftFoodComponent.java -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/org/bukkit/craftbukkit/inventory/components/CraftFoodComponent.java -+++ b/src/main/java/org/bukkit/craftbukkit/inventory/components/CraftFoodComponent.java -@@ -0,0 +0,0 @@ public final class CraftFoodComponent implements FoodComponent { - - @Override - public void setEatSeconds(float eatSeconds) { -+ Preconditions.checkArgument(eatSeconds > 0, "Eat seconds must be positive"); // Paper - validate eat_seconds - this.handle = new FoodProperties(this.handle.nutrition(), this.handle.saturation(), this.handle.canAlwaysEat(), eatSeconds, this.handle.usingConvertsTo(), this.handle.effects()); - } - -@@ -0,0 +0,0 @@ public final class CraftFoodComponent implements FoodComponent { - - @Override - public void setUsingConvertsTo(ItemStack item) { -+ Preconditions.checkArgument(item == null || !item.isEmpty(), "Item cannot be empty"); // Paper - validate using_converts_to - this.handle = new FoodProperties(this.handle.nutrition(), this.handle.saturation(), this.handle.canAlwaysEat(), this.handle.eatSeconds(), Optional.ofNullable(item).map(CraftItemStack::asNMSCopy), this.handle.effects()); - } - -@@ -0,0 +0,0 @@ public final class CraftFoodComponent implements FoodComponent { - - @Override - public FoodEffect addEffect(PotionEffect effect, float probability) { -+ Preconditions.checkArgument(0 <= probability && probability <= 1, "Probability cannot be outside range [0,1]"); // Paper - List effects = new ArrayList<>(this.handle.effects()); - - FoodProperties.PossibleEffect newEffect = new net.minecraft.world.food.FoodProperties.PossibleEffect(CraftPotionUtil.fromBukkit(effect), probability); diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/components/CraftToolComponent.java b/src/main/java/org/bukkit/craftbukkit/inventory/components/CraftToolComponent.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/components/CraftToolComponent.java diff --git a/patches/unapplied/server/More-Chest-Block-API.patch b/patches/server/More-Chest-Block-API.patch similarity index 92% rename from patches/unapplied/server/More-Chest-Block-API.patch rename to patches/server/More-Chest-Block-API.patch index 6ad51e1d0c..76b94fe1e3 100644 --- a/patches/unapplied/server/More-Chest-Block-API.patch +++ b/patches/server/More-Chest-Block-API.patch @@ -11,14 +11,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/net/minecraft/world/level/block/EnderChestBlock.java +++ b/src/main/java/net/minecraft/world/level/block/EnderChestBlock.java @@ -0,0 +0,0 @@ public class EnderChestBlock extends AbstractChestBlock i - BlockEntity blockEntity = world.getBlockEntity(pos); - if (playerEnderChestContainer != null && blockEntity instanceof EnderChestBlockEntity) { + PlayerEnderChestContainer playerEnderChestContainer = player.getEnderChestInventory(); + if (playerEnderChestContainer != null && world.getBlockEntity(pos) instanceof EnderChestBlockEntity enderChestBlockEntity) { BlockPos blockPos = pos.above(); - if (world.getBlockState(blockPos).isRedstoneConductor(world, blockPos)) { + if (world.getBlockState(blockPos).isRedstoneConductor(world, blockPos)) { // Paper - diff on change; make sure that EnderChest#isBlocked uses the same logic - return InteractionResult.sidedSuccess(world.isClientSide); - } else if (world.isClientSide) { return InteractionResult.SUCCESS; + } else { + if (world instanceof ServerLevel serverLevel) { diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftChest.java b/src/main/java/org/bukkit/craftbukkit/block/CraftChest.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftChest.java diff --git a/patches/unapplied/server/Prevent-NPE-if-hooked-entity-was-cleared.patch b/patches/server/Prevent-NPE-if-hooked-entity-was-cleared.patch similarity index 100% rename from patches/unapplied/server/Prevent-NPE-if-hooked-entity-was-cleared.patch rename to patches/server/Prevent-NPE-if-hooked-entity-was-cleared.patch diff --git a/patches/unapplied/server/Prevent-sending-oversized-item-data-in-equipment-and.patch b/patches/server/Prevent-sending-oversized-item-data-in-equipment-and.patch similarity index 100% rename from patches/unapplied/server/Prevent-sending-oversized-item-data-in-equipment-and.patch rename to patches/server/Prevent-sending-oversized-item-data-in-equipment-and.patch diff --git a/patches/unapplied/server/Print-data-component-type-on-encoding-error.patch b/patches/server/Print-data-component-type-on-encoding-error.patch similarity index 100% rename from patches/unapplied/server/Print-data-component-type-on-encoding-error.patch rename to patches/server/Print-data-component-type-on-encoding-error.patch diff --git a/patches/unapplied/server/Properly-remove-the-experimental-smithing-inventory-.patch b/patches/server/Properly-remove-the-experimental-smithing-inventory-.patch similarity index 100% rename from patches/unapplied/server/Properly-remove-the-experimental-smithing-inventory-.patch rename to patches/server/Properly-remove-the-experimental-smithing-inventory-.patch diff --git a/patches/unapplied/server/Suspicious-Effect-Entry-API.patch b/patches/server/Suspicious-Effect-Entry-API.patch similarity index 99% rename from patches/unapplied/server/Suspicious-Effect-Entry-API.patch rename to patches/server/Suspicious-Effect-Entry-API.patch index a808a5b965..c2bbb45c25 100644 --- a/patches/unapplied/server/Suspicious-Effect-Entry-API.patch +++ b/patches/server/Suspicious-Effect-Entry-API.patch @@ -47,7 +47,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 return true; } @@ -0,0 +0,0 @@ public class CraftMushroomCow extends CraftCow implements MushroomCow, io.paperm - this.getHandle().setVariant(net.minecraft.world.entity.animal.MushroomCow.MushroomType.values()[variant.ordinal()]); + this.getHandle().setVariant(net.minecraft.world.entity.animal.MushroomCow.Variant.values()[variant.ordinal()]); } + // Paper start diff --git a/patches/unapplied/server/check-if-itemstack-is-stackable-first.patch b/patches/server/check-if-itemstack-is-stackable-first.patch similarity index 100% rename from patches/unapplied/server/check-if-itemstack-is-stackable-first.patch rename to patches/server/check-if-itemstack-is-stackable-first.patch