StonecutterInventory#setResult(ItemStack) is ignored in PlayerStonecutterRecipeSelectEvent
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 12.7k
- Forks
- 3.5k
- Avg merge
- 3d 13h
- Merged PRs (30d)
- 11
Description
Expected behavior
Since the PlayerStonecutterRecipeSelectEvent has a getStonecutterInventory method that returns a StonecutterInventory instance which has a setResult(ItemStack) method, I expect the result to be correctly set.
Observed/Actual behavior
The result is not set.
Steps/models to reproduce
Create a simple plugin with the PlayerStonecutterRecipeSelectEvent in use like this:
@EventHandler
public void onStoneCutter(PlayerStonecutterRecipeSelectEvent event) {
StonecutterInventory inventory = event.getStonecutterInventory();
StonecuttingRecipe recipe = event.getStonecuttingRecipe();
ItemStack result = recipe.getResult();
ItemStack newResult = result.withType(Material.BARRIER);
inventory.setResult(newResult);
}
Notice that the result does not change.
Plugin and Datapack List
Just the plugin I am currently making, no datapacks.
Paper version
This server is running Paper version 1.21.5-101-main@a033e3b (2025-05-25T07:31:15Z) (Implementing API version 1.21.5-R0.1-SNAPSHOT)
You are running the latest version
Previous version: 1.21.5-94-b70bca6 (MC: 1.21.5)
Other
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at PlayerStonecutterRecipeSelectEvent and the StonecutterInventory#setResult(ItemStack) path, then reproduce the behavior with the plugin example against the stated Paper version. Trace how the selected recipe result is applied and verify that changing the inventory result changes the stonecutter output.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100