{bbname}

搬砖狐 | Alicia 发表于 2025-8-10 18:12:47

KubeJS Mystical Agriculture (KubeJS神秘农业)-MOD模组

KubeJS Mystical Agriculture (KubeJS神秘农业)Github |相关wiki |源站链接支持: forgeKubeJS的插件,为所有神秘农业配方类型添加支持,并用于创建生物灵魂和作物。无需神秘定制https://i.sodamc.com/modrinth/MmFaYMo9SD.jpg

该项目有两个目标,替代神秘定制和添加对所有神秘农业配方类型的支持。

通过该项目,您可以添加觉醒配方、附魔师配方、注入配方、种子重处理配方、灵魂提取配方和灵魂干扰器配方。

该模组具有作物和生物灵魂类型的启动事件,允许访问相应的注册表,这意味着您可以添加作物和生物灵魂。

添加配方

以下是添加配方的示例:

ServerEvents.recipes(event => {
const {awakening,enchanter,infusion,reprocessor,soul_extraction,soulium_spawner} = event.recipes.mysticalagriculture;

    // 觉醒
    awakening(
      \"minecraft:gold_ingot\", // 结果
      \"minecraft:iron_ingot\", // 中间的物品
      [
            Item.of(\"minecraft:yellow_dye\",40), // 可能包含计数
            Item.of(\"minecraft:yellow_dye\",40),
            Item.of(\"minecraft:yellow_dye\",40),
            Item.of(\"minecraft:yellow_dye\",40)
      ], // 精华容器中的物品
      [
            \"#minecraft;flowers\",
            \"#minecraft;flowers\",
            \"#minecraft;flowers\",
            \"#minecraft;flowers\",
      ] // 底座上的物品
    );
    // 附魔师
    enchanter(
      \"minecraft:sharpness\", // 将产生的附魔结果
      [
            Item.of(\"minecraft:flint\",3),
            Item.of(\"minecraft:iron_ingot\",2)
      ] // 1-2个物品的数组,可能包含计数
    );
    // 注入
    infusion(
      \"minecraft:emerald\", // 结果
      \"minecraft:diamond\", // 中间的物品
      [
            Item.of(\"minecraft:green_dye\",4) // 计数被解包成多个物品
      ] // 底座上的物品
    );
    // 重处理
    reprocessor(
      \"minecraft:iron_ingot\", // 结果
      \"minecraft:compass\" // 输入物品
    );
    // 灵魂提取器
    // 构造函数 1
    soul_extraction(
      {
            type:\"mysticalagriculture:blaze\",
            souls:30
      }, // 生物灵魂
      \"minecraft:magma_cream\" // 输入物品
    );
    // 构造函数 2
    soul_extraction(
      \"mysticalagriculture:zombie\", // 生物灵魂类型
      0.5, // 灵魂数量
      \"minecraft:diamond\" // 输入物品
    );
    // 灵魂干扰器
    soulium_spawner(
      [
            {
                entity:\"minecraft:zombie\",
                weight:100
            },
            {
                entity:\"minecraft:iron_golem\",
                // 未定义权重将为1
            }
      ], // 生物实体
      [
            Item.of(\"minecraft:emerald\",4) // 可能包含计数
      ] // 输入物品
    );
});Copy已复制!

添加作物

在启动脚本中添加作物:

MysticalAgricultureStartupEvents.crop(event => {
    // 在此您可以访问作物注册表,即event.registry
    /* 方法
    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);
    */
    // 请注意,您无法注销作物,但可以禁用它们
    // 要注册作物,您需要一个作物对象
    const kubium = new Crop(
      \"kubejs:kubium\", // 作物ID
      \"mysticalagriculture:5\", // 作物等级ID或对象
      \"mysticalagriculture:resource\", // 作物类型ID或对象
      new CropTextures(
            \"mysticalagriculture:block/flower_ingot\",// 花的纹理
            \"mysticalagriculture:item/essence_ingot\" // 精华的纹理
            // 您也可以通过传递额外的参数来设置种子的纹理
      ), // 纹理
      \"#forge:ingots/kubium\" // 成分,注意这是神秘农业使用的自定义对象,因此必须是标签或物品
    );
    const red = new Crop(
      \"kubejs:red\",
      CropTier.ONE,
      CropType.RESOURCE,
      CropTextures.DUST_CROP_TEXTURES,
      16711680,// 十进制颜色
      \"minecraft:red_dye\"
    );
    // 创建作物后,请注册它们
    event.register(kubium);
    red.setDisplayName(Text.ofString(\"RED\").red());
    event.register(red);
});Copy已复制!

项目矩阵房间:https://matrix.to/#/!JWjgXbzJNbNspnvzKJ:matrix.org?via=matrix.org]链接!JWjgXbzJNbNspnvzKJ:matrix.org?via=matrix.org

来自Modrinth所有游戏版本1.20.1所有类型forgeKubeJS Mystical Agriculture 0.1.0kubejs_mystical_agriculture-0.1.0.jar下载0.1.0#ReleaseLaunched with support for awakening, enchanter, infusion, reprocessor, soul extraction and soulium spawner recipes. Also has startup events to use both the crop registry and the mob soul type registry展开版本: 0.1.0支持游戏: 1.20.1类型:ForgeRelease下载次数: 5,411全部版本

markdown_parsed

文章类型:收录

layui.use([\'form\'], function(){
var form = layui.form;
});

**** Hidden Message ***** KubeJS Mystical Agriculture

萨达说 发表于 2026-7-5 11:27:56

1111111111
页: [1]
查看完整版本: KubeJS Mystical Agriculture (KubeJS神秘农业)-MOD模组