Crafter PrepareItemCraftEvents always have null recipe

Aperta
#14,428 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@Doc94 ci sta già lavorando.

Dal 28/10/2026.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
65/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
java
Ambito
api, backend

Direzione di ricerca

Start from the Bukkit CraftingInventory#getRecipe path and trace how it calls CraftingContainer#getCurrentRecipe for a crafter. The issue identifies CrafterBlockEntity as the missing override; check nearby recipe handling and tests for this block entity. Done means PrepareItemCraftEvent#getRecipe returns the recipe in the crafter menu instead of null.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

status: accepted version: 26.3
Expected behavior

PrepareItemCraftEvent#getRecipe to return the recipe currently within the crafter.

Observed/Actual behavior

PrepareItemCraftEvent#getRecipe always returns null

Steps/models to reproduce
  1. Create a listener for the PrepareItemCraftEvent
  2. Setup recipes inside of a crafter menu
  3. Observe the result of getRecipe
Plugin and Datapack List
Image Image

(recreated it with running the paper dev server & just adding a listener to log the recipe)

Paper version
Image (running with the latest commit 7f9c79794e16e8fb13582e66ae38c4cf074481cf)
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.

Lingua principale
Java
Stelle
12.8k
Fork
3.6k
Merge medio
2g 16h
PR unite (30g)
40

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di PaperMC/Paper

Tutte le issue di PaperMC/Paper

Issue simili

Altre issue su Java

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.