Skip to content

Update Improve exact choice recipe ingredients#13788

Open
Biquaternions wants to merge 2 commits intoPaperMC:mainfrom
Biquaternions:feat/recipes-patch
Open

Update Improve exact choice recipe ingredients#13788
Biquaternions wants to merge 2 commits intoPaperMC:mainfrom
Biquaternions:feat/recipes-patch

Conversation

@Biquaternions
Copy link
Copy Markdown

@Biquaternions Biquaternions commented Apr 13, 2026

This PR updates the last remaining feature patch to 26.1

I'd personally pay close attention to the following two parts when reviewing this PR:

  1. io.papermc.paper.inventory.recipe.ItemOrExact#getMaxStackSize
  2. net.minecraft.world.item.crafting.Ingredient#display

As for 1, I took the code from net.minecraft.world.item.Item#getDefaultMaxStackSize, which is how vanilla is handling the max stack size now.
As for 2, the record constructor net.minecraft.world.item.crafting.display.SlotDisplay.ItemStackSlotDisplay no longer expects an ItemStack, but an ItemStackTemplate instead. I took as reference the code at org.bukkit.craftbukkit.inventory.CraftItemStack#asTemplate. In theory itemstacks at this point in the code should not be empty. An alternative approach would be to use SlotDisplay.ItemSlotDisplay instead should that be a concern, or create a helper method that creates templates considering the possibility of empty items.

@Biquaternions Biquaternions requested a review from a team as a code owner April 13, 2026 19:54
@github-project-automation github-project-automation Bot moved this to Awaiting review in Paper PR Queue Apr 13, 2026
Comment thread paper-server/patches/features/0031-Improve-exact-choice-recipe-ingredients.patch Outdated
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.

2 participants