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.
评论 0
登录后参与评分
还没有评论,来抢沙发吧