Crafter PrepareItemCraftEvents always have null recipe #14428
Copy link
Copy link
Labels
status: acceptedDisputed bug is accepted as valid or Feature accepted as desired to be added.Disputed bug is accepted as valid or Feature accepted as desired to be added.version: 26.3Game version 26.3Game version 26.3
Description
Expected behavior
PrepareItemCraftEvent#getRecipe to return the recipe currently within the crafter.
Observed/Actual behavior
PrepareItemCraftEvent#getRecipe always returns null
Steps/models to reproduce
- Create a listener for the PrepareItemCraftEvent
- Setup recipes inside of a crafter menu
- Observe the result of getRecipe
Plugin and Datapack List
(recreated it with running the paper dev server & just adding a listener to log the recipe)
Paper version
(running with the latest commit 7f9c797)
Other
The root cause of this seems to be that the bukkit method CraftingInventory#getRecipe relies on the nms method CraftingContainer#getCurrentRecipe which defaults to returning null and CrafterBlockEntity does not override it.
Metadata
Metadata
Assignees
Labels
status: acceptedDisputed bug is accepted as valid or Feature accepted as desired to be added.Disputed bug is accepted as valid or Feature accepted as desired to be added.version: 26.3Game version 26.3Game version 26.3
Type
Fields
MC Issue
None yet
Activity