Skip to content

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Minecraft LED Events for Minecraft Java Edition 26.2

Minecraft LED Events is a server-side Fabric mod that detects selected Minecraft events and forwards them to a Home Assistant webhook.

The following events are currently supported:

  • Player death → death
  • Entering the Nether → nether
  • Entering the End → end
  • Returning to the Overworld → overworld
  • Mining Diamond Ore or Deepslate Diamond Ore → diamond
  • Mining Ancient Debris → ancient_debris
  • Defeating the Ender Dragon → ender_dragon_defeated
  • Defeating the Wither → wither_defeated
  • Defeating a Warden → warden_defeated
  • Defeating an Elder Guardian → elder_guardian_defeated
  • Reaching XP level milestones 10, 20, 30, ... → level_10, level_20, level_30, ...
  • Completing an announced advancement → advancement_task, advancement_goal, or advancement_challenge
  • Successfully completing a raid / receiving Hero of the Village → raid_victory

Raid victories are detected through the Hero of the Village status effect that is granted after a successful raid. A 10-second deduplication window prevents a multiplayer raid from sending the same victory event once per participating player.

For testing without completing a full raid, you can grant the effect manually:

/effect give @s minecraft:hero_of_the_village 30 0

Each event is sent asynchronously to Home Assistant as JSON:

{
  "event": "diamond",
  "player": "Simon"
}

Home Assistant can then use the event to control lights, scenes, animations, or other smart-home devices.

Architecture

Minecraft Fabric Event
        ↓
Minecraft LED Events Mod
        ↓ HTTP POST / JSON
Home Assistant Webhook
        ↓
Home Assistant Automation
        ↓
Smart RGB Light

Installation

  1. Install Fabric Loader 0.19.3 or newer for Minecraft Java Edition 26.2.

  2. Download the Fabric API version for Minecraft 26.2.

  3. Copy the Fabric API and the mod file into:

    %APPDATA%\.minecraft\mods
    
  4. The mod file should be named similar to:

    minecraft-led-events-1.1.0+mc26.2.jar
    
  5. Start Minecraft using the Fabric profile.

On the first launch, the mod creates the following configuration file:

%APPDATA%\.minecraft\config\minecraft-led-events.json

Example configuration:

{
  "webhookUrl": "http://HOME_ASSISTANT_IP:8123/api/webhook/minecraft_frame_color_sync",
  "sendOverworldEvent": true,
  "requestTimeoutSeconds": 3
}

Replace HOME_ASSISTANT_IP with the local IP address or hostname of your Home Assistant instance.

Home Assistant

An example Home Assistant automation is included here:

home-assistant/minecraft_frame_events.yaml

The automation listens for webhook events and controls the configured RGB light.

Update the entity ID to match your own Home Assistant light:

entity_id: light.minecraft_led_frame

Normal events can display a single color for a few seconds, while special events such as boss defeats can trigger multi-color animations.

LAN Multiplayer

The mod only needs to be installed on the computer that hosts the LAN world.

It runs on Minecraft's integrated server and can therefore detect events caused by all connected players, including:

  • Player deaths
  • Dimension changes
  • Mined blocks
  • Defeated bosses

The mod does not add custom blocks, items, entities, or network packets. Other players do not need to install it.

Building from Source

A JDK version 21 or newer is required to build the project.

Minecraft Java Edition 26.2 itself runs on Java 25, so JDK 25 is recommended for development.

Windows PowerShell

Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
.\build.ps1

Linux or macOS

chmod +x build.sh
./build.sh

The generated JAR file is placed in:

build/

License

Creative Commons Attribution–NonCommercial 4.0

Full license text: https://creativecommons.org/licenses/by-nc/4.0/legalcode.txt

About

A mod for minecraft that sends custom events to home assistant, e.g. for color synchronization.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages