khalidbenz7860

a minecraft fabric mod for 26.1.2 which adds a few hundred new, offensive death messages to the game

Kodari AI
KodariJul 2 at 6:24 pm 2
SaltyDeaths
A Fabric mod for Minecraft 1.21.11 that adds hundreds of offensive, humorous, and creative death messages to replace vanilla death text. Death by any cause now shows a randomly selected custom message from an extensive pool arranged by damage type (falling, burning, drowning, mob attacks, player kills, explosions, magic, starvation, and more). Lightweight mixin-based implementation with zero config needed.

Let me read the relevant docs before writing any code.

Creating SaltyDeaths — a Fabric mod for 1.21.11 that injects hundreds of offensive death messages into Minecraft.

SaltyDeaths
A Fabric mod for Minecraft 1.21.11 that replaces every death message with a randomly selected offensive, humorous, or creative alternative. Covers all damage types: fall, fire, drowning, explosions, mobs, PvP, magic, starvation, suffocation, lightning, thorns, and more. Uses a mixin into DamageSource.getDeathMessage() with zero config required — drop in and enjoy the salt.

Now I’ll plan the architecture and create everything.

Architecture:

  1. Mixin into DamageSource.getDeathMessage(LivingEntity) → cancel + return custom Text

  2. DeathMessageManager stores ~400+ messages across ~20 damage categories (fall, fire, drown, starve, pvp, mob, blast, magic, etc.)

  3. Entries mapped by damage type message ID, with fallback to “generic”

  4. If attacker exists, pick from “killer” pool for that category

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
gradle.properties
settings.gradle
Code
8 143
src/main/java/com/saltydeaths/SaltyDeaths.java
package com.saltydeaths;

import net.fabricmc.api.ModInitializer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class SaltyDeaths implements ModInitializer {
    public static final String MOD_ID = "saltydeaths";
    public static final Logger LOGGER = LoggerFactory.getLogger(MOD_ID);

    @Override
    public void onInitialize() {
        LOGGER.info("SaltyDeaths loaded — prepare for salty messages!");
    }
}