Lia's Better Offhand
一个客户端 Fabric 模组,在使用主手物品时防止副手物品被意外激活。
功能说明
你是否曾吃过食物,结果突然半组烟花射向了天花板?或者突然用望远镜放大了画面?又或者你正在向朋友扔雪球,但耗尽雪球后不小心把盾牌举了起来?
在原版 Minecraft 中,如果你按住右键使用主手物品(例如吃东西),一旦主手动作完成,即使你仍然按着右键,副手物品也会立即激活。此模组会阻止副手激活,直到你松开并重新按下右键。
这适用于以下情况:
- 按住右键使用的物品: 食物、药水、弩、山羊号角以及任何其他具有使用动画的物品
- 即时使用且消耗堆叠的物品: 雪球、鸡蛋、末影珍珠、喷溅型药水、烟花以及任何其他在使用时从堆叠中消耗的物品
- 使用中损坏的物品
- 弩的射击
- 对方块使用的工具和实用物品: 斧头(剥皮/刮除/去蜡)、铲子、锄头、骨粉、剪刀、打火石和铁锭
- 拴绳: 拴在栅栏柱上、从栅栏柱上拾取、拴在动物身上、从动物身上解开
- 实体交互: 剪羊毛、安装/卸下马鞍、任何其他成功的实体交互操作
可选功能:
- 禁止副手放置光源: 禁用在副手中放置发光物品,如火把、灯笼等
- 禁止副手放置物品展示框: 禁用从副手中放置物品到物品展示框中
已知限制:
- 即时使用物品的检测(例如扔出堆叠中的最后一个雪球)依赖于堆叠大小的变化或特定的物品名称和类型。如果某个模组添加了一个不减少堆叠大小或不在类型列表中的即时使用物品,可能无法被检测到。
依赖项
本模组需要:
推荐但不必需:
关于
这是我制作的第一款 Minecraft 模组,最初仅用于个人在 Immortal MC server 上的游玩。我们在该服务器上有一个完全生成的 voxy 文件,我非常喜欢用它来配合副手中的望远镜使用。如果你在寻找一个小型、紧密协作的原版生存服务器(附带几个插件),欢迎来看看我们!
为了完全透明,由于我之前从未制作过模组,只是想要一个简单的解决方案来解决我遇到的一个小问题,而且找不到任何维护良好的相关模组,因此使用了自托管的 AI 模型辅助开发。我尽量自己编写了尽可能多的代码,但我大部分的编程知识都在 Python 上,而 Java 对我来说跨度很大 lol。我分配给它的很多任务是调试和优化。由于这个 AI 模型是托管在我自己的 GPU 上的,所以没有湖泊被排干 ?,它只是让我的电脑嗡嗡作响,其功耗大约相当于《城市:天际线 II》正常运行时的功耗,不过可能更少 lol。
贡献
非常欢迎贡献!请让它变得更好!如果你发现任何可以改进的地方,无论是错误还是新功能,欢迎提交 Issue 或 Pull Request。我相信我可能遗漏了一些边缘情况。如果我无法为新版 Minecraft 维护此模组,我很乐意让任何人分叉并继续开发,只需确保遵循 GPL-3.0 许可证 ?️??️⚧️
当前贡献者
- 添加了“禁止副手放置光源”的可选功能
- 引入了配置设置的工具提示
- 扩大了版本兼容性,同时支持 26.1.* 和 26.2.*
Lia's Better Offhand
A client-side Fabric mod that prevents accidental offhand item activation while using your main hand.
What it does
Ever been eating food and then suddenly half a stack of fireworks has hit the cieling? Or suddenly zoomed in with your spyglass? Or perhaps you were throwing snowballs at a friend and didn't appreciate throwing your shield up when you ran out?
In vanilla, if you hold right click to use an item in your main hand, like eating food, the offhand item will activate as soon as the main hand action completes, even if you're still holding the button down. This mod blocks the offhand from activating until you release and re-press right click.
This applies to:
- Hold right click items: food, potions, crossbows, goat horn, and any other item with a use animation
- Instant use stackables: snowballs, eggs, ender pearls, splash potions, fireworks, and any other item that consumes from a stack on use
- Items breaking while used
- Crossbow firing
- Tools and utility items used on blocks: axes (stripping/scraping/dewaxing), shovels, hoes, bonemeal, shears, flint and steel
- Leads: attaching to fence posts, picking up from fence posts, attaching to animals, removing from animals
- Entity interactions: shearing sheep, applying/removing saddles, any other successful entity interaction
Optional features:
- No Offhand Light Placement: disables the placement of light-emitting items in your offhand, such as torches, lanterns, etc.
- No Offhand Item Frame Placement: disables the placement of items in item frames from your offhand
Known limitations:
- Instant use items detection (e.g. throwing the last snowball in a stack) rely on the stack size changing, or specific item names and types. If a mod adds an instant-use item that doesn't reduce stack size, or isn't in the type list, it may not be caught.
Dependencies
This mod requires:
Recommended, but not required:
About
This is the first Minecraft mod I've ever made, which was initially just for personal use on the Immortal MC server where we have a fully generated voxy file that I love using the spyglass with (in my offhand). If you're looking for a small, tight-knit, vanilla survival (with a couple pluigns) come check us out!
For full disclosure, a self-hosted AI model was used to assist in developing this, since I've never created a mod before and just wanted a simple fix for a tiny issue I was having which I couldn't find any maintained mods for. I tried to do as much coding as I could myself but most of my coding knowledge is in Python, and Java is a big jump lol. A lot of the tasks I set it were debugging and optimisation. Since this AI model was self-hosted on my own GPU no lakes were drained ?, it just made my PC go brr which drew about as much wattage as Cities: Skylines II normally does, although maybe it was less lol.
Contributing
Contributions are more than welcome! Please make this better! If you find anything that could be improved, whether that be a bug or a new feature, feel free to open an issue or submit a pull request. I'm sure I've probably missed some edge cases. If I'm unable to maintain this mod for newer versions of Minecraft, I'm happy for anyone to fork and continue it, just make sure to follow the GPL-3.0 licence ?️??️⚧️
Current Contributions
- Added the no offhand light placement optional feature
- Introduced config setting tooltips
- Broadened version compatibility to both 26.1.* and 26.2.*
下载 Lia's Better Offhand
下载 Lia's Better Offhand
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Lia's Better Offhand
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Lia's Better Offhand
下载 Lia's Better Offhand
下载 Lia's Better Offhand
更新内容
- 新增对 Minecraft 26.3 的支持
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
模组
显示你正在注视的方块的信息。(适用于 Minecraft 1.16+ 的 Hwyla/Waila 分支)
模组
在游戏画面角落显示附近世界地形、玩家、生物和实体的地图。可创建路径点,帮助你找到标记过的位置。
模组
查看物品与配方
模组
使用 JavaScript 编辑配方、添加自定义物品、编写世界事件!
模组
AE2:一款流行的自动化与存储模组
模组
那是什么?一个 Waila/Hwyla 的分支。
评论 0
登录后参与评分
还没有评论,来抢沙发吧