diff --git a/src/main/java/com/extendedae_plus/client/event/CtrlQPatternKeyHandler.java b/src/main/java/com/extendedae_plus/client/event/CtrlQPatternKeyHandler.java index f377c6c..02dece3 100644 --- a/src/main/java/com/extendedae_plus/client/event/CtrlQPatternKeyHandler.java +++ b/src/main/java/com/extendedae_plus/client/event/CtrlQPatternKeyHandler.java @@ -336,6 +336,19 @@ public final class CtrlQPatternKeyHandler { private static void setLastProcessingNameFromRecipe(Object recipeBase) { String name = null; + + // 处理 RecipeHolder + if (recipeBase != null && "net.minecraft.world.item.crafting.RecipeHolder".equals(recipeBase.getClass().getName())) { + try { + var valueMethod = recipeBase.getClass().getMethod("value"); + Object actualRecipe = valueMethod.invoke(recipeBase); + if (actualRecipe != null) { + recipeBase = actualRecipe; + } + } catch (Throwable ignored) { + } + } + if (recipeBase instanceof Recipe recipe) { name = ExtendedAEPatternUploadUtil.mapRecipeTypeToSearchKey(recipe); } else if (recipeBase != null