Skip to content

Feat: Batch Recipe (Un)Registration Methods#13945

Open
JustAHuman-xD wants to merge 3 commits into
PaperMC:mainfrom
JustAHuman-xD:feat/batch-recipe-registration
Open

Feat: Batch Recipe (Un)Registration Methods#13945
JustAHuman-xD wants to merge 3 commits into
PaperMC:mainfrom
JustAHuman-xD:feat/batch-recipe-registration

Conversation

@JustAHuman-xD

Copy link
Copy Markdown
Contributor

Adds a few methods for batch registering & unregistering recipes to save on a LOT of tick time (and bandwidth when players are online) when compared to doing tons of add/remove recipe calls.

Also adds a hasRecipe method to avoid converting a bukkit recipe when its unnecessary.

In order to do this I extracted the creation of the minecraft recipe classes from the existing CraftRecipe#addToRecipeManager method to a new CraftRecipe#toMinecraftRecipe method, for use by the new methods. I also extracted the conversion of the bukkit recipe classes to the craft recipe classes to CraftRecipe.

In terms of performance improvements I was implementing this solution manually for a plugin I work on here: pylonmc/rebar#827 where you can see the differences

@JustAHuman-xD JustAHuman-xD requested a review from a team as a code owner June 8, 2026 18:12
@github-project-automation github-project-automation Bot moved this to Awaiting review in Paper PR Queue Jun 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Awaiting review

Development

Successfully merging this pull request may close these issues.

1 participant