FancyCrafting (定制合成-简单易用的开发API)
FancyCrafting是专为开发者设计的易于使用的API,可利用自定义形状\/无形状的配方与nbt\/纹理\/元数据\/附魔等功能。
功能:
- 支持定制的形状配方和无形状配方
- 可以指定物品出现的概率
- 支持Vanilla合成表和自定义合成表
- 提供Deluxe Menus界面实现
配置:
- 安装:请将插件放入 "plugins" 文件夹中
- 定制配方:可使用命令 "fancycrafting.admin.create" 打开 GUI 创建新的自定义配方
用法:
#### Shaped Recipe
java
import de.ancash.fancycrafting.recipe.IShapedRecipe;
import de.ancash.fancycrafting.base.AbstractFancyCrafting;
ItemStack[] ingredientsArray = new ItemStack[]{...}; // 物品配方
ItemStack result = new ItemStack(...); // 配方结果
IShapedRecipe shapedRecipe = new IShapedRecipe(ingredientsArray, width, height, result, "名称", UUID.randomUUID());
AbstractFancyCrafting.registerRecipe(shapedRecipe);
#### Shapeless Recipe
java
import de.ancash.fancycrafting.recipe.IShapelessRecipe;
import de.ancash.fancycrafting.base.AbstractFancyCrafting;
ItemStack[] ingredientsArray = new ItemStack[]{...}; // 物品配方
ItemStack result = new ItemStack(...); // 配方结果
IShapelessRecipe shapelessRecipe = new IShapelessRecipe(Arrays.asList(ingredientsArray), result, "名称", UUID.randomUUID());
AbstractFancyCrafting.registerRecipe(shapelessRecipe);
#### Random Shaped Recipe
java
import de.ancash.fancycrafting.recipe.IRandomShapedRecipe;
import de.ancash.fancycrafting.base.AbstractFancyCrafting;
Map
probMap.put(new ItemStack(...), 1);
// 其他参数同上
IRandomShapedRecipe randomShapedRecipe = new IRandomShapedRecipe(ingredientsArray, width, height, result, "名称", UUID.randomUUID(), probMap);
AbstractFancyCrafting.registerRecipe(randomShapedRecipe);
#### Random Shapeless Recipe
java
import de.ancash.fancycrafting.recipe.IRandomShapelessRecipe;
import de.ancash.fancycrafting.base.AbstractFancyCrafting;
Map
probMap.put(new ItemStack(...), 1);
// 其他参数同上
IRandomShapelessRecipe randomShapelessRecipe = new IRandomShapelessRecipe(Arrays.asList(ingredientsArray), result, "名称", UUID.randomUUID(), probMap);
AbstractFancyCrafting.registerRecipe(randomShapelessRecipe);
权限:
- fancyCrafting.admin.reload: 重载配方和配置文件
- fancyCrafting.admin.create: 创建新的自定义配方
- fancyCrafting.admin.edit: 编辑自定义配方
- fancyCrafting.admin.view: 查看所有配方
- fancyCrafting.qc: 快速合成
- fancyCrafting.open: 打开默认GUI
附加资源链接:
- ILibrary 插件: [ILibrary](
- NBTNexus 插件: [NBTNexus](
收录



