Creative Hit 模组
适用于 Minecraft 1.21.11 的 Fabric 客户端模组
在原版 Minecraft 中,对创造模式下的玩家造成伤害是无效的——创造模式玩家默认具有无敌状态。这个模组改变了这一机制:当你击中处于创造模式的玩家时,模组会向服务器发送 /damage <目标> 1 generic_kill 命令,造成 1 点无法避免的伤害。
工作原理
- 你攻击了一位处于创造模式的玩家。
- 模组通过 Mixin 注入到
ClientPlayerInteractionManager#attackEntity 中拦截了这一行为。
- 它向服务器发送了一个包含指令
damage <target> 1 generic_kill 的 CommandExecutionC2SPacket。
- 服务器执行该指令,造成 1 点
generic_kill 类型的伤害——这可以绕过创造模式无敌、护甲以及抗性提升效果。
为什么选择这种方法?
该模组使用 CommandExecutionC2SPacket(而非 sendChatCommand)来绕过 Minecraft 的聊天签名系统。现代 Minecraft 会使用加密密钥对聊天命令进行签名;直接发送数据包可避免任何签名失败或静默丢弃的情况。
权限检查由服务器负责——如果你未被授予 OP 权限,服务器将直接拒绝该命令。
要求
| 要求 |
版本 |
| Minecraft |
1.21.11 |
| Fabric Loader |
≥0.16.x |
| Fabric API |
任何兼容版本 |
安装方法
- 为 Minecraft 1.21.11 安装 Fabric Loader。
- 将模组 JAR 文件放入
mods/ 文件夹。
- 确保你在服务器中拥有 OP 权限(执行
/op <yourname>),或在单人游戏中启用了作弊。
- 完成——无需进行额外配置。
权限说明
/damage 命令需要 GAMEMASTERS 权限等级(OP 等级 1+)。该模组不会在客户端检查权限——它仅发送数据包,由服务器来执行访问控制。
- 单人游戏:始终启用(作弊功能隐式开启)。
- 服务器:你必须是管理员(
/op)。默认的 /op 等级(权限等级 2 → OWNERS)已绰绰有余。
技术细节
- 仅客户端:该模组完全通过 Mixin 在客户端运行,无需安装服务端组件。
- 伤害类型:
minecraft:generic_kill — 标记有 BYpASSES_INVULNERABILITY 和 BYPASSES_RESISTANCE。无视创造模式、护甲或药水效果,每次命中造成 1 HP 伤害。
- 数据包:直接使用
CommandExecutionC2SPacket 以绕过 Minecraft 的聊天签名层。
从源码构建
./gradlew build
编译后的 JAR 文件将位于 build/libs/creative-hit-mod-<version>.jar。
许可证
MIT
Creative Hit Mod
A Fabric client-side mod for Minecraft 1.21.11
In vanilla Minecraft, attacking a player in Creative mode does nothing — Creative players are invulnerable by default. This mod changes that: when you hit a Creative-mode player, the mod sends the /damage <target> 1 generic_kill command to the server, dealing 1 point of unavoidable damage.
How it works
- You hit another player who is in Creative mode.
- The mod intercepts this via a Mixin into
ClientPlayerInteractionManager#attackEntity.
- It sends a
CommandExecutionC2SPacket with the command damage <target> 1 generic_kill directly to the server.
- The server executes the command, dealing 1 HP of
generic_kill damage — this bypasses Creative invulnerability, armor, and resistance effects.
Why this approach?
The mod uses CommandExecutionC2SPacket (not sendChatCommand) to bypass Minecraft's chat signing system. Modern Minecraft signs chat commands with cryptographic keys; sending the packet directly avoids any signing failures or silent drops.
Permission checks are left to the server — if you're not OP'd, the server simply rejects the command.
Requirements
| Requirement |
Version |
| Minecraft |
1.21.11 |
| Fabric Loader |
≥0.16.x |
| Fabric API |
Any compatible release |
Installation
- Install the Fabric Loader for Minecraft 1.21.11.
- Place the mod JAR in your
mods/ folder.
- Ensure you are OP'd on the server (
/op <yourname>), or that cheats are enabled in singleplayer.
- That's it — no configuration needed.
Permissions
The /damage command requires GAMEMASTERS permission level (OP level 1+). The mod does not check permissions client-side — it sends the packet and lets the server enforce access.
- Singleplayer: Always enabled (cheats implicitly on).
- Server: You must be an operator (
/op). The default /op level (permission level 2 → OWNERS) is more than sufficient.
Technical details
- Client-side only: The mod runs entirely on the client via a Mixin. No server-side installation is required.
- Damage type:
minecraft:generic_kill — tagged with BYpASSES_INVULNERABILITY and BYPASSES_RESISTANCE. Deals 1 HP per hit regardless of Creative mode, armor, or potion effects.
- Packet: Uses
CommandExecutionC2SPacket directly to avoid Minecraft's chat signing layer.
Building from source
./gradlew build
The built JAR will be in build/libs/creative-hit-mod-<version>.jar.
License
MIT
评论 0
登录后参与评分
还没有评论,来抢沙发吧