
仅当您是想使用该库/API 的开发者,或者某些模组需要此库/API 时,才应下载本模组。
这是什么模组?
是否曾想过制作具有多个输出的配方?现在就是实现它的好机会!本模组是供开发者使用的库,用于在配方中添加多个输出。此“模组”本身不会执行任何操作!
该库/API 使开发者能够更轻松地在自己的模组中添加具有多个输出的配方。以前,一些开发者会创建自定义配方类以满足必要要求,但对大多数人来说这是不可能的。
该库主要面向不知道如何入门或刚接触模组开发的开发者,但也可能为更有经验的模组制作者提供有价值的帮助。
其工作原理是:除了实现 Recipe 接口外,您还需实现本模组中的一个类。
简短示例:
public class SomeCustomRecipe implements Recipe<SimpleInventory>, Output2Recipe<SimpleInventory> {
[... All methods that are needed to implement from Recipe ...]
//All methods implemented by Output2Recipe
@Override
public ItemStack getSecondResult(DynamicRegistryManager registryManager) {
return secondOutput;
}
@Override
public ItemStack craftSecond(DynamicRegistryManager registryManager) {
return secondOutput;
}
}
这将确保您可以在 SomeCustomRecipe 之外使用这些方法来注册屏幕处理器、方块实体等。关于如何使用本模组的详细教程和完整指南可在 wiki 找到。
功能:
- 最多支持 4 种可能的输出
- 包含示例实现(尚未实现)
问题反馈:
请将问题报告至 GitHub 仓库。建议也可以通过问题反馈提交。如果您有其他任何问题,请通过 Discord 私信询问。用户名:scaredrabbitnl_。(支持服务器即将推出)

You should only download this mod if you are a developer who wants to use the lib/api or when some mod requires this lib/api.
What is this mod?
Ever wanted to make recipes with more than one output? Now is the chance to do so! This mod is a library for developers to add more than one output to their recipes. This 'mod' will not do ANYTHING on its own!
This lib/api makes it much easier for developers to add recipes with more than one output to their mod. Before, some developers made custom recipe classes that did have the neccessary requirements but for most it was impossible.
The lib is aimed at devs who don't know how to start or just are generally new to modding but could also be a valuable asset to more experienced modders.
It works by instead of only implementing Recipe, you also implement one of the classes from this mod.
Short ex.:
public class SomeCustomRecipe implements Recipe<SimpleInventory>, Output2Recipe<SimpleInventory> {
[... All methods that are needed to implement from Recipe ...]
//All methods implemented by Output2Recipe
@Override
public ItemStack getSecondResult(DynamicRegistryManager registryManager) {
return secondOutput;
}
@Override
public ItemStack craftSecond(DynamicRegistryManager registryManager) {
return secondOutput;
}
}
This will make sure you can use those methods outside the SomeCustomRecipe for registering screenhandlers, block entities etc. An indepth tutorial with a complete guide on how to use this is found on the wiki
Features:
- Up to 4 possible outputs
- Included example implementation (Not yet implemented)
Issues:
Please report issues to the github repository. Suggestions may also be submitted trough the issues. If you have any other questions, please ask them personally via discord. Username: scaredrabbitnl_. (Support server is coming sometime)
评论 0
登录后参与评分
还没有评论,来抢沙发吧