DIAPI(Dynamic Item API 的缩写)是一款旨在简化内容注册与添加的模组。DIAPI 是一个库类模组,意味着如果没有其他模组调用它,它将不会执行任何功能。
技术信息
DIAPI 使用模型加载器、模型、烘焙模型和物品覆盖来动态渲染物品。其目的是简化流程并尽可能减少开发痛点。例如:通常基于 NBT 数据渲染纹理的代码非常复杂,因为你需要将像素转换为四边形并移除内部四边形。DIAPI 内置了处理此问题的函数(尽管你也可以设置自己的渲染器)。
有关文档,请参阅 示例渲染器 和 Javadocs。
DIAPI 依赖于 James Registry API 以及 Architectury API(因为 James Registry API 依赖于此)。
如果你有以下需求,则需要使用 DIAPI
- 你需要动态渲染模型
- 你需要一个编写快速且简单的渲染系统
- 你需要一个灵活的渲染系统
- 你想要多种功能,例如混合模式
如果你有以下需求,则不需要使用 DIAPI
- 你的模型是静态渲染的
- 你想使用 BEWLR,而不是模型加载器
DIAPI (short for Dynamic Item API) is a mod aimed at easing the registration and addition of content easily. DIAPI is a library mod, meaning that it performs no function without another mod using it.
Technical Info
DIAPI uses Model Loaders, Models, Baked Models, and Item Overrides to dynamically render items. It is aimed at easing the process and making it as painless as possible. For example: normally, code for rendering textures based on NBT data is very complex, as you need to transform the pixels to quads and remove internal quads. DIAPI has builtin functions to handle this (though you can set up your own renderer).
For Documentation, look at the Example Renderer and the Javadocs
DIAPI depends on James Registry API, as well as Architectury API (because James Registy API depends on it).
You WANT to use DIAPI if
- You need a model to be rendered dynamically
- You need a rendering system that is quick and easy to write
- You need a flexible rendering system
- You want a variety of functions, such as blending
You do NOT want to use DIAPI if
- Your model is rendered statically
- You want to use a BEWLR, not a model loader
评论 0
登录后参与评分
还没有评论,来抢沙发吧