Skip to content

Update Improve exact choice recipe ingredients#13788

Merged
kennytv merged 3 commits intoPaperMC:mainfrom
Biquaternions:feat/recipes-patch
Apr 29, 2026
Merged

Update Improve exact choice recipe ingredients#13788
kennytv merged 3 commits intoPaperMC:mainfrom
Biquaternions:feat/recipes-patch

Conversation

@Biquaternions
Copy link
Copy Markdown
Contributor

@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
@kennytv kennytv force-pushed the feat/recipes-patch branch from 2a3e345 to b9f2543 Compare April 29, 2026 08:04
@kennytv kennytv enabled auto-merge (squash) April 29, 2026 08:04
@kennytv kennytv disabled auto-merge April 29, 2026 08:05
@kennytv kennytv enabled auto-merge (squash) April 29, 2026 08:06
@kennytv kennytv merged commit 174eab0 into PaperMC:main Apr 29, 2026
2 checks passed
@github-project-automation github-project-automation Bot moved this from Awaiting review to Merged in Paper PR Queue Apr 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Merged

Development

Successfully merging this pull request may close these issues.

4 participants