PotionRecipeLib

模组

· 作者 Emafire003

为开发者提供的超级简单的药水制作 API

0 本站下载 0 关注 更新于 4 年前

最新 1.0.0 · 1.19 · Fabric / Quilt

一键开服(送7天)

药水配方 API

注意: 已归档,因为在较新版本的 Fabric API (FAPI) 中这已经是内置功能。

这个简单的 API 提供了一种制作酿造配方的简便方法。如果你只需要此功能,那么使用它即可;如果你还需要做其他事情,也可以看看 nbt-crafting API 或类似的东西。

这只是一个“高级”的调用器,仅此而已,所以你也可以自己创建它。

设置

将此库作为依赖项包含到你的 build.gradle 中:

repositories {
    maven {
        name = "Modrinth"
        url = "https://api.modrinth.com/maven"
        content {
            includeGroup "maven.modrinth"
        }
    }
}

dependencies {
    modImplementation "maven.modrinth:potionrecipes:<version>"
}

如果你希望将 API 包含在你的 jar 文件中,只需添加 include 字符串:

repositories {
    maven {
        name = "Modrinth"
        url = "https://api.modrinth.com/maven"
        content {
            includeGroup "maven.modrinth"
        }
    }
}

dependencies {
    modImplementation "maven.modrinth:potionrecipes:<version>"
    include "maven.modrinth:potionrecipes:<version>"
}

如何使用

只需调用:

BrewingRecipeRegister.registerPotionRecipe(Potion input, Item item, Potion output);

@param input 你希望开始的药水,通常是 Potions.AWKWARD 或你的自定义药水(即 YourPotions.POTION) @param item 你需要用于该药水的材料 @param output 你希望通过合成得到的结果药水

你可以查看我的 GlowfulWorld 模组中的示例。

许可证

本 API 采用 CC0 许可证提供。欢迎学习并将其融入你自己的项目中。

你是这个资源的作者?登录后可认领此资源。

评论 0

0.0
暂无评分
5 星
0
4 星
0
3 星
0
2 星
0
1 星
0
我的评分

登录后参与评分

还没有评论,来抢沙发吧

评论配图

相似资源