你的战利品,由你掌控。 Loot Lock 是一款开源的 Fabric 模组,提供基于玩家的地面物品过滤功能。服务端权威判定,多人游戏安全,杜绝垃圾物品。
别再让你的背包变成腐肉和小麦种子的坟墓了。Loot Lock 允许服务器上的每位玩家决定他们想要拾取哪些地面物品,并忽略其他一切。再也不必在每次挖矿后玩“背包俄罗斯方块”了。也再也不用在突袭结束后花十分钟把垃圾物品点击进漏斗里了。
适用人群
受够了捡鸡蛋(养鸡时)或小麦种子(清理草丛时)的生存玩家。
运行铁傀儡磨机的刷怪塔玩家,他们只想要锭,而不是沿途掉落的 47 朵虞美人。
在生存模式下进行红石工程的工程师,希望有一个配置文件仅拾取红石粉、中继器和火把,以保持电路工作环境的整洁。
SMP 突袭小队,在清理掠夺者前哨站时,一名玩家囤积所有弩,而另一名玩家只想要绿宝石。两者可以在同一个世界、同一时间各自随心所欲。
整合包作者,需要一个干净、合理的方式来赋予玩家背包控制权,而不必堆砌五个不同的实用工具模组。
任何曾因为跑过一堆种子却想捡下界合金而对着屏幕怒吼的人。
功能亮点
过滤功能
- 基于玩家的独立配置文件,拥有独立的规则,因此你的过滤器不会影响其他人的游戏体验。
- 白名单或黑名单模式,每个配置文件均可选择。精确选择要拾取的物品,或精确选择要跳过的物品。
- 每个玩家支持多个配置文件,以便快速切换。采矿配置、建筑配置、农业配置。只需单击一下或按一下快捷键即可切换。
- 拒绝的物品可选择留在地上或删除。删除模式包含安全确认和操作员可选项。
游戏内界面
- 停靠面板,滑出显示在背包旁边,无需跳转到单独的全屏菜单。
- 规则标签页,具备实时物品搜索、多选、拖放添加功能,以及带有柔和闪烁效果的金色边框放置目标区域,让你知道物品已成功放置。
- 设置标签页,用于 HUD 提示、安全确认和内置快捷键指南。
- 通过点击配置文件胶囊来重命名配置文件,此外还有单点击循环箭头和每个配置文件对应的颜色标记。
反馈机制
- 被拦截物品的 Toast 提示,简要告知你哪个物品被过滤掉了(可切换开关)。
- 切换配置文件的 Toast 提示,让你知道刚刚切换到了哪个加载配置(可切换开关)。
- 当 Loot Lock 开启或关闭时的切换 Toast 提示(可切换开关)。
多人游戏
- 服务端权威状态,具备完善的编辑同步功能。无不同步现象,无作弊性的客户端覆盖。
- 原生客户端同样适用。 即使未安装该模组的玩家也能受益,如果服务器操作员通过命令管理他们的规则。
- 完整的命令支持,配合 UI 使用,你可以按喜好管理规则。
快速开始
- 将 Loot Lock 和 Fabric API 放入你的
mods 文件夹中。
- 启动游戏,加入你的世界,打开背包。
- 点击配方书按钮旁边的较小 Loot Lock 按钮。停靠面板将与背包一起打开。
- 打开规则标签页,输入以搜索物品,选择过滤模式,点击添加选中项,然后走过几个掉落物以验证是否生效。
这就是全部设置。无需编辑配置文件。
快捷键
在规则标签页内:
- Shift + 单击搜索结果以选择范围。
- Ctrl + 单击(macOS 上为 Cmd + 单击)以添加或移除单个行。
- 双击任意行以立即添加它。
- Alt + 单击任意背包槽位以直接添加该物品,无需打开搜索界面。
- 拖拽一组物品到面板上,将其直接放入你的规则中。
- 拖拽一组物品到关闭状态的 Loot Lock 按钮上,可在不打开面板的情况下添加它。
- 清除全部会清空当前活动的配置文件,而在搜索时会出现清除搜索。
- 以
# 开头的搜索会将结果范围限定为物品标签(#flowers、#seeds、#minecraft:wool)。像添加物品行一样添加标签行,它将扩展以匹配该标签涵盖的所有物品。
进阶技巧
- 将循环 Loot 配置文件绑定到侧边鼠标按键。无需打开任何界面,即可在行动中途在采矿、建筑和农业配置之间切换。
- 对于一般游玩,使用黑名单模式搭配简短的拒绝列表(如鸡蛋、种子、腐肉),而对于专注于挖掘等任务,则使用白名单模式,这样你只获取想要的优质物品。
- 将删除模式的配置文件与刷怪塔配对,这样你的收集箱就永远不会被垃圾掉落物填满。
- 操作员可以使用
/lootlock 命令在新玩家登录之前预先为他们配置好配置文件。
控制键
Loot Lock 自带两个快捷键,默认均未绑定。请在 Controls > Loot Lock 中进行设置:
- Toggle Loot Lock 切换整个模组的启用状态,效果等同于点击停靠面板上的玩家开关。
- Cycle Loot Profile 在一次按键操作中切换到下一个已保存的配置档。
命令
所有命令均以 /lootlock 为根路径。游戏内 UI 涵盖了以下所有内容,但若未安装客户端模组,则只能通过命令进行操作。
常用
| 命令 |
功能 |
/lootlock |
显示快速命令帮助。 |
/lootlock status |
显示当前激活的配置档、启用状态、模式、操作方式及规则数量。 |
/lootlock enable |
在你拥有的所有配置档中启用 Loot Lock(全局切换)。 |
/lootlock disable |
在你拥有的所有配置档中禁用 Loot Lock(全局切换)。 |
/lootlock profile list |
列出你的配置档并标记当前激活的项。 |
/lootlock profile activate <name> |
按名称激活配置档,然后显示状态。 |
配置档与规则
| 命令 |
功能 |
备注 |
/lootlock profile create <name> |
使用默认设置创建新配置档。 |
名称会自动去除首尾空格,长度必须在 1 到 32 个字符之间。每名玩家最多可创建 9 个配置档。 |
/lootlock profile delete <name> |
按名称删除配置档。 |
无法删除你最后一个配置档。 |
/lootlock profile export <name> |
将指定配置档编码为可点击、复制到剪贴板的分享代码。 |
详见下方的“分享配置档”部分。 |
/lootlock profile import <code> |
解码以 ll1. 开头的分享代码,并据此创建新配置档。 |
若名称冲突,会自动添加 (2)、(3) 等后缀。 |
/lootlock mode denylist |
将当前配置档的过滤模式设置为黑名单。 |
|
/lootlock mode allowlist |
将当前配置档的过滤模式设置为白名单。 |
|
/lootlock action leave |
将被拒绝物品的行为设置为留在地面上。 |
|
/lootlock action delete |
显示安全警告及删除模式的确认说明。 |
|
/lootlock action delete confirm |
将被拒绝物品的行为设置为永久删除被拒绝的物品。 |
如果服务器策略不允许删除模式,则此操作会被阻止。 |
/lootlock rule add <namespace:item> |
向当前配置档添加物品规则。 |
物品 ID 必须存在。 |
/lootlock rule add tag <namespace:tag_path> |
向当前配置档添加物品标签规则,匹配该标签解析到的所有物品。 |
即使标签当前未加载也会保存;后续通过数据包重载进行解析。 |
/lootlock rule remove <namespace:item> |
从当前配置档移除物品规则。 |
|
/lootlock rule remove tag <namespace:tag_path> |
从当前配置档移除标签规则。 |
|
/lootlock rule list |
列出当前配置档中的规则。 |
|
/lootlock rule clear |
在清除规则前显示确认提示。 |
|
/lootlock rule clear confirm |
移除当前配置档中的所有规则。 |
|
操作员
需要操作员权限等级 2。
服务器策略位于 /lootlock policy 下。常用和配置档与规则表格中的每个命令都有一个操作员版本,以 /lootlock player <target> 为前缀,该版本会对其他玩家的数据而非调用者的数据运行相同的子命令。
| 命令 |
功能 |
/lootlock policy |
显示当前服务器策略值。 |
/lootlock policy allowDeleteRejectedItems true |
允许玩家对被拒绝的物品使用删除模式。 |
/lootlock policy allowDeleteRejectedItems false |
阻止删除模式并强制使用遗留模式行为。 |
/lootlock player <target> <subcommand> |
对 <target> 运行任何针对自身的子命令,而非调用者自身。 |
<target> 接受在线玩家名称(支持 Tab 补全)、服务器缓存的离线名称,或原始 UUID 字面量,用于为从未加入过游戏的玩家预置配置档。对于在线目标,每次数据变更后都会接收权威同步,使其客户端无需重新登录即可反映更改。对离线玩家的编辑会通过基于 UUID 键控的去抖动保存路径持久化,并在重启后保留。
常见问题
它在原版客户端上有效吗?
有效。所有过滤都在服务器端运行。原版客户端无法打开停靠面板 UI,但操作员可以使用 /lootlock 命令管理该玩家的配置档,拾取时规则会正常生效。
它支持模组物品吗?
支持。规则以物品 ID(namespace:item)形式存储,因此 Minecraft 能识别的任何物品,Loot Lock 都能进行过滤。
性能影响如何?
过滤仅在服务器端的拾取刻执行,针对每个玩家基于哈希键的规则集进行运算。每次拾取的开销是常数时间的,与原版拾取逻辑相比微不足道。
我需要编辑任何配置文件吗?
不需要。所有内容均由玩家在-game 中配置,或由服务器上的操作员命令配置。客户端的 Toast 偏好设置会自动持久化。
数据存储在哪里?
配置档数据由服务器权威控制,并按玩家 UUID 与其他世界数据一起保存,因此可以在不同会话和重新连接间保留。
兼容性
- Minecraft:
1.21.1
- Loader: Fabric
0.19.3+
- Fabric API:
0.116.12+1.21.1 及以上
- Java:
21+
- 环境: 专用服务器和集成服务器,无论是否安装了客户端模组
依赖项
| 依赖项 |
版本 |
必需 |
用途 |
| Fabric Loader |
>=0.19.3 |
是 |
模组加载器 |
| Fabric API |
>=0.116.12+1.21.1 |
是 |
Fabric 钩子和 API |
| Mod Menu |
>=11.0.4 |
否 |
从模组列表打开 Loot Lock 客户端偏好设置。配置档、规则和服务器策略通过在游戏中打开库存中的 Loot Lock 面板进行编辑 |
权限
policy 命令路径以及管理其他玩家配置档需要操作员权限等级 2。没有操作员权限的玩家仍可以通过 UI 或命令完全管理自己的配置档。
分享配置档
配置档可以导出为简短的可粘贴分享代码,并导入回任何安装了 Loot Lock 的世界中。
运行 /lootlock profile export <name> 可获取一个类似 ll1.eJyrViouSU3MS1ezUjI0Mlay8suvtFKK1FFKzEsBigEAyiYItQ 的可点击字符串。在聊天栏中点击该代码,Minecraft 会将其复制到你的剪贴板。然后将其粘贴到 Discord、Reddit 评论、整合包说明文件或其他任何地方。
你也可以在不离开背包界面的情况下导出和导入配置。打开 Loot Lock 面板,点击配置文件胶囊以展开下拉菜单,点击任意配置文件行上的 E 小按钮即可直接将该配置文件的分享代码复制到剪贴板;或者点击 + New profile 下方的 Import from code,打开一个接受 ll1. 格式代码的粘贴提示框,并将其作为新配置文件添加。
若要通过聊天栏导入代码,请运行 /lootlock profile import <code>。解码器会在创建新配置文件之前验证前缀、负载数据和每个字段。如果导入的名称与你已有的名称冲突,新配置文件将自动追加 (2)、 (3) 等后缀。错误时会返回清晰的提示信息,而不会导致崩溃。
代码中包含和不包含的内容如下:
- 包含: 配置文件名称、过滤模式、被拒物品的处理方式,以及完整的有序规则列表(包括物品 ID 和以
# 为前缀的标签条目)。
- 不包含: 配置文件颜色、启用状态、配置文件 ID。导入器会生成一个新的 ID,并将颜色选择权留给导入者。
代码本质上是公开的。请勿在代码中编码任何你不愿意发布到公共频道的内容。
开源
Loot Lock 基于 MIT 许可证开源。
如果 Loot Lock 在你漫长的生存之旅中拯救了你的理智,那么 GitHub 上的一颗星或 Ko-fi 上的一杯咖啡都将意义重大。
Your loot, your rules. Loot Lock is an open-source Fabric mod for per-player ground-item filtering. Server-authoritative, multiplayer-safe, zero junk.
Stop letting your inventory turn into a graveyard of rotten flesh and wheat seeds. Loot Lock lets every player on the server decide exactly which ground items they want to pick up, and ignores everything else. No more inventory tetris after every cave run. No more shift-clicking junk into hoppers for ten minutes after a raid.
Built For
Survival players tired of picking up eggs while breeding chickens or wheat seeds while clearing grass.
Mob farmers running an iron golem grinder who only want ingots, not the 47 poppies dropped along the way.
Redstone engineers building in survival who want one profile that grabs only redstone dust, repeaters, and torches so circuit work stays clean.
SMP raid teams clearing pillager outposts where one player hoards every crossbow and the other wants nothing but emeralds. Both can have their way, on the same world, at the same time.
Modpack authors who need a clean, sane way to give players inventory control without bolting on five separate utility mods.
Anyone who has ever yelled at their screen because they ran over a pile of seeds while trying to grab netherite.
What You Get
Filtering
- Per-player profiles with independent rules, so your filter does not affect anyone else's gameplay.
- Allowlist or denylist mode per profile. Pick exactly what to grab, or pick exactly what to skip.
- Multiple profiles per player for fast switching. Mining loadout, building loadout, farming loadout. Swap in one click or one keypress.
- Leave on ground or delete rejected items. Delete mode includes safety confirmations and an operator opt-out.
In-game UI
- Docked panel that slides out beside your inventory, no separate full-screen menu detour.
- Rules tab with live item search, multi-select, drag-and-drop add, and a gold-border drop target with a soft flash so you know the drop landed.
- Settings tab for HUD toasts, safety confirmations, and a built-in keybind cheatsheet.
- Inline profile rename by clicking the profile pill, plus one-click cycle arrows and a colour chip per profile.
Feedback
- Blocked-item toast that briefly tells you which item was filtered out (toggleable).
- Profile-switch toast so you know which loadout you just swapped to (toggleable).
- Toggle toast when Loot Lock is turned on or off (toggleable).
Multiplayer
- Server-authoritative state with proper edit synchronisation. No desync. No cheaty client overrides.
- Works for vanilla clients too. Players without the mod installed still benefit if a server operator manages their rules through commands.
- Full command coverage alongside the UI, manage rules however you prefer.
Quick Start
- Drop Loot Lock and Fabric API into your
mods folder.
- Launch the game, join your world, open your inventory.
- Click the small Loot Lock button beside the recipe-book button. The docked panel opens alongside the inventory.
- Open the Rules tab, type to search items, pick a filter mode, hit Add selected, and walk over a few drops to verify.
That is the whole setup. No config file editing required.
Shortcuts
Inside the Rules tab:
- Shift click a search result to select a range.
- Ctrl click (or Cmd click on macOS) to add or remove individual rows.
- Double-click any row to add it immediately.
- Alt click any inventory slot to add that item directly without opening the search.
- Drag a stack onto the panel to drop it straight into your rules.
- Drag a stack onto the closed Loot Lock button to add it without opening the panel.
- Clear all wipes the active profile, Clear search appears in its place while searching.
- Search starting with
# scopes results to item tags (#flowers, #seeds, #minecraft:wool). Add a tag row the same way you add an item row, and it expands to match every item the tag covers.
Pro Tips
- Bind Cycle Loot Profile to a side mouse button. Swap between mining, building, and farming loadouts mid-action without opening anything.
- Use denylist mode for general play with a short reject list (eggs, seeds, rotten flesh), and allowlist mode for focused tasks like mining where you want only the good stuff.
- Pair a delete-mode profile with a mob farm so your collection chests never fill with junk drops.
- Operators can pre-stage profiles for new players with
/lootlock commands before they ever log in.
Controls
Loot Lock ships with two keybinds, both unbound by default. Set them in Controls > Loot Lock:
- Toggle Loot Lock flips the whole-mod enable state, identical to clicking the Player switch on the docked panel.
- Cycle Loot Profile swaps to your next saved profile in one keypress.
Commands
All commands are rooted at /lootlock. The in-game UI covers everything below, but commands are the only path if you do not have the client mod installed.
Common
| Command |
What it does |
/lootlock |
Prints quick command help. |
/lootlock status |
Shows active profile, enabled state, mode, action, and rule count. |
/lootlock enable |
Enables Loot Lock across every profile you own (whole-mod toggle). |
/lootlock disable |
Disables Loot Lock across every profile you own (whole-mod toggle). |
/lootlock profile list |
Lists your profiles and marks the active one. |
/lootlock profile activate <name> |
Activates a profile by name, then shows status. |
Profiles and rules
| Command |
What it does |
Notes |
/lootlock profile create <name> |
Creates a new profile with default settings. |
Names are trimmed and must be 1 to 32 chars. Max 9 profiles per player. |
/lootlock profile delete <name> |
Deletes a profile by name. |
Cannot delete your last profile. |
/lootlock profile export <name> |
Encodes the named profile as a clickable, copy-to-clipboard share code. |
See the Share profiles section below. |
/lootlock profile import <code> |
Decodes a ll1.-prefixed share code and creates a new profile from it. |
Name collisions auto-suffix with (2), (3), etc. |
/lootlock mode denylist |
Sets active profile filter mode to denylist. |
|
/lootlock mode allowlist |
Sets active profile filter mode to allowlist. |
|
/lootlock action leave |
Sets rejected-item behaviour to leave drops on the ground. |
|
/lootlock action delete |
Shows safety warning and confirmation instructions for delete mode. |
|
/lootlock action delete confirm |
Sets rejected-item behaviour to permanently delete rejected drops. |
Blocked if server policy disallows delete mode. |
/lootlock rule add <namespace:item> |
Adds an item rule to the active profile. |
Item id must exist. |
/lootlock rule add tag <namespace:tag_path> |
Adds an item tag rule to the active profile, matching every item the tag resolves to. |
Saves even if the tag is not currently loaded; resolves later via datapack reload. |
/lootlock rule remove <namespace:item> |
Removes an item rule from the active profile. |
|
/lootlock rule remove tag <namespace:tag_path> |
Removes a tag rule from the active profile. |
|
/lootlock rule list |
Lists rules in the active profile. |
|
/lootlock rule clear |
Shows confirmation hint before clearing rules. |
|
/lootlock rule clear confirm |
Removes all rules from the active profile. |
|
Operator
Requires operator permission level 2.
Server policy lives under /lootlock policy. Every command in the Common and Profiles and rules tables also has an operator form prefixed with /lootlock player <target> that runs the same subcommand against another player's data instead of the caller's.
| Command |
What it does |
/lootlock policy |
Shows current server policy values. |
/lootlock policy allowDeleteRejectedItems true |
Allows players to use delete mode for rejected items. |
/lootlock policy allowDeleteRejectedItems false |
Blocks delete mode and forces leave-mode behaviour. |
/lootlock player <target> <subcommand> |
Runs any self-targeted subcommand against <target> instead of the caller. |
<target> accepts an online player name (tab-completes), an offline name the server has cached, or a raw UUID literal for pre-staging a profile for a player who has never joined. Online targets receive an authoritative sync after every mutation so their client reflects the change without rejoining. Offline edits persist through the debounced save path keyed by UUID and survive restarts.
FAQ
Does it work on vanilla clients?
Yes. The server runs all filtering. A vanilla client cannot open the docked UI, but an operator can manage that player's profiles using /lootlock commands and rules apply normally on pickup.
Does it work with modded items?
Yes. Rules are stored as item ids (namespace:item), so anything Minecraft can identify, Loot Lock can filter.
What about performance?
Filtering runs only on the server's pickup tick, against a hash-keyed rule set per player. Overhead per pickup is constant-time and negligible compared to vanilla pickup logic.
Do I need to edit any config files?
No. Everything is configured in-game by the player, or by operator commands on the server. Client-side toast preferences persist automatically.
Where is data stored?
Profile data is server-authoritative and saved per player UUID alongside other world data, so it survives across sessions and rejoins.
Compatibility
- Minecraft:
1.21.1
- Loader: Fabric
0.19.3+
- Fabric API:
0.116.12+1.21.1 minimum
- Java:
21+
- Environments: dedicated server and integrated server, with or without client mod installed
Dependencies
| Dependency |
Version |
Required |
Purpose |
| Fabric Loader |
>=0.19.3 |
Yes |
Mod loader |
| Fabric API |
>=0.116.12+1.21.1 |
Yes |
Fabric hooks and APIs |
| Mod Menu |
>=11.0.4 |
No |
Opens Loot Lock client preferences from the mod list. Profiles, rules, and server policy are edited in-game by opening the Loot Lock panel from your inventory |
Permissions
Operator permission level 2 is required for the policy command path and for managing other players' profiles. Players without operator permissions can still fully manage their own profile through the UI or commands.
Share profiles
Profiles can be exported as a short pasteable share code and imported back into any world with Loot Lock installed.
Run /lootlock profile export <name> to get back a clickable string like ll1.eJyrViouSU3MS1ezUjI0Mlay8suvtFKK1FFKzEsBigEAyiYItQ. Click the code in chat and Minecraft copies it to your clipboard. Paste it into Discord, a Reddit comment, a modpack readme, or anywhere else.
You can also export and import without leaving the inventory. Open the Loot Lock panel, click the profile pill to expand the dropdown, hit the E mini button on any profile row to copy that profile's share code straight to your clipboard, or click Import from code under + New profile to open a paste prompt that accepts a ll1. code and adds it as a new profile.
To bring a code in via chat, run /lootlock profile import <code>. The decoder validates the prefix, payload, and every field before creating a new profile. If the imported name collides with one you already own, the new profile is suffixed with (2), (3), and so on. Errors return a clear message rather than crashing.
What does and does not travel inside a code:
- Travels: profile name, filter mode, rejected-item action, and the full ordered list of rules (item ids and tag entries prefixed with
#).
- Does not travel: profile colour, enabled state, profile id. The importer mints a fresh id and leaves color choice to the importer.
Codes are public by definition. Do not encode anything you would not paste into a public channel.
Open Source
Loot Lock is open source under the MIT license.
If Loot Lock saved your sanity on a long survival run, a star on GitHub or a coffee on Ko-fi goes a long way.
评论 0
登录后参与评分
还没有评论,来抢沙发吧