InvTweaks
适用于 Minecraft(Fabric)的更佳客户端侧物品栏管理模组
我制作这个模组是因为受够了频繁地在容器中进行繁琐的操作。它解决了游戏中最令人头疼的部分(至少对我而言),并增加了一些提升生活质量的新功能。
它能做什么?
InvTweaks 是一个客户端侧的 Fabric 模组,让你可以通过修饰键控制物品栏操作。按住某个键,点击一组物品,即可移动除一个以外的所有物品或恰好一个物品。这一核心理念延伸至 Shift+点击、投掷、背包以及滚轮传输等功能。我还内置了一个完整的剪贴板系统,用于复制和粘贴物品栏布局,并附带了剪贴板管理器。
该模组仅作用于客户端,且兼容原版服务器。
值得注意的一点是:由于 InvTweaks 移动物品的速度远超人类极限,如果你的服务器监控物品传输速度,你可能需要告知管理员一声,以免他们误以为你在使用作弊客户端。
快速上手
InvTweaks 开箱即用,默认设置合理。你可以从以下地方开始尝试:
- 打开你的物品栏并将鼠标悬停在一组物品上
- 按住左 Alt + 点击: 拾取除一个以外的所有物品
- 按住左 Ctrl + 点击: 恰好拾取一个物品
- 打开箱子并尝试在物品组上执行 Alt + Shift+点击。除一个以外的所有物品将转移到另一边
- 在箱子的物品上向上或向下滚动鼠标滚轮以转移所有匹配的物品
- 在箱子中按 Ctrl+C 复制其布局。取出这些物品后按 Ctrl+V 恢复布局
- 按 K 打开配置屏幕并探索
默认修饰键:
| Windows / Linux |
Mac |
功能 |
| 左 Alt |
左 Cmd |
AllBut1 — 移动除一个以外的所有物品 |
| 左 Ctrl |
左 Ctrl |
Only1 — 恰好移动一个物品 |
| 右 Alt |
左 Option |
Misc — 投掷一半、填满现有堆叠、滚轮填充 |
所有按键均可在配置屏幕(K)中完全重新绑定。
功能特性
修饰键调整
InvTweaks 主要基于快捷键组合进行操作。没有 GUI 按钮或需要持续点击的内容。在执行操作期间按住修饰键即可改变物品的移动或拾取方式。
点击拾取: 按住 AllBut1(Mac 上的左 Alt / Cmd)+ 点击一组物品以拾取除一个以外的所有物品。按住 Only1(左 Ctrl)+ 点击以恰好拾取一个物品。
Shift+点击传输: 按住 AllBut1 + Shift+点击以将除一个以外的所有物品传输到另一边。按住 Only1 + Shift+点击以恰好传输一个物品。
背包操作
背包提取: 右键点击背包以拉出物品:AllBut1 提取除一个以外的所有物品(一个留在背包中),Only1 恰好提取一个。
背包插入: 手持物品左击背包(或将背包左击至物品上):AllBut1 插入除一个以外的所有物品,Only1 恰好插入一个。双向支持:物品放入背包 和 背包放入物品。
投掷调整
投掷一半: 按住 Misc 键(Mac 上的右 Alt / Option)+ Q 以丢弃半组物品给那个总是需要你食物的好友。
投掷除一个以外的所有: 按住 AllBut1 + Q 以丢弃除一个以外的所有物品。
两者均在物品栏和第一人称视角下生效(无 GUI 打开时)。
滚轮传输
在容器中的物品上向上或向下滚动鼠标滚轮,将所有匹配的物品传输到另一边。根据你按住的修饰键不同,有四种模式:
- 纯滚动: 移动所有物品。
- AllBut1 + 滚动: 留一模式。每个堆叠保留一个物品。
- Misc + 滚动: 填满现有模式。仅补充目标侧部分堆叠的空缺,不会填充空槽位。
- AllBut1 + Misc + 滚动: 留一 + 填满现有。我不知道你为什么需要这个,但也许你需要!
填满现有堆叠
按住 Misc + Shift+点击以将一组物品分发到另一侧现有的同类部分堆叠中。
复制/粘贴/剪切
这是重头戏。我一直觉得 Minecraft 的物品栏系统如果能支持复制和粘贴会更好,所以我添加了此功能。
复制 (Ctrl+C): 快照当前物品栏或容器布局。记住每种物品、其槽位位置、附魔、药水效果、自定义名称等一切信息。
粘贴 (Ctrl+V): 重新排列物品以匹配之前复制并选定的布局。物品按类型和组件进行匹配,移动到正确槽位,并将堆叠补足至最大值。
剪切 (Ctrl+X): 复制布局,然后将容器清空到你的物品栏中(或者尽可能多地装入)。
撤销 (Ctrl+Z): 不小心进行了粘贴或剪切?撤销可恢复之前的状态。
剪贴板系统
你复制的内容会进入持久化的剪贴板历史记录中,即使退出游戏也会保留。
剪贴板历史浏览器 (Shift+Tab): 全屏浏览器,显示所有保存的布局及物品预览。
收藏: 星标任意剪贴板条目以将其设为收藏。收藏条目受保护,不会被删除,当历史记录已满时也不会被移除,并在浏览器中拥有独立的标签页。将它们用于你经常粘贴的布局,例如主储物箱设置、常用的物品栏配置等。
死亡快照: 当你死亡时,你的物品栏会自动保存到剪贴板。重生后找到并捡起你的死亡掉落物,你就可以将旧布局粘贴回去。
容器支持
容器被分类为不同的类别并进行相应处理:
标准容器(箱子、双层箱子、潜影盒、末影箱、 barrels)
支持完整复制/粘贴。潜影盒和末影箱拥有独立的剪贴板类别,这样你的末影箱布局就不会覆盖你的双层箱子布局。
小型容器(发射器、投掷器、工作台、合成器、漏斗、熔炉、高炉和烟熏炉)
每个都有自己独立的剪贴板类型。粘贴时使用均匀分布而非堆叠最大化。例如,如果你将 30 个圆石粘贴到发射器中,每个槽位获得的数量大致相同。
合成器比较特殊:锁定状态会被保留。复制一个具有锁定槽位的合成器并将其粘贴到其他位置后,这些锁定的槽位会自动重新锁定。
大小不匹配的粘贴:将单箱布局粘贴到双箱中(或反之)?有三种可配置的模式:
- 悬停位置: 适用于从小到大的粘贴。悬停在容器的上半部分或下半部分,即可向该侧粘贴。
- 菜单选择: 弹出菜单以选择你想要粘贴到的那一半。
- 方向键: 使用方向键选择物品粘贴到哪一侧。
不兼容的容器: 村民交易台、铁砧、附魔台、研磨台、织布机、制图台、信标、酿造台、切石机和锻造台无法被复制/粘贴。
安装
- 安装 Fabric 加载器
- 安装 Fabric API
- 从 Modrinth 下载 InvTweaks
- 将
.jar 文件放入 mods 文件夹
- 启动游戏
配置
按 K 打开配置界面。
配置界面包含四个选项卡:
全部 (All): 几乎所有设置都在一个可滚动的列表中。
调整 (Tweaks): 开启或关闭各个功能。
热键 (Hotkeys): 设置全局修饰键、特定于调整的按键覆盖以及剪贴板键绑定。如果你想让某个特定的调整拥有自己的键绑定,还有一个“高级选项”部分用于进行单个调整的按键覆盖设置。
调试 (Debug): 切换调试日志记录并访问调试日志缓冲区。如果出现问题,请启用调试日志记录,重现问题,然后点击“复制调试日志”以获取最近 200 条日志条目。这对提交错误报告很有用。
配置文件
设置存储在 .minecraft/config/invtweaks.json 中。剪贴板历史记录单独存储在 invtweaks-clipboard.json 中。
模组兼容性
我自己也使用了很多提升库存体验的模组,因此我努力使 InvTweaks 尽可能与其他模组和谐共存。根据我的测试,目前没有重大问题,但有一些事项需要注意。如果遇到兼容性问题,请提交 Issue,我会尽力解决。
Mouse Tweaks
通常兼容,但有一点需要注意:Mouse Tweaks 使用滚轮进行其自身的库存操作。如果两个模组的滚轮功能都启用了,滚轮行为会发生冲突。你可能需要根据偏好禁用其中一个模组的滚轮功能。
Tweakeroo
Tweakeroo 也有自己的滚轮功能,这可能会与 InvTweaks 的滚动传输功能发生冲突。情况同上,你可能需要禁用其中一个。
Mod Menu
完全兼容。
创造模式
InvTweaks 在创造模式下没有完全兼容。创造模式库存使用完全不同的屏幕处理器,绕过了标准的槽位交互系统。
致 macOS 用户
macOS 用户应安装 macOS Input Fixes 以获得最佳兼容性。InvTweaks 内置了对 macOS Cmd+Shift+Click 批量移动行为的处理,并且对 Ctrl 和 Cmd 键用于复制/粘贴/剪切操作均有响应。
我还建议创建一个自定义键盘快捷键,以避免意外退出 Minecraft。Cmd+Q 会退出应用程序,如果你将 Cmd 设置为投掷操作的修饰键,这种情况可能会发生。解决方法如下:
- 前往 系统设置 → 键盘 → 键盘快捷键 → 应用快捷键
- 添加一个新的快捷键,名称必须精确为 "Quit java"
- 将该快捷键设置为一个你不会意外按到的组合
这将专门针对 Minecraft 覆盖标准的 macOS 退出快捷键。
常见问题 / 故障排除
问:我安装了模组,但按住修饰键时没有任何反应。
答:确保已安装 Fabric API。同时检查是否有其他模组覆盖了相同的按键事件。
问:滚动传输不起作用。
答:如果你安装了其他具有滚动操作的模组,其滚动功能可能会优先拦截事件。尝试禁用其中一个模组的滚动功能。
问:我的粘贴把物品放错了槽位。
答:粘贴通过物品类型和组件数据(附魔、药水、自定义名称等)来匹配物品。如果你没有完全相同的可用物品,粘贴功能会根据现有物品尽力而为。
问:覆盖层消息很烦人。
答:你可以关闭它们!打开配置界面 (K) → 调整 (Tweaks) 选项卡 → “显示覆盖层消息” → 禁用。
问:我可以在服务器上用它吗?
答:可以。InvTweaks 完全是客户端模组,可在原版服务器、Fabric 服务器以及允许客户端模组的任何服务器上运行。无需服务端安装。如果你的服务器有严格的反作弊监控,请告知管理员你正在使用库存管理模组。
问:出了点问题。我该如何报告 Bug?
答:在配置界面(调试选项卡)中启用调试日志记录,重现问题,然后点击“复制调试日志”以获取最近的日志条目。在 GitHub 上提交 Issue,附上调试日志和对所发生情况的描述。截图也会有帮助。
问:这在 Minecraft X 版本上能用吗?
答:InvTweaks 目前针对 Fabric 上的 Minecraft 1.21.11 版本。未来可能会支持其他版本。请在 Modrinth 查看最新支持的版本。
关于名称的一点说明
你可能认识模组名称 InvTweaks:在较旧的 Minecraft 版本中曾有一个同名模组(最后一次官方更新大约在 1.10,社区维护延续至 1.20)。本模组并非上述模组,也与其无任何关联。这是一个完全独立、全新的模组,只是恰好使用了相同的名称。
许可证
InvTweaks 采用 自定义源码可见许可证 发布。源代码在 GitHub 上公开,以保障透明度和社区信任,但禁止重新分发、修改及衍生作品的创作。完整条款请参阅 LICENSE.md 文件。
InvTweaks
Better client-side inventory management for Minecraft (Fabric)
I made this mod because I was tired of fiddling around in containers all the time. It takes care of the most frustrating parts of the game (to me at least), and adds a few new quality of life features.
What Does It Do?
InvTweaks is a client-side Fabric mod that gives you modifier-key controls over inventory actions. Hold a key, click a stack, and move all-but-1 or exactly-1 items. That core idea extends into shift-clicking, throwing, bundles, and scroll wheel transfers. I've also included a full clipboard system for copying and pasting inventory layouts, with a clipboard manager built in.
It's client-side only and works on vanilla servers.
One thing worth noting: since InvTweaks moves items faster than humanly possible, if your server monitors inventory transfer speed, you may want to give your admins a heads up so they don't think you're using a cheat client.
Getting Started
InvTweaks works out of the box with sensible defaults. Here's where you can start:
- Open your inventory and hover over a stack of items
- Hold Left Alt + click: pick up all but one item
- Hold Left Ctrl + click: pick up exactly one item
- Open a chest and try Alt + shift-click on a stack. All but one transfers to the other side
- Scroll up or down over an item in a chest to transfer all matching items
- Press Ctrl+C in a chest to copy its layout. Take those items out and press Ctrl+V to restore it
- Press K to open the config screen and explore
Default modifier keys:
| Windows / Linux |
Mac |
Role |
| Left Alt |
Left Cmd |
AllBut1 — move all except one |
| Left Ctrl |
Left Ctrl |
Only1 — move exactly one |
| Right Alt |
Left Option |
Misc — throw half, fill existing, scroll fill |
All keys are fully rebindable in the config screen (K).
Features
Modifier-Key Tweaks
InvTweaks works primarily with keybind shortcuts. No GUI buttons or things that need constant clicking. Hold a modifier key during an action to change how items get moved or picked up.
Click Pickup: Hold AllBut1 (Left Alt / Cmd on Mac) + click a stack to pick up everything except one. Hold Only1 (Left Ctrl) + click to pick up exactly one.
Shift+Click Transfer: Hold AllBut1 + shift-click to transfer all-but-1 to the other side. Hold Only1 + shift-click to transfer exactly one.
Bundle Operations
Bundle Extract: Right-click a bundle to pull items out: AllBut1 extracts all but one (one stays in the bundle), Only1 extracts exactly one.
Bundle Insert: Left-click with items onto a bundle (or with a bundle onto items): AllBut1 inserts all but one, Only1 inserts exactly one. Works in both directions: items-onto-bundle and bundle-onto-items.
Throwing Tweaks
Throw Half: Hold the Misc key (Right Alt / Option on Mac) + Q to drop half a stack to that friend who always needs some of your food.
Throw All-But-1: Hold AllBut1 + Q to drop all but one item.
Both work in inventories and in first-person (no GUI open).
Scroll Wheel Transfer
Scroll up or down over an item in a container to transfer all matching items to the other side. Four modes depending on which modifier keys you hold:
- Bare scroll: Moves everything.
- AllBut1 + scroll: Leave-1 mode. Leaves one of each stack behind.
- Misc + scroll: Fill-existing mode. Only tops up partial stacks on the destination side and won't fill empty slots.
- AllBut1 + Misc + scroll: Leave-1 + fill-existing. I have no idea why you would need this, but maybe you do!
Fill Existing Stacks
Hold Misc + shift-click to distribute a stack across existing partial stacks of the same item on the other side.
Copy/Paste/Cut
This is the big one. I've always felt the Minecraft inventory system would benefit from being able to copy and paste, so I added it.
Copy (Ctrl+C): Snapshots your current inventory or container layout. Remembers every item, its slot position, enchantments, potion effects, custom names, the works.
Paste (Ctrl+V): Rearranges items to match a previously copied and selected layout. Items get matched by type and components, moved to their correct slots, and stacks get topped up to max.
Cut (Ctrl+X): Copies the layout, then empties the container into your inventory (or at least what can fit).
Undo (Ctrl+Z): Make a paste or cut you didn't mean to? Undo restores the previous state.
Clipboard System
What you copy goes into a persistent clipboard history that survives after you quit the game.
Clipboard History Browser (Shift+Tab): Full-screen browser showing all your saved layouts with item previews.
Favorites: Star any clipboard entry to favorite it. Favorites are protected from deletion, never get removed when the history fills up, and have their own tab in the browser. Use them for layouts you paste frequently like your main storage chest setup, your go-to inventory loadout, whatever.
Death Snapshots: When you die, your inventory is automatically saved to the clipboard. Respawn, find and pick up your death pile, and you can paste your old layout back.
Container Support
Containers are classified into categories and handled appropriately:
Standard containers (chests, double chests, shulker boxes, ender chests, barrels)
Full copy/paste. Shulker boxes and ender chests get their own clipboard categories so your ender chest layout doesn't overwrite your double chest layout.
Small containers (Dispensers, droppers, crafting tables, crafters, hoppers, furnaces, blast furnaces, and smokers)
Each have their own clipboard type. Paste uses even distribution instead of stack maximization. For example, if you paste 30 cobblestone into a dispenser, each slot gets roughly the same amount.
Crafters are special: lock states are preserved. Copy a crafter with locked slots, paste it somewhere else, and the locked slots get re-locked automatically.
Size-mismatched paste: Pasting a single-chest layout into a double chest (or vice versa)? There are three configurable modes:
- Hover Position: For small-to-large pastes. Hover over the top or bottom half of the container to paste to that side.
- Menu Selection: A menu pops up to select which half you want.
- Arrow Keys: Use arrow keys to select which side things are pasted into.
Incompatible containers: Villager trading, anvils, enchanting tables, grindstones, looms, cartography tables, beacons, brewing stands, stonecutters, and smithing tables can't be copied/pasted.
Installation
- Install Fabric Loader
- Install Fabric API
- Download InvTweaks from Modrinth
- Drop the
.jar into your mods folder
- Launch the game
Configuration
Press K to open the config screen.
The config screen has four tabs:
All: Almost every setting in one scrollable list.
Tweaks: Toggle individual features on or off.
Hotkeys: Set your global modifier keys, tweak-specific key overrides, and clipboard keybinds. There's an "Advanced Options" section for per-tweak key overrides if you want a specific tweak to have its own keybinds.
Debug: Toggle debug logging and access the debug log buffer. If something seems wrong, enable debug logging, reproduce the issue, and hit "Copy Debug Log" to grab the last 200 log entries. Useful for bug reports.
Config File
Settings are stored in .minecraft/config/invtweaks.json. Clipboard history is stored separately in invtweaks-clipboard.json.
Mod Compatibility
I use a lot of inventory quality-of-life mods myself, so I've tried to make InvTweaks play nice with as many as possible. As far as my testing has shown, there are no major issues, but there are a few things to be aware of. If you run into compatibility problems, please open an issue and I'll see what I can do.
Mouse Tweaks
Generally compatible, with one note: Mouse Tweaks uses scroll for its own inventory operations. If both mods have their scroll features enabled, scroll behavior will conflict. You may need to disable one or the other, depending on which you prefer.
Tweakeroo
Tweakeroo has its own scroll wheel features that may conflict with InvTweaks scroll transfer. Same deal, you may need to disable one or the other.
Mod Menu
Fully compatible.
Creative Mode
InvTweaks does not have full compatibility in Creative mode. Creative inventory uses a completely different screen handler that bypasses the standard slot interaction system.
A Note for macOS Users
macOS users should install macOS Input Fixes for best compatibility. InvTweaks has built-in handling for macOS Cmd+Shift+Click bulk-move behavior and responds to both Ctrl and Cmd for copy/paste/cut operations.
I also recommend creating a custom keyboard shortcut to avoid quitting Minecraft unexpectedly. Cmd+Q will quit the application, which can happen if you have Cmd set as a modifier for throw operations. To fix this:
- Go to System Settings → Keyboard → Keyboard Shortcuts → App Shortcuts
- Add a new shortcut named exactly "Quit java"
- Set the shortcut to something you won't accidentally press
This overrides the standard macOS quit shortcut for Minecraft specifically.
FAQ / Troubleshooting
Q: I installed the mod but nothing happens when I hold modifier keys.
A: Make sure you have Fabric API installed. Also check that you don't have another mod overriding the same key events.
Q: Scroll transfer doesn't work.
A: If you have another mod with scroll operations installed, its scroll features may be intercepting events first. Try disabling scroll features in one mod or the other.
Q: My paste put items in the wrong slots.
A: Paste matches items by type and component data (enchantments, potions, custom names, etc.). If you don't have the exact same items available, paste does its best with what's there.
Q: The overlay messages are annoying.
A: You can turn them off! Open the config screen (K) → Tweaks tab → "Show Overlay Messages" → disable.
Q: Can I use this on a server?
A: Yes. InvTweaks is entirely client-side and works on vanilla servers, Fabric servers, and any server that allows client-side mods. No server-side installation needed. If your server has strict anti-cheat monitoring, consider letting your admins know you're using an inventory management mod.
Q: Something broke. How do I report a bug?
A: Enable debug logging in the config screen (Debug tab), reproduce the issue, then click "Copy Debug Log" to grab the recent log entries. Open an issue on GitHub with the debug log and a description of what happened. Screenshots help too.
Q: Will this work on Minecraft version X?
A: InvTweaks currently targets Minecraft 1.21.11 on Fabric. Other versions may be supported in the future. Check Modrinth for the latest supported versions.
A note on the name
You may recognize the mod name InvTweaks: There was a mod by this same name for older Minecraft versions (last official update around 1.10ish, with community updates through 1.20.) This mod is not those or related in any way. This is a completely different, independent mod that happens to share the name.
License
InvTweaks is released under a custom source-available license. Source code is available on GitHub for transparency and community trust, but redistribution, modification, and derivative works are restricted. See the LICENSE.md file for full terms.
评论 0
登录后参与评分
还没有评论,来抢沙发吧