PaperMC / PaperMC/Paper

copyDataComponents on SmithingTransformRecipe is not working as intended

Open
#13,304 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

status: accepted version: 1.21.10
Dominant language
Java
Stars
12.7k
Forks
3.5k
Avg merge
3d 13h
Merged PRs (30d)
11

Description

Expected behavior

According to javadocs, setting copyDataComponents parameter to false should prevent components to be copied from the base item, to the recipe result.

https://jd.papermc.io/paper/1.21.10/org/bukkit/inventory/SmithingTransformRecipe.html#%3Cinit%3E(org.bukkit.NamespacedKey,org.bukkit.inventory.ItemStack,org.bukkit.inventory.RecipeChoice,org.bukkit.inventory.RecipeChoice,org.bukkit.inventory.RecipeChoice,boolean)

Observed/Actual behavior

Setting this copyDataComponents to false makes no visible effect. Components from the base item are still copied to the recipe result.

Image Image
Steps/models to reproduce
  1. Create and register new SmithingTransformRecipe, where copyDataComponents is set to false.
  2. See that components from base item are still copied to the recipe result.
new SmithingTransformRecipe(NamespacedKey.fromString("example:diamond_pickaxe_from_smithing"), ItemStack.of(Material.DIAMOND_PICKAXE), RecipeChoice.empty(), new RecipeChoice.MaterialChoice(Material.IRON_PICKAXE), new RecipeChoice.MaterialChoice(Material.DIAMOND), false);
Plugin and Datapack List

none

Paper version
[22:09:32 INFO]: Checking version, please wait...
[22:09:32 INFO]: This server is running Paper version 1.21.10-108-main@97452e1 (2025-11-10T18:27:52Z) (Implementing API version 1.21.10-R0.1-SNAPSHOT)
You are running the latest version
Previous version: 1.21.10-105-1f31ee5 (MC: 1.21.10)
Other

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the SmithingTransformRecipe constructor and its copyDataComponents parameter, using the Java reproduction in the issue to observe the result. Verify whether setting the parameter to false prevents components from the base item from appearing in the recipe result; the issue is resolved when this behavior matches the javadocs.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api, game-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.