介绍
OR-LIB – Wearables & Rendering Library (Fabric)
OR-LIB is a small Fabric library designed to make it easy and consistent to handle wearable items (rings, amulets, trinkets, etc.) and their rendering in both first and third person.
It’s meant to be reused by multiple mods in the same pack, so you don’t have to rewrite the same code every time for poses, transforms, and custom slots.
🎯 Purpose
Provide a clean set of APIs for defining Wearable Items with dedicated properties.
Centralize the logic for registration, rendering, and transformations of wearable items.
Offer convenient integration with external slot systems (trinket-like slots) without forcing a specific design on the mods that use it.
🔧 Requirements
- Mod Loader: Fabric
- Trinkets
It’s especially useful together with content mods that add rings, jewelry, or other trinkets.
Still Work in progress
The library is still work in progress, some feature may work not as inteded.
✨ Key Features
Some key features of the library:
- Wearable-focused API
- Classes and interfaces for WearableItem, WearableType, and related properties.
- Builder-style configuration for attributes, bonuses, and wearable behavior.
- Centralized registries
- WearablesRegistry and WearableContentRegistry to keep all OR-LIB-based content in one place.
- Tags and helper classes (ORLibItemTags, slot helpers, etc.) for clean integration.
- Advanced wearable rendering
- Simple ready-to-use renderers (SimpleWearableRenderer) for basic cases.
- A system of poses and transforms using SlotTransform, SlotTransforms, BodyAnchor, WearablePoseContext, and default transform providers.
- A dedicated first-person renderer (FirstPersonWearableRenderer) to keep player-view and external model in sync.
- Hooks & mixins included
- Client-side integrations for model loading (WearableModelLoaderMixin) and rendering items that are worn or held.
- Centralized rendering bootstrap (WearableRenderingBootstrap, WearableRenderRegistry) to initialize everything in an organized way.
- Trinket-like slot compatibility
- Utilities like TrinketSlotUtil to interact more easily with extra slot systems, so you can focus on how items look and behave, not the boilerplate.
🧑💻 For Mod Developers
Add OR-LIB as a dependency in your project (Gradle and loader metadata).
Create a new wearable by extending/implementing the provided classes (e.g. WearableItem) and configuring it with the builder.
Register your wearable in OR-LIB’s registries (wearable types, content, tags, and any custom slots).
(Optional) Attach a custom renderer via the client-side APIs if you need more advanced visuals.
(Optional) Hook into external slot systems (trinket-like) using OR-LIB’s utilities instead of writing your own glue code.
⚙️ Design & Extensibility
OR-LIB is designed as a foundation layer:
It does not add visible content by itself.
It focuses on APIs, registries, helpers, and rendering.
常见问题
OR-Lib 支持哪些 Minecraft 版本?
OR-Lib 支持 Minecraft Java 版 1.19.2–1.21.1,共 6 个版本,可用的加载器:Fabric / NeoForge。下载时注意选择和你游戏版本一致的文件。
OR-Lib 怎么安装?
先用 PCL2 或 HMCL 启动器安装对应版本的 Fabric / NeoForge,再把下载的 .jar 文件放进游戏目录的 mods 文件夹,重新启动游戏即可。开启了版本隔离的,mods 文件夹在 versions/版本名 下面。运行环境:客户端和服务端都要装。
Carlogamer 的其他作品
查看全部 →
Dragonsteel & Star Alloy [Magical Metallurgy Series]
Craft powerful tools and weapons with the mighty Dragonsteel and the magical star alloy!
Dragon Scale [More Magic Series]
Make the Ender Dragon drop some of it's scales upon defeat
More Runes [More Magic Series]
More runes to cast your spells!
Elemental Metals [Magical Metallurgy Series]
Infuse metals with the power of the elements!
评论
登录后评论和评分