介绍
Potion Recipes API
Note: Archived, since in newer version of FAPI this is already a thing
This simple API provides a simple way to make brewing recipes. If this is all you need, good use this, if you also need to do something else you may look also at nbt-crafting api or something like that.
This is just a “fancy” invoker, nothing less nothing more, so you could just create your own.
Setup
Include this library into your build.gradle as a dependency
repositories {
maven {
name = "Modrinth"
url = "https://api.modrinth.com/maven"
content {
includeGroup "maven.modrinth"
}
}
}
dependencies {
modImplementation "maven.modrinth:potionrecipes:<version>"
}
If you want you can include the API in your jar file by adding only the include string:
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>"
}
How to use it
Simply call
BrewingRecipeRegister.registerPotionRecipe(Potion input, Item item, Potion output);
@param input The potion you want to start from, usually Potions.AWKWARD or your custom potion (which is going to be YourPotions.POTION)
@param item The ingredient you need for your potion
@param output The potion you want to have as a result of the crafting
For an example you can look into my mod.
License
This API is available under the CC0 license. Feel free to learn from it and incorporate it in your own projects.
常见问题
PotionRecipeLib 支持哪些 Minecraft 版本?
PotionRecipeLib 支持 Minecraft Java 版 1.17–1.19,共 6 个版本,可用的加载器:Fabric / Quilt。下载时注意选择和你游戏版本一致的文件。
PotionRecipeLib 怎么安装?
先用 PCL2 或 HMCL 启动器安装对应版本的 Fabric / Quilt,再把下载的 .jar 文件放进游戏目录的 mods 文件夹,重新启动游戏即可。开启了版本隔离的,mods 文件夹在 versions/版本名 下面。运行环境:仅服务端。
Emafire003 的其他作品
查看全部 →OhMyMeteors
一款现代风格的模组,带来从天而降的流星与陨石!
ColoredGlowLib
让实体发出任意颜色的光,还能自定义动画,甚至实现彩虹效果!不再局限于原版颜色!支持 API 和命令!
FoxGlow
When foxes and players eat glow berries they should glow, shouldn't they? Maybe even multicolor glow!
ColoredGlowLib
Makes entities glow any RGB color, not just vanilla colors! Also supports custom color animations with datapacks!
评论
登录后评论和评分