拾取过滤
决定哪些物品进入你的背包。挑选那些你永远不想收集的物品,让它们留在地上——或者反过来,只收集你选中的物品,忽略其他一切。
两种模式本质上是同一份列表的两种读取方式:
- 黑名单 - 除了列表中的物品外,所有物品都会被拾取。添加
rotten_flesh 和 gunpowder,走过僵尸或苦力怕的掉落物时,战利品会留在原地。
- 白名单 - 只有列表中的物品会被拾取。在采矿之旅前将矿石和钻石加入其中,圆石就会留在原地不动。
设置界面中的一个按钮可在两者之间切换,每个保存的配置档都会记住自己的模式。
配置档
物品列表是一个配置档,你可以保留任意数量(最多 32 个)。它们位于设置界面左侧的侧边栏中——点击即可立即切换。
- 每个配置档都存储其专属的物品列表和专属模式,因此“生物垃圾”黑名单和“采矿之旅”白名单可以并排存在。
- 每一行都标记为
B 或 W,这样无需切换即可查看当前是白名单还是黑名单。
- 新建、重命名和删除按钮位于列表上方。删除操作会要求确认,且最后一个剩余的配置档无法被删除。
一个空的白名单不会过滤任何内容,也不会阻止整个游戏——一个尚未填写内容的配置档会安静地不干扰你的拾取行为,屏幕也会对此进行提示。
必读:所谓“过滤”究竟意味着什么
物品拾取是由服务器决定的,而不是由你的客户端决定。这是 Minecraft 的基本事实,并非本模组的缺陷,这意味着根据你游玩的位置,你会体验到两种不同的行为。
单人游戏和局域网世界 - 真正不会被拾取
“服务器”运行在你自己的游戏内部,因此模组可以与其交互。在原版游戏处理你的背包之前,拾取动作就会被取消:
- 无物品插入背包
- 无拾取音效
- 无拾取动画
- 物品保持掉落时的精确位置
没有闪烁,没有抖动,无需清理。更改列表、模式或配置档后,效果会在下一步立即生效——无需重启,无需重新登录。
专用服务器 - 先拾取,然后瞬间丢弃
在真实的服务器上,模组并未运行在做出决策的那台机器上。无论如何,服务器都会将物品交给你。因此,回退机制只能做唯一诚实的事情:使用原版按下 Q 键时发送的确切数据包,将过滤掉的堆叠直接丢弃回地面。
你会看到物品短暂进入你的背包,出现正常的掉落动画,以及你身边的地面上出现的物品。这一切都不是作弊——服务器收到的是普通的丢弃指令,并且尊重原版的掉落频率限制。但这并不等同于从未拾取它,没有任何客户端模组能比这做得更好。
模组会在每次会话首次发生时通过聊天告诉你这一点。你可以使用服务器自动丢弃复选框完全关闭此回退功能。
服务器路径上的循环保护:每刻一个堆叠,每种物品类型 60 刻冷却时间,打开屏幕时或光标持有堆叠时不会丢弃任何物品,盔甲槽和副手槽永远不会受到影响。
功能
- 黑名单或白名单,可按配置档切换。
- 配置档位于侧边栏,支持新建/重命名/删除及一键切换。
- 完整物品注册表支持。不仅是方块——腐肉、火药、箭矢、刷怪蛋等所有物品均支持。
- 创造模式背包风格的选择器。9 列,6 行,支持鼠标滚轮和可拖动的滚动条。
- 实时搜索,可通过显示名称或注册表 ID 查找。输入
rotten、flesh 或 minecraft:rotten_flesh 都能找到同一个物品。
- 创造模式标签页浏览,如果你更倾向于查看而非输入。
- 展示网格,显示当前配置档的物品。左键点击即可移除。
- 全局开/关开关以及两步操作的“清空全部”。
- Mod Menu 支持(可选)。
- 配置以可读的 JSON 格式存储,使用注册表 ID,而非数字 ID。
控制
按键绑定 “打开拾取过滤” 位于 Pickup Filter 类别下,默认未绑定——请选择你自己的按键。在设置界面打开时再次按下该按键会关闭界面,因此它可以作为单一的切换键使用。
配置
config/pickupfilter.json:
{
"enabled": true,
"autoDropOnServers": true,
"ejectDelayTicks": 5,
"activeProfile": 0,
"profiles": [
{
"name": "Mob junk",
"mode": "blacklist",
"items": [
"minecraft:rotten_flesh",
"minecraft:gunpowder"
]
},
{
"name": "Mining trip",
"mode": "whitelist",
"items": [
"minecraft:diamond",
"minecraft:raw_iron"
]
}
]
}
来自旧版配置的未知 ID 会在日志中发出警告并被跳过,而不会导致崩溃。1.1.0 或更早版本的配置会在首次加载时迁移为一个名为“Default”的单一无色名单配置档,数据不会丢失。
需求
- Fabric Loader 0.19.3+
- Fabric API
- Mod Menu - 可选
Pickup Filter
Decide what ends up in your inventory. Pick the items you never want to collect
and leave them on the ground - or turn it around and collect only the items
you chose, ignoring everything else.
Both directions are the same list read two ways:
- Blacklist - everything is picked up except the items on the list. Add
rotten_flesh and gunpowder, walk over a zombie or creeper drop, and the
loot stays on the ground.
- Whitelist - nothing is picked up except the items on the list. Put ores
and diamonds on it before a mining trip and the cobblestone stays where it is.
One button on the settings screen switches between them, and each saved profile
remembers its own mode.
Profiles
The item list is a profile, and you can keep as many as you need (up to 32).
They live in a sidebar on the left of the settings screen - click one to switch
to it, immediately.
- Each profile stores its own items and its own mode, so a "mob junk"
blacklist and a "mining trip" whitelist sit side by side.
- Every row is marked
B or W, so you can tell a whitelist from a blacklist
without switching to it first.
- New, Rename and Delete sit above the list. Deleting asks for
confirmation, and the last remaining profile cannot be deleted.
An empty whitelist filters nothing at all, rather than blocking the entire
game - a profile you have not filled in yet quietly leaves your pickups alone,
and the screen tells you so.
Read this first: what "filtered" actually means
Item pickup is decided by the server, not by your client. That is a
Minecraft fact, not a shortcoming of this mod, and it means you get one of two
behaviours depending on where you are playing.
Singleplayer and LAN worlds - genuinely never picked up
The "server" is running inside your own game, so the mod reaches it. The pickup
is cancelled before vanilla touches your inventory:
- no inventory insertion
- no pickup sound
- no take-item animation
- the item stays exactly where it dropped
No blip, no flicker, nothing to clean up. Change the list, the mode or the
profile and it takes effect on the very next step - no restart, no relog.
Dedicated servers - picked up, then instantly thrown back out
On a real server the mod is not running on the machine making the decision. The
server hands you the item no matter what. So the fallback does the only honest
thing available: it drops the filtered stack straight back out, using the exact
packets vanilla sends when you press Q.
You will see the item briefly enter your inventory, a normal drop animation, and
the item on the ground next to you. Nothing about it is a cheat - the server
receives an ordinary drop and the vanilla drop-spam throttle is respected. But
it is not the same as never picking it up, and no client-side mod can do
better than this.
The mod tells you this in chat the first time it happens each session. You can
switch the fallback off entirely with the Auto-drop on servers checkbox.
Loop protection on the server path: one stack per tick, a 60-tick cooldown per
item type, nothing ejected while a screen is open or while you are carrying a
stack on the cursor, and armour and offhand slots are never touched.
Features
- Blacklist or whitelist, switchable per profile.
- Profiles in a sidebar, with new / rename / delete and one-click switching.
- Whole item registry. Not just blocks - rotten flesh, gunpowder, arrows,
spawn eggs, everything.
- Creative-inventory-style picker. 9 columns, 6 rows, mouse wheel and a
draggable scrollbar.
- Live search by display name or registry id.
rotten, flesh, and
minecraft:rotten_flesh all find the same item.
- Creative tab browsing if you would rather look than type.
- Showcase grid of the active profile's items. Left-click to remove.
- Master on/off toggle and a two-step "Clear all".
- Mod Menu support (optional).
- Config stored as readable JSON with registry ids, never numeric ids.
Controls
The keybind "Open Pickup Filter" is under its own Pickup Filter category in
Controls and is unbound by default - pick your own key. Pressing it again
while the settings screen is open closes it, so it works as one toggle.
Config
config/pickupfilter.json:
{
"enabled": true,
"autoDropOnServers": true,
"ejectDelayTicks": 5,
"activeProfile": 0,
"profiles": [
{
"name": "Mob junk",
"mode": "blacklist",
"items": [
"minecraft:rotten_flesh",
"minecraft:gunpowder"
]
},
{
"name": "Mining trip",
"mode": "whitelist",
"items": [
"minecraft:diamond",
"minecraft:raw_iron"
]
}
]
}
Unknown ids from an older config are skipped with a log warning, not crashed on.
A config from 1.1.0 or earlier is migrated into a single blacklist profile named
"Default" the first time it is loaded, with nothing lost.
Requirements
- Fabric Loader 0.19.3+
- Fabric API
- Mod Menu - optional
评论 0
登录后参与评分
还没有评论,来抢沙发吧