一个简单易用的库模组,允许模组开发者让他们的物品占用更多的背包空间……无论你出于什么理由想让玩家的生活更艰难
对于玩家
如果未作为依赖项安装或单独安装,则没有任何作用!
对于模组开发者
开始使用:
- 将 .jar 文件导入到你的项目根文件夹(或从根文件夹分支出的任何文件夹)中
- 在 build.gradle 的
dependencies块中添加以下行:
modImplementation(files("path/big-items-a1.2.3.jar"))
用法:
- 在物品类中,实现 silly.homak.bigitems.interfaces.IBigItem

IBigItem:
-
要设置物品的缩放比例,请重写
getScale()方法,该方法必须返回一个包含两个整数的数组,这表示物品在 X 轴和 Y 轴上的格子缩放倍数。
-
大物品具有显示其实际缩放的渲染背景,其颜色基于物品纹理的平均颜色(忽略空白像素)。若要显式设置背景颜色,请重写
getColor()方法,该方法必须返回一个整数颜色值。
-
该接口包含一个布尔值
isScaled(),用于判断物品是否为大尺寸物品。在如快捷栏或合成方块等场景下会返回 false,且必须在客户端调用。
其他功能:
TextureUtils:
- 包含一系列用于处理整数颜色值的辅助方法:
- darkenColor: 降低整数颜色的亮度,接受一个整数颜色和一个双精度因子,该因子必须是 0 到 1 之间的小数,1 表示无效果,0 表示完全变黑。
- fadeColor: 降低整数颜色的透明度,参数与上述相同。
- darkenColor: 降低整数颜色的饱和度,参数与上述相同。(注:原文此处重复使用了 darkenColor,根据上下文应为 desaturateColor 或类似名称,但依规则保留原文逻辑结构,仅翻译描述部分;若需严格对应代码命名建议检查源码,此处按字面翻译为“降低饱和度”的功能描述)
- getAverageColor: 返回物品纹理中所有像素的数学平均颜色,忽略 alpha 通道。
A simple to use library mod that allows mod developers to make their items take up more inventory space... for whatever reason you want to make people's lives harder
For players
Does nothing if installed not as a dependency or by itself!
For mod developers
Getting started:
- Import the .jar into your project root folder (or any folder branching from root)
- In your dependencies block in build.gradle add this line:
modImplementation(files("path/big-items-a1.2.3.jar"))
Usage:
- In an item class, implement silly.homak.bigitems.interfaces.IBigItem

IBigItem:
-
To set the item's scale override the getScale() array, has to return an array of 2 integers, this is the item's scale in slots on the X and Y axis.

-
Big items have a rendered background that displays their actual scale, it's color is based on the average color of the item's texture (disregarding empty pixels). To set the background color explicitly override getColor(), has to return an integer color value.

-
The interface contains a boolean isScaled() that returns if the item is big or not, returns false in scenarios like being in the hotbar or a crafting block, has to be called on the client side.
Misc:
TextureUtils:
- Contains a bunch of helper methods for working with integer color values:
- darkenColor: Decreases an int color's brightness, accepts an integer color and a double factor, which has to be a decimal between 0 and 1, 1 being no effect and 0 being fully black.
- fadeColor: Decreases an int color's alpha, same arguments as the previous.
- darkenColor: Decreases an int color's saturation, same arguments as the previous.
- getAverageColor: Returns the mathematical average color of all pixels in an item's texture, disregards alpha.
下载 Big Items API
下载 Big Items API
下载 Big Items API
下载 Big Items API
下载 Big Items API
下载 Big Items API
暂无更新日志
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
模组
一个用于收集生物掉落物的多区块模组。
模组
可定制的鞘翅模组,支持装饰纹饰、旗帜图案等更多功能!
模组
显示你正在注视的方块的信息。(适用于 Minecraft 1.16+ 的 Hwyla/Waila 分支)
模组
查看物品与配方
模组
使用 JavaScript 编辑配方、添加自定义物品、编写世界事件!
模组
适用于 MC 1.18+ 的 Effekseer 加载器
评论 0
登录后参与评分
还没有评论,来抢沙发吧