PaperMC/Paper

`RecipeIterator` fixes seemingly missing

tal5 opened this issue · 2 comments

tal5 commented

Expected behavior

Paper had some fixes to the recipe iterator API, as it was broken on Spigot

Observed/Actual behavior

The recipe iterator fixes (https://github.com/PaperMC/Paper/blob/ver/1.20.4/patches/server/0663-Fix-removing-recipes-from-RecipeIterator.patch) seem to be missing on 1.20.5/6+ as far as I can see

Steps/models to reproduce

Iterator<Recipe> iterator = Bukkit.recipeIterator();
while (iterator.hasNext()) {
    if (iterator.next() instanceof Keyed keyed && keyed.key().asString().equals("minecraft:wooden_sword")) {
        iterator.remove();
    }
}
getLogger().info("Recipe: " + Bukkit.getRecipe(NamespacedKey.minecraft("wooden_sword")));

Works on 1.20.4, fails on 1.20.6

Plugin and Datapack List

> plugins
[22:51:52 INFO]: Server Plugins (1):
[22:51:52 INFO]: Bukkit Plugins:
[22:51:52 INFO]:  - PaperTestPlugin
> datapack list
[22:52:12 INFO]: There are 3 data pack(s) enabled: [vanilla (built-in)], [file/bukkit (world)], [paper (built-in)]
[22:52:12 INFO]: There are no more data packs available

Paper version

[22:41:47 INFO]: Checking version, please wait...
[22:41:48 INFO]: This server is running Paper version 1.20.6-139-master@79e2cb6 (2024-06-13T14:55:37Z) (Implementing API version 1.20.6-R0.1-SNAPSHOT)
You are running the latest version

Other

Not sure if it was removed intentionally? as far as I can see the API doesn't seem to work currently

Replicable 👍

Closed by #10887