Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Crafter PrepareItemCraftEvents always have null recipe

未关闭
#14,428 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

@Doc94 已经在做这个了。

开始于 2026年10月28日。

  • #14429 来自 @Doc94 —— 未关闭

评估

难度
3/5
预计耗时
1-2 天
新手友好度
65/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
java
领域
api, backend

调研方向

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.

由索引模型根据 Issue 内容生成。

描述

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.

主要语言
Java
星标
12.8k
派生
3.6k
平均合并
4 天 13 小时
30 天内合并 PR
46

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

PaperMC/Paper 的其他 Issue

查看 PaperMC/Paper 的全部 Issue

相似的 Issue

更多 Java Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。