QuickCast PvP
极速、无不同步的热键栏施法,专为竞技 Minecraft PvP 设计。
QuickCast PvP 是一款轻量级、高性能的客户端 Fabric 模组,适用于 Minecraft 26.3(“Wilderness Bound”)。它允许玩家将按键或鼠标按钮绑定为在 1-2 个客户端刻内无缝完成从热键栏中选择、施放/使用/放置物品并恢复原位的操作。
专为竞技 PvP 环境设计,QuickCast PvP 不引入任何自定义数据包类型,尊重所有原版冷却时间和距离限制,并以单调纳秒精度运行,以防止不同步或误触发。
功能特性
- 三个独立动作:
- 快速末影珍珠:默认绑定
鼠标中键(按钮 3)。
- 快速旋风电荷:默认未绑定。
- 快速末影水晶:默认未绑定。
- 智能热键栏搜索:
- 按顺序扫描热键栏槽位 0–8 以查找目标物品(
Items.ENDER_PEARL、Items.WIND_CHARGE、Items.END_CRYSTAL)。
- 副手槽严格不受影响,且不会被检查。
- 1 刻槽位切换与恢复状态机:
- 切换到匹配的物品槽位并触发原版使用行为(
useItem 或 useItemOn)。
- 在
RESTORE(恢复)模式下,会在随后的客户端刻恢复到原始槽位。
- 玩家输入保留:如果在恢复等待期间你手动滚动或按下热键栏数字键,模组会检测到变化并取消恢复操作,绝不与你的手动输入冲突。
- 触发模式(按下 vs 按住并释放):
PRESS(按下):按键按下时立即执行。
HOLD_AND_RELEASE(按住并释放):按键按下时预备,按键释放时施放。如果超过 3 秒安全窗口或在按住期间手动切换热键栏槽位,则自动取消。
- 延迟感知安全保护:
- 可配置的最高延迟上限(
highPingGuardMs,默认 250 毫秒,0 = 禁用)。
- 通过防止在实时延迟(
PlayerInfo.getLatency())超过设定值时进行施法,保护不稳定连接下的槽位不同步。
- 在本地集成服务器客户端(单人游戏或局域网主机)上自动绕过延迟检查。
- 按键绑定冲突检测:
- 在启动和运行时扫描所有原版和模组的
KeyMapping 条目。
- 如果发生冲突,记录警告到控制台,并通过动作栏通知玩家一次,同时在 YACL 配置屏幕上显示实时警告横幅。
- 水晶放置验证:
- 支持
TRY_PLACE(直接服务端验证)和 PLACE_AT_CROSSHAIR_IF_POSSIBLE(客户端预检查,验证黑曜石/基岩、顶面、上方空气以及实体边界框清除)。
- 灵活的反馈与低库存警报:
- 多种反馈样式:
NONE(无)、ACTION_BAR(动作栏)、TITLE(标题)、SOUND(声音)或 ALL(全部)。
- 可配置的低库存警报(
lowStockWarningThreshold,默认 1 个物品,0 = 禁用),当热键栏库存不足时发出警告。
- 单调冷却与覆盖:
- 使用
System.nanoTime() 实现防卡顿计时。
- 可配置的全局冷却时间(默认 120 毫秒,滑块范围 0–2000 毫秒)。
- miss(未命中)时的快速按键重复保护(50 毫秒冷却)防止在物品耗尽时热键栏扫描 spam。
- 每个动作的冷却时间覆盖(
cooldownOverrideMs,-1 = 继承全局设置)。
- 配置文件管理:
- 保存、加载并在
.minecraft/config/quickcastpvp/profiles/<name>.json 中存储的命名配置配置文件之间切换。
- 通过 YACL 配置屏幕或聊天命令(
/quickcastpvp profile [save|load|list])在游戏中管理配置文件。
- 打字与屏幕保护:
allowWhileScreenOpen:当为 false 时,任何打开的 GUI 都会阻止施法。当为 true 时,非文本屏幕(例如背包)允许施法,而 ChatScreen 和活动文本框(EditBox)保持严格保护。
- 游戏内配置:
- 由 YetAnotherConfigLib (YACL v3) 提供支持。
- 如果安装了 Mod Menu,则无缝集成。
- 可通过
/quickcastpvp config 命令或专用的可重新绑定按键访问。
- Schema v2,支持从 v1.0.0 配置自动向后兼容迁移。
安装要求
- Minecraft:
26.3("Wilderness Bound")
- Fabric Loader:
>= 0.19.5
- Java:
25
- 必需依赖项:
- 可选依赖项:
- Mod Menu (
21.0.0-beta.1 或更高版本) 用于通过“模组”屏幕访问。
将 quickcastpvp-1.0.3.jar 及其必需的依赖项放入 .minecraft/mods 目录。
配置参考
配置文件存储在 .minecraft/config/quickcastpvp.json(Schema v2)。
{
"configVersion": 2,
"pearl": {
"enabled": true,
"cooldownOverrideMs": -1,
"triggerMode": "PRESS"
},
"windCharge": {
"enabled": true,
"cooldownOverrideMs": -1,
"triggerMode": "PRESS"
},
"endCrystal": {
"enabled": true,
"cooldownOverrideMs": -1,
"triggerMode": "PRESS",
"crystalPlaceMode": "TRY_PLACE"
},
"afterUseBehavior": "RESTORE",
"requireHotbarOnly": true,
"cooldownMs": 120,
"highPingGuardMs": 250,
"feedbackStyle": "ACTION_BAR",
"lowStockWarningThreshold": 1,
"allowWhileScreenOpen": false
}
配置选项表
| 字段 |
JSON 路径 |
默认值 |
范围 / 选项 |
描述 |
| Config Version |
configVersion |
2 |
Integer |
用于自动迁移的内部架构版本。 |
| Pearl Enabled |
pearl.enabled |
true |
true, false |
启用或禁用 Quick Ender Pearl。 |
| Pearl Cooldown Override |
pearl.cooldownOverrideMs |
-1 |
-1 – 2000 ms |
珍珠的特定冷却时间。-1 继承全局冷却时间。 |
| Pearl Trigger Mode |
pearl.triggerMode |
PRESS |
PRESS, HOLD_AND_RELEASE |
按键按下时施放 vs 按键释放时施放。 |
| Wind Charge Enabled |
windCharge.enabled |
true |
true, false |
启用或禁用 Quick Wind Charge。 |
| Wind Charge Cooldown Override |
windCharge.cooldownOverrideMs |
-1 |
-1 – 2000 ms |
旋风充能的特定冷却时间。-1 继承全局冷却时间。 |
| Wind Charge Trigger Mode |
windCharge.triggerMode |
PRESS |
PRESS, HOLD_AND_RELEASE |
按键按下时施放 vs 按键释放时施放。 |
| End Crystal Enabled |
endCrystal.enabled |
true |
true, false |
启用或禁用 Quick End Crystal。 |
| End Crystal Cooldown Override |
endCrystal.cooldownOverrideMs |
-1 |
-1 – 2000 ms |
末影水晶的特定冷却时间。-1 继承全局冷却时间。 |
| End Crystal Trigger Mode |
endCrystal.triggerMode |
PRESS |
PRESS, HOLD_AND_RELEASE |
按键按下时施放 vs 按键释放时施放。 |
| Crystal Placement Mode |
endCrystal.crystalPlaceMode |
TRY_PLACE |
TRY_PLACE, PLACE_AT_CROSSHAIR_IF_POSSIBLE |
TRY_PLACE 在注视任意方块时向服务器发送放置交互。PLACE_AT_CROSSHAIR_IF_POSSIBLE 首先在本机验证黑曜石/基岩、顶面以及实体清除情况。 |
| After-Use Behavior |
afterUseBehavior |
RESTORE |
RESTORE, KEEP_NEW_SLOT |
RESTORE 在下一个刻返回到原始快捷栏槽位。KEEP_NEW_SLOT 保持选中投掷物品所在的槽位。 |
| Require Hotbar Only |
requireHotbarOnly |
true |
true (灰色不可选) |
将搜索限制为快捷栏槽位 0–8。(参见已知限制)。 |
| Global Cooldown |
cooldownMs |
120 |
0 – 2000 ms |
成功快速施放动作之间的单调冷却时间。 |
| High Ping Guard |
highPingGuardMs |
250 |
0 – 1000 ms |
快速施放中止以防止槽位不同步的最大延迟(毫秒)。设为 0 则禁用。本地单人游戏/LAN 可绕过此限制。 |
| Feedback Style |
feedbackStyle |
ACTION_BAR |
NONE, ACTION_BAR, TITLE, SOUND, ALL |
施放通知的呈现方式。 |
| Low Stock Threshold |
lowStockWarningThreshold |
1 |
0 – 8 |
施放后若剩余快捷栏数量低于或等于此阈值,则发出警告。设为 0 则禁用。 |
| Allow While Screen Open |
allowWhileScreenOpen |
false |
true, false |
当为真时,允许在非文本 GUI(如背包)打开时进行施放。聊天和文本输入框始终受到保护。 |
注:键位绑定存储在 Minecraft 原版的 options.txt 中,可在 选项 > 控制设置 > 键位绑定 > QuickCast PvP 中进行自定义。
Commands
QuickCast PvP 提供客户端命令:
/quickcastpvp config — 打开游戏内配置界面。
/quickcastpvp profile save <name> — 将当前设置保存至 .minecraft/config/quickcastpvp/profiles/<name>.json。
/quickcastpvp profile load <name> — 从指定配置文件加载设置并立即应用。
/quickcastpvp profile list — 在聊天栏列出所有可用的已保存配置配置文件。
Opening the Config Screen
- Via Mod Menu: 在游戏内打开模组菜单,选择 QuickCast PvP,然后点击设置图标。
- Via Command: 在聊天栏执行
/quickcastpvp config。
- Via Keybind: 在 控制设置 > 键位绑定 中绑定“打开 QuickCast 配置”键。
Known Limitations & Design Constraints
- Hotbar Only (
requireHotbarOnly = true):
搜索整个主背包并通过点击槽位数据包将物品交换到快捷栏会引入网络往返延迟、容器状态 ID 更新以及在激烈 PvP 中的不同步风险。为了遵守“No Fake Options”原则,此开关在 YACL 菜单中以可见方式禁用,并带有解释性工具提示,且目前严格默认为仅限快捷栏。
- Vanilla Fair Play:
QuickCast PvP 不会改变原版攻击冷却时间、物品冷却时间、击退距离或服务器数据包验证。在无效方块或占用空间上放置的末影水晶将根据原版机制被服务器拒绝。
Building from Source
要从源代码编译模组:
git clone https://github.com/modclaim/quickcast-pvp.git
cd quickcastpvp
./gradlew build
编译后的产物位于 build/libs/quickcastpvp-1.0.3.jar。
Maintenance release 1.0.3
- 在给予原版使用完整一个刻以进行同步后,在下一个客户端刻恢复之前的快捷栏槽位。挂起的施放操作不能相互覆盖。
- 失败的原版交互使用未命中反馈/冷却时间,恢复原始槽位且不显示成功或低库存消息。
- 按住施放在阻塞界面打开或玩家不可用时取消。在释放时,重新验证启用的设置、物品身份、延迟以及当前的水晶目标。
- 单调冷却时间支持任意的时钟起源和计数器回绕。
- 当支持时,配置文件/保存文件原子替换文件。无效的配置文件不能静默地将活动设置替换为默认值;损坏的活动配置会被备份。
- JDK 25 通过 Gradle 的 Java 工具链进行选择。运行
./gradlew clean build 以进行回归测试和生成分发 JAR。
此产物仅针对 Minecraft 26.3。versions/ 和 platforms/ 中的历史移植版本是独立的源码,不代表由此发布版本进行测试。成功的客户端交互是一种本地预测;多人服务器仍具有最终决定权。不声称任何特定服务器的反作弊接受度。
本次维护更新中的回归测试与文档编写得到了 AI 的协助。该模组在运行时并不使用任何 AI 服务。
合并客户端烟雾测试
在构建好同源的 fps booster 和 MoreEnchanted 项目后,运行 ./gradlew runSmokeClient。独立的 src/smokeclient 测试框架会打开两个设置界面,截取屏幕截图,加载一份回归测试世界的副本,对集成服务器执行真正的珍珠键位操作,检查服务器库存消耗与槽位恢复情况,随后断开连接并关闭。测试代码不会包含在发布的 JAR 文件中。
QuickCast PvP
Lightning-fast, desync-free hotbar casting for competitive Minecraft PvP.
QuickCast PvP is a lightweight, high-performance client-side Fabric mod for Minecraft 26.3 ("Wilderness Bound"). It enables players to bind keys or mouse buttons to instantly select, cast/use/place, and restore items from their hotbar in a single seamless action within 1–2 client ticks.
Designed specifically for competitive PvP environments, QuickCast PvP introduces no custom packet types, respects all vanilla cooldown and reach constraints, and operates with monotonic nanosecond precision to prevent desynchronization or misfires.
Features
- Three Independent Actions:
- Quick Ender Pearl: Default binding
Mouse Middle Click (Button 3).
- Quick Wind Charge: Default unbound.
- Quick End Crystal: Default unbound.
- Smart Hotbar Search:
- Scans hotbar slots 0–8 in sequential order for target items (
Items.ENDER_PEARL, Items.WIND_CHARGE, Items.END_CRYSTAL).
- Off-hand is strictly untouched and never inspected.
- 1-Tick Slot Switch & Restore State Machine:
- Switches to the matching item slot and triggers vanilla use (
useItem or useItemOn).
- Under
RESTORE mode, reverts to your original slot on the subsequent client tick.
- Player Input Preservation: If you manually scroll or press a hotbar number key while a restore is pending, the mod detects the change and cancels the restore, never fighting your manual inputs.
- Trigger Modes (Press vs Hold-and-Release):
PRESS: Executes immediately upon keydown.
HOLD_AND_RELEASE: Primes on keydown and casts upon keyup. Automatically cancels after a 3-second safety window or if you manually switch hotbar slots while holding.
- Latency-Aware Safety Guard:
- Configurable ping ceiling (
highPingGuardMs, default 250 ms, 0 = disabled).
- Protects against slot desync on unstable connections by preventing casts when real-time latency (
PlayerInfo.getLatency()) exceeds your limit.
- Automatically bypasses latency checks on the local integrated-server client (singleplayer or LAN host).
- Keybind Conflict Detection:
- Scans all vanilla and modded
KeyMapping entries at startup and runtime.
- Logs warnings to console, notifies the player once via action bar if a conflict occurs, and displays real-time warning banners in the YACL config screen.
- Crystal Placement Validation:
- Supports
TRY_PLACE (direct server-side validation) and PLACE_AT_CROSSHAIR_IF_POSSIBLE (client-side pre-check verifying Obsidian/Bedrock, top face, air above, and entity bounding box clearance).
- Flexible Feedback & Low-Stock Alerts:
- Multiple feedback styles:
NONE, ACTION_BAR, TITLE, SOUND, or ALL.
- Configurable low-stock alert (
lowStockWarningThreshold, default 1 item, 0 = disabled) warning you when hotbar supply is running low.
- Monotonic Cooldowns & Overrides:
- Uses
System.nanoTime() for lag-immune timing.
- Configurable global cooldown (default 120 ms, slider 0–2000 ms).
- Rapid key repeat protection on misses (50 ms cooldown) prevents hotbar scanning spam when out of items.
- Per-action cooldown overrides (
cooldownOverrideMs, -1 = inherit global).
- Profile Management:
- Save, load, and switch between named configuration profiles stored in
.minecraft/config/quickcastpvp/profiles/<name>.json.
- Manage profiles in-game through the YACL config screen or via chat commands (
/quickcastpvp profile [save|load|list]).
- Typing & Screen Protection:
allowWhileScreenOpen: When false, any open GUI blocks casting. When true, non-text screens (e.g. inventory) allow casting while ChatScreen and active text boxes (EditBox) remain strictly protected.
- In-Game Configuration:
- Powered by YetAnotherConfigLib (YACL v3).
- Integrates seamlessly with Mod Menu if installed.
- Accessible via
/quickcastpvp config command or a dedicated rebindable keybind.
- Schema v2 with automatic backward-compatible migration from v1.0.0 configurations.
Installation Requirements
- Minecraft:
26.3 ("Wilderness Bound")
- Fabric Loader:
>= 0.19.5
- Java:
25
- Required Dependencies:
- Optional Dependencies:
- Mod Menu (
21.0.0-beta.1 or newer) for access via the "Mods" screen.
Drop quickcastpvp-1.0.3.jar and required dependencies into your .minecraft/mods directory.
Configuration Reference
Configuration is stored at .minecraft/config/quickcastpvp.json (Schema v2).
{
"configVersion": 2,
"pearl": {
"enabled": true,
"cooldownOverrideMs": -1,
"triggerMode": "PRESS"
},
"windCharge": {
"enabled": true,
"cooldownOverrideMs": -1,
"triggerMode": "PRESS"
},
"endCrystal": {
"enabled": true,
"cooldownOverrideMs": -1,
"triggerMode": "PRESS",
"crystalPlaceMode": "TRY_PLACE"
},
"afterUseBehavior": "RESTORE",
"requireHotbarOnly": true,
"cooldownMs": 120,
"highPingGuardMs": 250,
"feedbackStyle": "ACTION_BAR",
"lowStockWarningThreshold": 1,
"allowWhileScreenOpen": false
}
Config Options Table
| Field |
JSON Path |
Default |
Range / Options |
Description |
| Config Version |
configVersion |
2 |
Integer |
Internal schema version for automatic migrations. |
| Pearl Enabled |
pearl.enabled |
true |
true, false |
Enables or disables Quick Ender Pearl. |
| Pearl Cooldown Override |
pearl.cooldownOverrideMs |
-1 |
-1 – 2000 ms |
Specific cooldown for pearls. -1 inherits global cooldown. |
| Pearl Trigger Mode |
pearl.triggerMode |
PRESS |
PRESS, HOLD_AND_RELEASE |
Cast on key press vs key release. |
| Wind Charge Enabled |
windCharge.enabled |
true |
true, false |
Enables or disables Quick Wind Charge. |
| Wind Charge Cooldown Override |
windCharge.cooldownOverrideMs |
-1 |
-1 – 2000 ms |
Specific cooldown for wind charges. -1 inherits global cooldown. |
| Wind Charge Trigger Mode |
windCharge.triggerMode |
PRESS |
PRESS, HOLD_AND_RELEASE |
Cast on key press vs key release. |
| End Crystal Enabled |
endCrystal.enabled |
true |
true, false |
Enables or disables Quick End Crystal. |
| End Crystal Cooldown Override |
endCrystal.cooldownOverrideMs |
-1 |
-1 – 2000 ms |
Specific cooldown for crystals. -1 inherits global cooldown. |
| End Crystal Trigger Mode |
endCrystal.triggerMode |
PRESS |
PRESS, HOLD_AND_RELEASE |
Cast on key press vs key release. |
| Crystal Placement Mode |
endCrystal.crystalPlaceMode |
TRY_PLACE |
TRY_PLACE, PLACE_AT_CROSSHAIR_IF_POSSIBLE |
TRY_PLACE sends the placement interaction to the server whenever looking at any block. PLACE_AT_CROSSHAIR_IF_POSSIBLE validates Obsidian/Bedrock, top face, and entity clearance locally first. |
| After-Use Behavior |
afterUseBehavior |
RESTORE |
RESTORE, KEEP_NEW_SLOT |
RESTORE returns to your original hotbar slot on the next tick. KEEP_NEW_SLOT leaves the cast item selected. |
| Require Hotbar Only |
requireHotbarOnly |
true |
true (greyed out) |
Restricts search to hotbar slots 0–8. (See Known Limitations). |
| Global Cooldown |
cooldownMs |
120 |
0 – 2000 ms |
Monotonic cooldown between successful quickcast actions. |
| High Ping Guard |
highPingGuardMs |
250 |
0 – 1000 ms |
Maximum latency (ms) before quickcast aborts to prevent slot desync. 0 disables. Bypassed on local singleplayer/LAN. |
| Feedback Style |
feedbackStyle |
ACTION_BAR |
NONE, ACTION_BAR, TITLE, SOUND, ALL |
Presentation method for casting notifications. |
| Low Stock Threshold |
lowStockWarningThreshold |
1 |
0 – 8 |
Warns if remaining hotbar count is at or below this threshold after casting. 0 disables. |
| Allow While Screen Open |
allowWhileScreenOpen |
false |
true, false |
When true, allows casting while non-text GUIs (e.g. inventory) are open. Chat and text fields are always protected. |
Note: Keybindings are stored in vanilla Minecraft's options.txt and can be customized under Options > Controls > Key Binds > QuickCast PvP.
Commands
QuickCast PvP provides client-side commands:
/quickcastpvp config — Opens the in-game configuration screen.
/quickcastpvp profile save <name> — Saves active settings to .minecraft/config/quickcastpvp/profiles/<name>.json.
/quickcastpvp profile load <name> — Loads settings from the specified profile and applies them immediately.
/quickcastpvp profile list — Lists all available saved configuration profiles in chat.
Opening the Config Screen
- Via Mod Menu: Open the Mods menu in-game, select QuickCast PvP, and click the Settings icon.
- Via Command: Execute
/quickcastpvp config in chat.
- Via Keybind: Bind the "Open QuickCast Config" key under Controls > Key Binds.
Known Limitations & Design Constraints
- Hotbar Only (
requireHotbarOnly = true):
Searching the entire main inventory and swapping items into the hotbar via click-slot packets introduces network round-trip delays, container state ID updates, and desynchronization risks in intense PvP. To uphold the "No Fake Options" rule, this toggle is visibly disabled in the YACL menu with an explanatory tooltip and currently defaults strictly to hotbar-only.
- Vanilla Fair Play:
QuickCast PvP does not alter vanilla attack cooldowns, item cooldowns, reach distances, or server packet validation. End Crystals placed on invalid blocks or occupied spaces will be rejected by the server according to vanilla mechanics.
Building from Source
To compile the mod from source:
git clone https://github.com/modclaim/quickcast-pvp.git
cd quickcastpvp
./gradlew build
The compiled artifact will be located at build/libs/quickcastpvp-1.0.3.jar.
Maintenance release 1.0.3
- Restores the previous hotbar slot on the next client tick, after giving vanilla use a full tick to synchronize. Pending casts cannot overwrite each other.
- Failed vanilla interactions use miss feedback/cooldown, restore the original slot and do not display a success or low-stock message.
- Held casts cancel when a blocking screen opens or the player becomes unavailable. On release, enabled settings, item identity, latency and the current crystal target are revalidated.
- Monotonic cooldowns support arbitrary clock origins and counter wraparound.
- Configuration/profile saves replace files atomically when supported. Invalid profiles cannot silently replace the active settings with defaults; corrupt active configurations are backed up.
- JDK 25 is selected through Gradle's Java toolchain. Run
./gradlew clean build for regression tests and release JARs.
This artifact targets Minecraft 26.3 only. Historical ports in versions/ and platforms/ are separate sources and are not represented as tested by this release. A successful client interaction is a local prediction; multiplayer servers remain authoritative. No server-specific anticheat acceptance is claimed.
AI assisted this maintenance update, regression tests and documentation. The mod does not use an AI service at runtime.
Combined client smoke test
With the sibling fps booster and MoreEnchanted projects built, run ./gradlew runSmokeClient. The separate src/smokeclient harness opens both settings screens, captures screenshots, loads a copy of the regression world, exercises the real pearl keybind against the integrated server, checks server inventory consumption and slot restoration, then disconnects and closes. Test code is excluded from release JARs.
评论 0
登录后参与评分
还没有评论,来抢沙发吧