PluginBugs / Issues-ItemsAdder

Repository used to keep track of issues of my plugin ItemsAdder
https://itemsadder.devs.beer
54 stars 21 forks source link

Optimize recipes reloading #4134

Closed LoneDev6 closed 2 days ago

LoneDev6 commented 2 days ago

Avoid removing and adding recipes in the Minecraft registry (using the Bukkit API) if the recipe didn't change and wasn't removed on /iareload.

NOTE: Cache the recipes ever registered since startup as the method Bukkit.getRecipe(...) returns a new different recipe wrapper each time you call it. This also fucks up recipe patterns returning patterns as abc, def, ghi, for some reason. So instead of Bukkit.getRecipe(...) I use my own method.