diff --git a/plugin/src/main/java/com/denizenscript/denizen/tags/core/ServerTagBase.java b/plugin/src/main/java/com/denizenscript/denizen/tags/core/ServerTagBase.java index 2091c07692..0530c43fc7 100644 --- a/plugin/src/main/java/com/denizenscript/denizen/tags/core/ServerTagBase.java +++ b/plugin/src/main/java/com/denizenscript/denizen/tags/core/ServerTagBase.java @@ -261,6 +261,22 @@ else if (recipe instanceof CookingRecipe) { return; } + // <--[tag] + // @attribute ]> + // @returns ItemTag + // @description + // Returns the item that a recipe will create when crafted. + // --> + if (attribute.startsWith("recipe_result") && attribute.hasContext(1)) { + NamespacedKey key = Utilities.parseNamespacedKey(attribute.getContext(1)); + Recipe recipe = NMSHandler.getItemHelper().getRecipeById(key); + if (recipe == null) { + return; + } + event.setReplacedObject(new ItemTag(recipe.getResult())); + return; + } + if (attribute.startsWith("scoreboard")) { Scoreboard board; String name = "main";