介绍
介绍由机器翻译自 Modrinth 原页面,仅供参考。
KubeJS Mystical Agriculture
该项目有两个目标:替代 Mystical Customization,并为所有 Mystical Agriculture 配方类型添加支持。
借助此项目,你可以添加觉醒配方、附魔器配方、注魔配方、种子再处理器配方、灵魂提取配方和魂力刷怪笼配方。
此模组为作物和生物灵魂类型提供启动事件,可访问相应的注册表,因此你可以添加作物和生物灵魂。
添加配方
ServerEvents.recipes(event => {
const {awakening,enchanter,infusion,reprocessor,soul_extraction,soulium_spawner} = event.recipes.mysticalagriculture;
// awakening
awakening(
"minecraft:gold_ingot", // result
"minecraft:iron_ingot", // item in the middle
[
Item.of("minecraft:yellow_dye",40), // may contain count
Item.of("minecraft:yellow_dye",40),
Item.of("minecraft:yellow_dye",40),
Item.of("minecraft:yellow_dye",40)
], // items in essence vessels
[
"#minecraft;flowers",
"#minecraft;flowers",
"#minecraft;flowers",
"#minecraft;flowers",
] // items in pedestal
);
// enchanter
enchanter(
"minecraft:sharpness", //result enchantment which will be produced
[
Item.of("minecraft:flint",3),
Item.of("minecraft:iron_ingot",2)
] // array of 1-2 items may contain count
);
// infusion
infusion(
"minecraft:emerald", // result
"minecraft:diamond", // item in middle
[
Item.of("minecraft:green_dye",4) // count is unwrapped into multiple items
] // items in pedestals
);
// reprocessor
reprocessor(
"minecraft:iron_ingot", // result
"minecraft:compass" // input item
);
// soul extractor
// constructor 1
soul_extraction(
{
type:"mysticalagriculture:blaze",
souls:30
}, // mob souls
"minecraft:magma_cream" // input item
);
// constructor 2
soul_extraction(
"mysticalagriculture:zombie", // mob soul type
0.5, //souls count
"minecraft:diamond" // input item
);
// soulium spawner
soulium_spawner(
[
{
entity:"minecraft:zombie",
weight:100
},
{
entity:"minecraft:iron_golem",
// weight if not defined will be 1
}
], // entities
[
Item.of("minecraft:emerald",4) // may contain count
] // input items
);
});
添加作物
在 startup_scripts 中
MysticalAgricultureStartupEvents.crop(event => {
// here you can access the crop registry as event.registry
/* methods
void register(Crop crop);
void registerTier(CropTier tier);
void registerType(CropType type);
List<Crop> getCrops();
Crop getCropById(ResourceLocation id);
Crop getCropByName(String name);
List<CropTier> getTiers();
CropTier getTierById(ResourceLocation id);
List<CropType> getTypes();
CropType getTypeById(ResourceLocation id);
*/
// note that you can't unregister a crop but you can disable them
// to register a crop you need a Crop object
const kubium = new Crop(
"kubejs:kubium", // id of crop
"mysticalagriculture:5", // crop tier id or object
"mysticalagriculture:resource", // crop type id or object
new CropTextures(
"mysticalagriculture:block/flower_ingot",// flower texture
"mysticalagriculture:item/essence_ingot" // essence texture
// you may also set a texture for the seed by passing an extra argument
), // textures
"#forge:ingots/kubium" // ingredient, note that this is a custom object used by mystical agriculture so it must be either a tag or item
);
const red = new Crop(
"kubejs:red",
CropTier.ONE,
CropType.RESOURCE,
CropTextures.DUST_CROP_TEXTURES,
16711680,// color in decimal
"minecraft:red_dye"
);
// after creating crops register them
event.register(kubium);
red.setDisplayName(Text.ofString("RED").red());
event.register(red);
});
常见问题
KubeJS Mystical Agriculture 支持哪些 Minecraft 版本?
KubeJS Mystical Agriculture 支持 Minecraft Java 版 1.20.1,可用的加载器:Forge。下载时注意选择和你游戏版本一致的文件。
KubeJS Mystical Agriculture 怎么安装?
先用 PCL2 或 HMCL 启动器安装对应版本的 Forge,再把下载的 .jar 文件放进游戏目录的 mods 文件夹,重新启动游戏即可。开启了版本隔离的,mods 文件夹在 versions/版本名 下面。运行环境:客户端和服务端都要装。
评论
登录后评论和评分