Custom Recipe API (CRAPI) 是一款让创建自定义合成配方变得极其简单的 API。它需要一定的编程知识,但如果你熟悉流程,下载后五分钟内即可开始制作配方。与 ItemCreatorPlus 搭配使用效果更佳。
现在可以通过指令 /crapi new 在游戏内通过一个易于使用的图形界面来创建配方。
/crapi book - 打开配方书。/crapi new - 打开配方创建界面。/crapi setworkbench - 编辑工作台配方。/crapi workbench - 查看工作台配方。/crapi give <player> <item> <amount> - 给予玩家一个自定义物品。/crapi items - 查看所有可给予的物品。crapi.commandcrapi.bookcrapi.giveitemcrapi.newcrapi.setworkbenchcrapi.viewworkbenchcrapi.craftcrapi.craft.item_permissioncrapi.op 权限并查看 /crapi book。crapi.craftallcrapi.give/crapi give 和 /crapi items 指令。crapi.opworkbenchtitle: "&e&lSpecial Crafting"
recipebook: "&e&lRecipe Book"
nextpage: "&e&lNext Page"
currentpage: "Current page"
previouspage: "&e&lPrevious Page"
customrecipeview: "&e&lCustom Recipe View"
customrecipecreator: "&e&lCustom Recipe Creator"
fullinv: "&cInventory is full. Cannot craft item."
invalidrecipe: "&cInvalid Recipe"
createrecipe: "&aCreate Custom Recipe"
toggleshapeless: "&9Toggle Shapeless Recipe"
shaped: "Shaped"
leftclicktoview: "&7Left click to view recipe."
rightclicktogive: "&7Right click to give yourself this item."
permission: "Permission"
backtomenu: "&cBack to Menu"
deleterecipe: "&cDelete Recipe"
cannotbeundone: "&7cannot be undone"
recipeview: "&7Recipe View"首先,你需要初始化合成工作台。必须选择发射器 (Dispenser) 作为工作台物品,但配方可以自定义。以下是一个示例:
ItemStack workbenchItem = new ItemStack(Material.DISPENSER);
ItemMeta meta = workbenchItem.getItemMeta();
meta.setDisplayName(ChatColor.YELLOW.toString() + ChatColor.BOLD.toString() + "Special Crafting");
workbenchItem.setItemMeta(meta);
ShapedRecipe workbenchRecipe = new ShapedRecipe(new NamespacedKey(main, "Workbench"), workbenchItem);
workbenchRecipe.shape("IGI", "GDG", "IGI");
workbenchRecipe.setIngredient('I', Material.IRON_BLOCK);
workbenchRecipe.setIngredient('G', Material.GLASS);
workbenchRecipe.setIngredient('D', Material.DIAMOND_BLOCK);
Bukkit.getServer().addRecipe(workbenchRecipe);
main.crapimanager.setWorkBench(workbenchRecipe);你可以为发射器自定义物品堆,并使用常规材料创建自定义配方(因为此配方需要在普通工作台中合成)。
ItemStack redstone = new ItemStack(Material.REDSTONE);
ItemStack quartz = new ItemStack(Material.QUARTZ);
ItemStack gold = new ItemStack(Material.GOLD_INGOT);
ItemStack storageCell = new ItemStack(Material.STONE_AXE);
CustomRecipeAPI.createRecipe(storageCell, redstone, quartz, redstone, quartz, gold, quartz, redstone, quartz, redstone);物品的摆放顺序如下:[1, 2, 3, 4, 5, 6, 7, 8, 9]。你可以放置空气 (Material.AIR) 或不放任何物品(仅在后续槽位都为空时有效)来留空槽位。
友情链接: 网易我的世界 | 泰拉瑞亚 | ocent云计算 | 米饭Minecraft插件文档 | 友链合作
历史访问人数:2,673,779 | 历史访问人次:3,241,696
今日访问人数:19,358 | 今日访问人次:22,674
昨日访问人数:30,655 | 昨日访问人次:36,381
Copyright © 2019-2026 我的世界服务器列表站. All rights reserved.
❤ Powered by GermMC 京ICP备17023959号-6