promotional bannermobile promotional banner

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:

  • gamerule must match the in-game gamerule identifier (usually namespaced like minecraft:doDaylightCycle).
  • when.equals is compared to the serialized new gamerule value; booleans should be "true" / "false".
  • After editing JSON, run /reload to apply changes.

Supported Actions

The datapack schema uses an actions[] array. Supported action types:

  • broadcast_title

    • title (Component JSON) optional
    • subtitle (Component JSON) optional
    • fadeIn (int, default 10)
    • stay (int, default 40)
    • fadeOut (int, default 10)
  • broadcast_sound

    • sound (string, resource location like minecraft:block.note_block.pling)
    • volume (float, default 1.0)
    • pitch (float, default 1.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 Team

profile avatar
Owner
Grand Artisan tier icon
  • 1
    Followers
  • 31
    Projects
  • 18.6M
    Downloads

More from ImEden6View all

  • Prominence™ II: Hasturian Era project image

    Prominence™ II: Hasturian Era

    Lore-rich RPG | Explore the Kingdom of Vaaz with voiced NPCs, a custom Questing System, Custom Gear, Bosses, Talent Tree and more!

    • 13.4M
    • November 25, 2026
  • Anarchy Minibosses For Prominence project image

    Anarchy Minibosses For Prominence

    This project adds a stripped-down fork of RPG Minibosses for made for the Prominence modpack. It keeps the Forsaken Adventurers and how they spawn, and makes almost everything about them configurable, including drops, spawning, patrols and stats.

    • 59
    • November 22, 2026
  • Create: Odds 'N Ends project image

    Create: Odds 'N Ends

    This project is a create addon w/ a copy lathe, a jacquard loom, a barrel organ and a cnc mill, each one does one weird job

    • 135
    • November 17, 2026
  • OPAC-UI project image

    OPAC-UI

    This project adds a client-side companion for Open Parties and Claims that turns its command-only party management into a full in-game GUI for members, invites, and allies.

    • 679.5K
    • November 12, 2026
  • Prominence™ II: Hasturian Era project image

    Prominence™ II: Hasturian Era

    Lore-rich RPG | Explore the Kingdom of Vaaz with voiced NPCs, a custom Questing System, Custom Gear, Bosses, Talent Tree and more!

    • 13.4M
    • November 25, 2026
  • Anarchy Minibosses For Prominence project image

    Anarchy Minibosses For Prominence

    This project adds a stripped-down fork of RPG Minibosses for made for the Prominence modpack. It keeps the Forsaken Adventurers and how they spawn, and makes almost everything about them configurable, including drops, spawning, patrols and stats.

    • 59
    • November 22, 2026
  • Create: Odds 'N Ends project image

    Create: Odds 'N Ends

    This project is a create addon w/ a copy lathe, a jacquard loom, a barrel organ and a cnc mill, each one does one weird job

    • 135
    • November 17, 2026
  • OPAC-UI project image

    OPAC-UI

    This project adds a client-side companion for Open Parties and Claims that turns its command-only party management into a full in-game GUI for members, invites, and allies.

    • 679.5K
    • November 12, 2026