Gamerule Events
Gamerule Events is a Minecraft mod for NeoForge that allows you to trigger custom actions when game rules change. Actions are defined via data packs.
介绍
Gamerule Events
Gamerule Events is a Minecraft mod for NeoForge that allows you to trigger custom actions when game rules change. Actions are defined via data packs.
Features
- Trigger Actions on GameRule Change: Execute titles, subtitles, and sounds when a specific game rule is modified.
- Data Pack Driven: Define your own rules and actions in
data/<namespace>/gamerule_events/JSON files. - Multiple Actions: Supports setting title/subtitle (with fade timings) and playing sounds.
Example Configuration
Create a file at data/<namespace>/gamerule_events/<name>.json:
{
"rules": [
{
"gamerule": "minecraft:doDaylightCycle",
"when": {
"equals": "false"
},
"actions": [
{
"type": "broadcast_title",
"title": { "text": "Daylight Cycle Stopped", "color": "red" },
"subtitle": { "text": "Gamerule change detected", "color": "yellow" },
"fadeIn": 10,
"stay": 60,
"fadeOut": 10
},
{
"type": "broadcast_sound",
"sound": "minecraft:block.note_block.pling",
"volume": 1.0,
"pitch": 1.0
}
]
}
]
}
Notes:
gamerulemust match the in-game gamerule identifier (usually namespaced likeminecraft:doDaylightCycle).when.equalsis compared to the serialized new gamerule value; booleans should be"true"/"false".- After editing JSON, run
/reloadto apply changes.
Supported Actions
The datapack schema uses an actions[] array. Supported action types:
-
broadcast_titletitle(Component JSON) optionalsubtitle(Component JSON) optionalfadeIn(int, default10)stay(int, default40)fadeOut(int, default10)
-
broadcast_soundsound(string, resource location likeminecraft:block.note_block.pling)volume(float, default1.0)pitch(float, default1.0)
Installation
Gamerule Events targets NeoForge 26.1 (Minecraft 26.1) or later.
License
This project is licensed under the MIT License for details.
常见问题
Gamerule Events 支持哪些 Minecraft 版本?
Gamerule Events 支持 Minecraft Java 版 26.1–26.2,共 4 个版本,可用的加载器:NeoForge。下载时注意选择和你游戏版本一致的文件。
Gamerule Events 怎么安装?
先用 PCL2 或 HMCL 启动器安装对应版本的 NeoForge,再把下载的 .jar 文件放进游戏目录的 mods 文件夹,重新启动游戏即可。开启了版本隔离的,mods 文件夹在 versions/版本名 下面。
ImEden6 的其他作品
查看全部 →VitalityFix
修复 ZenithAttributes 中「生命迸发」药水效果的问题。
Icarus x Transmog compat
此项目为 Icarus Wings 和 Transmog 添加了兼容性。
Gun Scaling
本项目将 Ranged Weapon API 的远程伤害加成添加到了 Marium's Soulslike Weapon 的枪械上
TravellersBackpack-Transmog-Compat
这个项目为 Traveler's Backpack 和 Transmog 添加了兼容性。
评论
登录后评论和评分