Filter Chest 设置
一个客户端 Fabric 模组,通过一键操作将物品从你的库存中填入箱子以形成过滤布局。它适用于那些必须按固定模式填充过滤器或分拣箱子的服务器,以便获得特定的比较器信号强度。
打开箱子或桶时,容器窗口旁边会出现两个按钮:
- set up as filter? 用于布置箱子。
- pick filter item 用于设置用作过滤器的物品。
功能说明
点击 set up as filter? 后,打开的容器会按照以下方式进行排列:
- 最后 3 个槽位各放入 1 把剪刀(剪刀不可堆叠,因此每个占一个槽位)。
- 紧挨着它们的前一个槽位放入 5 个过滤物品。
- 其余所有槽位各放入 1 个过滤物品。
对于双层箱子,则是 3 把剪刀和 55 个过滤物品。
物品是通过正常的容器点击操作从你自己的库存中移出的,效果等同于手动放置,因此该模组无需服务端模组即可在任何服务器上运行。如果物品数量不足,它会提示缺少什么并执行无操作。
请先清空箱子。已有物品的槽位保持不变。
选择过滤物品
默认的过滤物品是重命名为 Filter 的红花。若要使用其他物品:
- 将物品放在鼠标指针上,或在快捷栏中选择它。如果需要名称匹配,请先在铁砧中重命名。
- 点击 pick filter item。
该物品及其自定义名称(如果有)会被保存。如果没有自定义名称,任何该物品的堆叠都算作有效;如果有自定义名称,则只有具有完全相同名称的堆叠才算有效。
你也可以直接编辑 config/filterchest.json:
{
"filterItemId": "minecraft:poppy",
"filterItemName": "Filter",
"shearsInCorner": 3,
"filterNextToCorner": 5
}
将 filterItemName 留空("")以忽略名称,匹配任意名称的物品。
信号强度
此布局是故意固定的。过滤器箱子通常需要精确的比较器信号强度,而该值取决于你使用的物品,因为不同物品的堆叠上限不同,填充容器的效率也不同。该模组不会为你计算信号强度,而是复现你已经知道有效的布局。将过滤物品替换为堆叠上限不同的物品会改变最终的信号强度,因此请选择能提供你所需数值的那种物品。
构建
需要 JDK 21 或更高版本(游戏目标为 Java 25)。构建过程使用 Unimined 配合 Mojang 映射表。
./gradlew build
生成的 jar 文件位于 build/libs/filterchest-<version>.jar。将其放入你的 mods 文件夹即可。
许可证
MIT。详见 LICENSE。
Filter Chest Setup
A client-side Fabric mod that fills a chest into a filter layout with one click, using items from your inventory. It's for servers where a filter or sorter chest has to be stocked in a fixed pattern to hit a specific comparator signal strength.
Open a chest or barrel and two buttons show up next to the container window:
- set up as filter? arranges the chest.
- pick filter item sets which item is used as the filter.
What it does
Clicking set up as filter? lays out the open container like this:
- The last 3 slots each get 1 shears (shears don't stack, so they take a slot each).
- The slot just before them gets 5 filter items.
- Every slot before that gets 1 filter item.
On a double chest that's 3 shears and 55 filter items.
Items are moved out of your own inventory with normal container clicks, the same as if you placed them by hand, so it works on any server with no server-side mod. If you don't have enough items it tells you what's missing and does nothing.
Empty the chest first. Slots that already have something in them are left alone.
Choosing the filter item
The default filter item is a poppy renamed to Filter. To use something else:
- Put the item on your cursor, or select it on your hotbar. Rename it in an anvil first if you want the name to be required.
- Click pick filter item.
The item and its custom name, if it has one, get saved. With no custom name, any stack of that item counts. With a custom name, only stacks with that exact name count.
You can also edit config/filterchest.json directly:
{
"filterItemId": "minecraft:poppy",
"filterItemName": "Filter",
"shearsInCorner": 3,
"filterNextToCorner": 5
}
Leave filterItemName empty ("") to match the item no matter its name.
Signal strength
The layout is fixed on purpose. A filter chest usually needs an exact comparator signal, and that value depends on the items you use, since different items have different stack sizes and fill the container differently. The mod doesn't calculate signal strength for you, it just reproduces a layout you already know works. Swapping the filter item for one with a different stack size changes the resulting signal, so pick an item that gives the value your setup needs.
Building
Needs JDK 21 or newer (the game targets Java 25). The build uses Unimined with Mojang mappings.
./gradlew build
The jar lands in build/libs/filterchest-<version>.jar. Drop it in your mods folder.
License
MIT. See LICENSE.
评论 0
登录后参与评分
还没有评论,来抢沙发吧