diff --git a/patches/server/Add-Velocity-IP-Forwarding-Support.patch b/patches/server/Add-Velocity-IP-Forwarding-Support.patch index be95337bf8..6b3965c3bd 100644 --- a/patches/server/Add-Velocity-IP-Forwarding-Support.patch +++ b/patches/server/Add-Velocity-IP-Forwarding-Support.patch @@ -54,7 +54,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + public static final int MODERN_FORWARDING_WITH_KEY_V2 = 3; + public static final int MODERN_LAZY_SESSION = 4; + public static final byte MAX_SUPPORTED_FORWARDING_VERSION = MODERN_LAZY_SESSION; -+ public static final ResourceLocation PLAYER_INFO_CHANNEL = new ResourceLocation("velocity", "player_info"); ++ public static final ResourceLocation PLAYER_INFO_CHANNEL = ResourceLocation.fromNamespaceAndPath("velocity", "player_info"); + + public static boolean checkIntegrity(final FriendlyByteBuf buf) { + final byte[] signature = new byte[32]; diff --git a/patches/server/Adventure.patch b/patches/server/Adventure.patch index d9b325c5fb..e6178e88e8 100644 --- a/patches/server/Adventure.patch +++ b/patches/server/Adventure.patch @@ -705,7 +705,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + +@DefaultQualifier(NonNull.class) +public final class ChatProcessor { -+ static final ResourceKey<ChatType> PAPER_RAW = ResourceKey.create(Registries.CHAT_TYPE, new ResourceLocation(ResourceLocation.PAPER_NAMESPACE, "raw")); ++ static final ResourceKey<ChatType> PAPER_RAW = ResourceKey.create(Registries.CHAT_TYPE, ResourceLocation.fromNamespaceAndPath(ResourceLocation.PAPER_NAMESPACE, "raw")); + static final String DEFAULT_LEGACY_FORMAT = "<%1$s> %2$s"; // copied from PlayerChatEvent/AsyncPlayerChatEvent + final MinecraftServer server; + final ServerPlayer player; @@ -1310,7 +1310,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + // Key + + public static ResourceLocation asVanilla(final Key key) { -+ return new ResourceLocation(key.namespace(), key.value()); ++ return ResourceLocation.fromNamespaceAndPath(key.namespace(), key.value()); + } + + public static ResourceLocation asVanillaNullable(final Key key) { diff --git a/patches/server/Expose-isFuel-and-canSmelt-methods-to-FurnaceInvento.patch b/patches/server/Expose-isFuel-and-canSmelt-methods-to-FurnaceInvento.patch index b2845a01ec..ca4f3b8051 100644 --- a/patches/server/Expose-isFuel-and-canSmelt-methods-to-FurnaceInvento.patch +++ b/patches/server/Expose-isFuel-and-canSmelt-methods-to-FurnaceInvento.patch @@ -22,7 +22,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + public boolean canSmelt(ItemStack stack) { + // data packs are always loaded in the main world + net.minecraft.server.level.ServerLevel world = ((org.bukkit.craftbukkit.CraftWorld) org.bukkit.Bukkit.getWorlds().get(0)).getHandle(); -+ return stack != null && !stack.getType().isEmpty() && world.getRecipeManager().getRecipeFor(((AbstractFurnaceBlockEntity) this.inventory).recipeType, new net.minecraft.world.SimpleContainer(CraftItemStack.asNMSCopy(stack)), world).isPresent(); ++ return stack != null && !stack.getType().isEmpty() && world.getRecipeManager().getRecipeFor(((AbstractFurnaceBlockEntity) this.inventory).recipeType, new net.minecraft.world.item.crafting.SingleRecipeInput(CraftItemStack.asNMSCopy(stack)), world).isPresent(); + } + // Paper end + diff --git a/patches/server/Implement-furnace-cook-speed-multiplier-API.patch b/patches/server/Implement-furnace-cook-speed-multiplier-API.patch index 8f99cc1d0b..a305cb48de 100644 --- a/patches/server/Implement-furnace-cook-speed-multiplier-API.patch +++ b/patches/server/Implement-furnace-cook-speed-multiplier-API.patch @@ -83,7 +83,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 - private static int getTotalCookTime(Level world, AbstractFurnaceBlockEntity furnace) { - if (world == null) return 200; // CraftBukkit - SPIGOT-4302 -+ private static int getTotalCookTime(@Nullable Level world, RecipeType<? extends AbstractCookingRecipe> recipeType, AbstractFurnaceBlockEntity furnace, double cookSpeedMultiplier) { // Paper - cook speed multiplier API ++ public static int getTotalCookTime(@Nullable Level world, RecipeType<? extends AbstractCookingRecipe> recipeType, AbstractFurnaceBlockEntity furnace, double cookSpeedMultiplier) { // Paper - cook speed multiplier API SingleRecipeInput singlerecipeinput = new SingleRecipeInput(furnace.getItem(0)); - return (Integer) furnace.quickCheck.getRecipeFor(singlerecipeinput, world).map((recipeholder) -> { diff --git a/patches/server/Missing-Entity-API.patch b/patches/server/Missing-Entity-API.patch index d26f972cdb..af1974105b 100644 --- a/patches/server/Missing-Entity-API.patch +++ b/patches/server/Missing-Entity-API.patch @@ -1393,7 +1393,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + + @Override + public boolean canTravelThroughPortals() { -+ return getHandle().canChangeDimensions(); ++ return getHandle().canChangeDimensions(null, null); // Only used by the enderpearl... right now + } + + @Override diff --git a/patches/server/More-PotionEffectType-API.patch b/patches/server/More-PotionEffectType-API.patch index 62b16f7d78..29671035df 100644 --- a/patches/server/More-PotionEffectType-API.patch +++ b/patches/server/More-PotionEffectType-API.patch @@ -24,7 +24,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + attributeMap.put( + org.bukkit.craftbukkit.attribute.CraftAttribute.minecraftHolderToBukkit(attribute), + // use zero as amplifier to get the base amount, as it is amount = base * (amplifier + 1) -+ org.bukkit.craftbukkit.attribute.CraftAttributeInstance.convert(attributeModifier.create(this.handle.getDescriptionId(), 0)) ++ org.bukkit.craftbukkit.attribute.CraftAttributeInstance.convert(attributeModifier.create(0)) + ); + }); + return java.util.Map.copyOf(attributeMap); @@ -35,7 +35,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + com.google.common.base.Preconditions.checkArgument(effectAmplifier >= 0, "effectAmplifier must be greater than or equal to 0"); + Holder<net.minecraft.world.entity.ai.attributes.Attribute> nmsAttribute = org.bukkit.craftbukkit.attribute.CraftAttribute.bukkitToMinecraftHolder(attribute); + com.google.common.base.Preconditions.checkArgument(this.handle.attributeModifiers.containsKey(nmsAttribute), attribute + " is not present on " + this.getKey()); -+ return this.handle.attributeModifiers.get(nmsAttribute).create(this.handle.getDescriptionId(), effectAmplifier).amount(); ++ return this.handle.attributeModifiers.get(nmsAttribute).create(effectAmplifier).amount(); + } + + @Override diff --git a/patches/server/Paper-config-files.patch b/patches/server/Paper-config-files.patch index 9f6f231ea8..89e638d572 100644 --- a/patches/server/Paper-config-files.patch +++ b/patches/server/Paper-config-files.patch @@ -3753,7 +3753,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + ) + .addVersion(26, ConfigurationTransformation.builder().addAction(path("alt-item-despawn-rate", "items", ConfigurationTransformation.WILDCARD_OBJECT), (path, value) -> { + String itemName = path.get(path.size() - 1).toString(); -+ final Optional<Holder.Reference<Item>> item = BuiltInRegistries.ITEM.getHolder(ResourceKey.create(Registries.ITEM, new ResourceLocation(itemName.toLowerCase(Locale.ROOT)))); ++ final Optional<Holder.Reference<Item>> item = BuiltInRegistries.ITEM.getHolder(ResourceKey.create(Registries.ITEM, ResourceLocation.parse(itemName.toLowerCase(Locale.ROOT)))); + if (item.isEmpty()) { + itemName = Material.valueOf(itemName).getKey().getKey(); + } @@ -3785,7 +3785,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + Map<String, Integer> rebuild = new HashMap<>(); + value.childrenMap().forEach((key, node) -> { + String itemName = key.toString(); -+ final Optional<Holder.Reference<Item>> itemHolder = BuiltInRegistries.ITEM.getHolder(ResourceKey.create(Registries.ITEM, new ResourceLocation(itemName.toLowerCase(Locale.ROOT)))); ++ final Optional<Holder.Reference<Item>> itemHolder = BuiltInRegistries.ITEM.getHolder(ResourceKey.create(Registries.ITEM, ResourceLocation.parse(itemName.toLowerCase(Locale.ROOT)))); + final @Nullable String item; + if (itemHolder.isEmpty()) { + final @Nullable Material bukkitMat = Material.matchMaterial(itemName); diff --git a/patches/unapplied/server/Suspicious-Effect-Entry-API.patch b/patches/server/Suspicious-Effect-Entry-API.patch similarity index 100% rename from patches/unapplied/server/Suspicious-Effect-Entry-API.patch rename to patches/server/Suspicious-Effect-Entry-API.patch 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 diff --git a/patches/unapplied/server/disable-forced-empty-world-ticks.patch b/patches/server/disable-forced-empty-world-ticks.patch similarity index 100% rename from patches/unapplied/server/disable-forced-empty-world-ticks.patch rename to patches/server/disable-forced-empty-world-ticks.patch