Stress Ball - Auto-Attack Baubles
此模组添加了两个受《泰拉瑞亚》启发的饰品:Stress Ball 及其升级版 Pressure Ball。这两个物品均依赖 Baubles 模组,专为 Minecraft 1.12.2 设计。
功能
Stress Ball
- 当玩家静止且未打开任何 GUI(如背包、箱子、工作台)时,每 0.5 秒自动执行一次左键攻击。
- 攻击遵循武器的攻击速度:若武器冷却时间超过 0.5 秒,则按武器的自然速率进行攻击;若冷却时间更短,则通过 0.5 秒的最小间隔防止超出无敌帧限制。
- 攻击范围固定为 3 格(与默认玩家攻击距离相同)。
- 可配置的物品黑名单:若玩家主手持有被列入黑名单的物品,则不会触发自动攻击。
Pressure Ball
- Stress Ball 的升级版。
- 在静止状态下同样会自动攻击,但不受任何 GUI 限制,且在移动后会有一段短暂的冷却时间。
- 除标准的左键攻击外,还可配置对特定物品触发右键操作(例如 Tinkers' Construct 的飞镖、TConEvo 的法杖、PlusTIC 的激光枪)。
- 具备可配置的实体黑名单(如物品展示框、画作、盔甲架),以防止误伤。
- 继承与 Stress Ball 相同的攻击范围、冷却机制及物品黑名单。
合成配方
Stress Ball
- 图案:
- 铁块(I)位于四角
- 红石块(R)位于上下左右四个方位
- 金块(G)位于中心
- 结果:1 个 Stress Ball
Pressure Ball
- 图案:
- 青金石块(L)位于四角
- 钻石块(D)位于上下左右四个方位
- Stress Ball(S)位于中心
- 结果:1 个 Pressure Ball
所有配方均为无序合成,可在游戏内使用 JEI 查看。
配置
首次运行后,会在 config/stressball.json 生成一个 JSON 配置文件。你可以编辑该文件来自定义以下内容:
{
"itemBlacklist": ["cyclicmagic:storage_bag"],
"entityBlacklist": ["minecraft:item_frame", "minecraft:painting", "minecraft:armor_stand", "minecraft:item"],
"rightClickItems": ["tconstruct:shuriken", "tconevo:tool_sceptre", "plustic:laser_gun"]
}
- itemBlacklist:持有此列表中的物品时不会触发自动攻击。
- entityBlacklist:此列表中的实体不会被攻击。
- rightClickItems(仅限 Pressure Ball):当持有此列表中的任意物品时,Pressure Ball 将触发其右键动作,而非左键攻击。
备注
- 本模组的开发得到了 AI 的帮助。
- 需要 Minecraft 1.12.2、Forge 和 Baubles。
致谢
灵感来源于《泰拉瑞亚》中的 Stress Ball 物品。
许可证: MIT。所有版本均采用 MIT 许可证。v0.0.3+ 版本在 JAR 包内包含 LICENSE.txt 文件。
Stress Ball - Auto-Attack Baubles
This mod adds two new baubles inspired by Terraria: the Stress Ball and its upgraded version, the Pressure Ball. Both items require the Baubles mod as a dependency and are designed for Minecraft 1.12.2.
Features
Stress Ball
- Automatically performs a left-click attack every 0.5 seconds when the player stands still and has no GUI open (e.g., inventory, chests, crafting tables).
- Attack respects the weapon's attack speed: if the weapon's cooldown is longer than 0.5 seconds, attacks occur at the weapon's natural rate; if shorter, a 0.5‑second minimum interval prevents exceeding the invincibility frame limit.
- Attack range is fixed at 3 blocks (same as default player reach).
- Configurable item blacklist: if the player holds a blacklisted item in the main hand, no automatic attacks occur.
Pressure Ball
- An upgraded version of the Stress Ball.
- Also attacks automatically when standing still, but without any GUI restriction and includes a brief cooldown after moving.
- In addition to the standard left-click attack, it can be configured to trigger right‑click actions for specific items (e.g., Tinkers' Construct shurikens, TConEvo spectres, PlusTIC laser guns).
- Features a configurable entity blacklist (e.g., item frames, paintings, armor stands) to prevent accidental attacks.
- Inherits the same attack range, cooldown mechanics, and item blacklist as the Stress Ball.
Crafting Recipes
Stress Ball
- Pattern:
- Iron blocks (I) in the corners
- Redstone blocks (R) in cardinal directions
- Gold block (G) in the center
- Result: 1 Stress Ball
Pressure Ball
- Pattern:
- Lapis lazuli blocks (L) in the corners
- Diamond blocks (D) in cardinal directions
- Stress Ball (S) in the center
- Result: 1 Pressure Ball
All recipes are shapeless and can be viewed in-game with JEI.
Configuration
A JSON configuration file is generated at config/stressball.json after the first run. You can edit it to customize:
{
"itemBlacklist": ["cyclicmagic:storage_bag"],
"entityBlacklist": ["minecraft:item_frame", "minecraft:painting", "minecraft:armor_stand", "minecraft:item"],
"rightClickItems": ["tconstruct:shuriken", "tconevo:tool_sceptre", "plustic:laser_gun"]
}
- itemBlacklist: Items in this list will not trigger automatic attacks when held.
- entityBlacklist: Entities in this list will not be attacked.
- rightClickItems (Pressure Ball only): When holding any item from this list, the Pressure Ball will trigger its right‑click action instead of a left‑click attack.
Notes
- This mod was created with the assistance of AI.
- Requires Minecraft 1.12.2, Forge, and Baubles.
Credits
Inspired by the Stress Ball item from Terraria.
License: MIT. All versions are MIT-licensed. v0.0.3+ includes LICENSE.txt inside the JAR.
下载 Stress Ball
下载 Stress Ball
下载 Stress Ball
下载 Stress Ball
下载 Stress Ball
下载 Stress Ball
下载 Stress Ball
下载 Stress Ball
下载 Stress Ball
下载 Stress Ball
修复
- 压力球自动挖矿速度比手动更快。原版在每次破坏后会损失 5 个刻(
PlayerControllerMP#blockHitDelay),并在第一次点击方块时额外损失 1 个刻以清零进度;这些机制此前未被正确复现,导致钻石镐开采石头需要 6 个刻而非 12 个刻(约为原版速度的两倍)。现在自动挖矿已实现与手动挖矿逐刻同步。 - 自动挖矿时间现在基于
IBlockState#getPlayerRelativeBlockHardness进行累积,而非直接使用ItemStack#getDestroySpeed,因此工具的效率(Efficiency)、迅捷(Haste)、采矿疲劳(Mining Fatigue)以及水下惩罚等效果将与原版完全一致。 - 同时佩戴两个压力球会导致同一个挖掘进度在游戏每刻中推进两次,从而使挖矿速度翻倍。
- 压力球掉落了低于手持工具采集等级的方块产出的物品(例如木镐开采铁矿石或黑曜石)。现在的破坏和掉落行为遵循
Block#canHarvestBlock,与PlayerInteractionManager#tryHarvestBlock的行为完全相同。 - 自动挖矿的泥土、沙子和砾石耗时约为原版的 3.3 倍,这是因为原本使用的 30/100 硬度系数依赖的是物品级别的采集判定,而对于根本不需要工具即可采集的方块而言,该判定是错误的。
- 自动攻击现在与手动攻击的节奏匹配,因此更快的武器会以其应有的速度进行攻击
- 轻微的性能改进
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
模组
显示你正在注视的方块的信息。(适用于 Minecraft 1.16+ 的 Hwyla/Waila 分支)
模组
在游戏画面角落显示附近世界地形、玩家、生物和实体的地图。可创建路径点,帮助你找到标记过的位置。
模组
查看物品与配方
模组
使用 JavaScript 编辑配方、添加自定义物品、编写世界事件!
模组
AE2:一款流行的自动化与存储模组
模组
那是什么?一个 Waila/Hwyla 的分支。
评论 0
登录后参与评分
还没有评论,来抢沙发吧