Cib Lib
A Fabric library that lets mods split their creative tab into sections, each with its own banner.
截图
介绍
Creative Inventory Banner is a library for mod developers. It splits a creative tab into sections, each one headed by a banner image of your choosing.
Instead of one flat wall of items, your tab reads as labelled groups: materials, tools, food, decorations & whatever you decide.
How it works
A section occupies one full row of the creative grid for its header, then lays its items underneath. Rendering happens in two layers: the library always draws a placeholder frame over the empty slot row, and your banner goes on top of it. Declare no banner and you get the built-in default.
For developers
Declare your sections and hand the layout to your tab:
“`java
InventoryBanners.register(MY_TAB, layout -> layout
.section(section -> section
.banner(MOD_ID, “materials”)
.add(RUBY, SAPPHIRE))
.section(section -> section
.banner(MOD_ID, “gear”)
.add(RUBY_SWORD, RUBY_PICKAXE))
.section(section -> section
.add(MYSTERY_ITEM)));
CreativeModeTab.builder(…)
.displayItems(InventoryBanners.displayItems(MY_TAB))
.build();
“`
Banner textures live at assets/<your_mod_id>/textures/gui/banner/<name>.png and must be exactly 160×16 pixels.
By default it has a gray banner.
That’s the whole API surface for the common case. Item stacks are built lazily, so you can declare sections while you’re still registering your items without tripping over uninitialised item components.
For users who don’t know how to create these banners, I have a simple Windows application that allows you to create them. Join the DISCORD
Requirements
- Minecraft 26.2
- Fabric Loader 0.19.3 or newer
- Fabric API
- Java 25
常见问题
Cib Lib 支持哪些 Minecraft 版本?
Cib Lib 支持 Minecraft Java 版 26.2,可用的加载器:Fabric。下载时注意选择和你游戏版本一致的文件。
Cib Lib 怎么安装?
先用 PCL2 或 HMCL 启动器安装对应版本的 Fabric,再把下载的 .jar 文件放进游戏目录的 mods 文件夹,重新启动游戏即可。开启了版本隔离的,mods 文件夹在 versions/版本名 下面。
d4nilpzz 的其他作品
查看全部 →Pot Leaves
这是一款小型装饰模组,加入了花盆和树叶。
Golden Dandelion
用金色蒲公英让你的世界遍布动物幼崽。
Industrial Vents
Keep your world beautifull with Rebuild Tech, new build blocks, vents, lights, etc...
Hanging Lights
Hanging Lights is a simple mod but useful to decorate your world with some string lights

评论
登录后评论和评分