YouTube PREMIUM
📎 1 file 22,348 chars
📄
pasted-code-1791195371841.txt
txt 515 lines
▶
You are a senior Minecraft Fabric mod engineer. Build a complete, COMPILING, client-side mod from the spec below. It will be built by an AI coding tool, so keep it simple, small, and robust.

# SPEC (PART 1: DEATH MESSAGES ONLY)

Platform: Fabric (Loader + Fabric API), CLIENT-SIDE ONLY (fabric.mod.json environment "client"). Works on any server, vanilla ones included, and in singleplayer.
Minecraft version: 1.21.11
Language: Java 21
Build tool: Gradle (Fabric Loom), official Mojang mappings
Mod name: DeadSoulLaughs. Mod ID: deadsoullaughs.

IDEA:
When the player dies, the vanilla death screen gets a hilarious roast chosen from the exact cause of death, the killer, and the moment. Every death feels personal. No animations or pixel art in this part.

HARD CONSTRAINTS
- No image, sound, or model files. Text is drawn with GuiGraphics only.
- Max 12 source files. Use Fabric API ScreenEvents (AFTER_INIT and afterRender for DeathScreen). Use at most ONE small accessor mixin, only to read DeathScreen's cause-of-death Component (verify the field name in 1.21.11 mojmap; if it fails, use the generic pool).
- Never hide or alter vanilla title, text, or buttons. Never intercept clicks. Respawn and Title Screen must always work. Draw in the bottom third of the screen.
- GuiGraphics changed in recent versions. Verify signatures, never invent methods.

1. CAUSE DETECTION
- Read the Component as TranslatableContents. Use the key (death.attack.*, death.fell.*) and its args. Arg 0 is the victim, arg 1 is usually the killer, arg 2 the weapon on ".item" variants.
- Killer: if arg 1 is translatable with key entity.minecraft., that id picks a mob pool. If it is a plain name and the key is death.attack.player*, use the pvp pool with {killer} and {weapon}. Anything else uses the generic mob lines.
- Put the key-to-pool mapping in assets/deadsoullaughs/death_causes.json so it can be extended without code. Verify all keys starting with "death." in assets/minecraft/lang/en_us.json of 1.21.11 and map every one. Log each unmapped key once to latest.log (debugLogUnknownCause).
- Mapping:
  death.attack.fall, death.fell.accident.generic -> fall
  death.fell.accident.ladder -> fall_ladder
  death.fell.accident.vines, weeping_vines, twisting_vines -> fall_vines
  death.fell.accident.scaffolding -> fall_scaffolding
  death.fell.assist, death.fell.killer, death.fell.finish -> fall_pushed
  inFire, onFire -> fire | lava -> lava | hotFloor -> magma | drown -> drown | starve -> starve
  inWall -> suffocation | cramming -> cramming | cactus -> cactus | sweetBerryBush -> berry
  stalagmite, fallingStalactite -> dripstone | anvil, fallingBlock -> anvil | outOfWorld -> void
  lightningBolt -> lightning | magic, indirectMagic -> magic | wither -> wither_effect | freeze -> freeze
  fireworks -> fireworks | explosion, explosion.player -> explosion | badRespawnPoint -> bed_explosion
  flyIntoWall -> elytra_wall | thorns -> thorns | sting -> bee_sting | dragonBreath -> dragon_breath
  arrow -> arrow | trident -> trident | fireball, witherSkull -> fireball | spit -> spit
  mace_smash -> mace | sonic_boom -> sonic_boom | wind charge keys -> wind_charge
  genericKill -> kill_command | player, *.player -> pvp | generic and everything else -> generic
- Mob pools by killer entity id: zombie, husk, drowned, skeleton, stray, bogged, creeper, spider, cave_spider, enderman, blaze, ghast, wither_skeleton, piglin (also piglin_brute), zombified_piglin, hoglin (also zoglin), vindicator, evoker, vex, pillager, ravager, witch, slime (also magma_cube), guardian (also elder_guardian), warden, silverfish, endermite, shulker, phantom, iron_golem, wolf, polar_bear, goat, ender_dragon, wither, creaking, breeze, rabbit, pufferfish.

2. MOMENT SNAPSHOT (updated every client tick while alive, so it is reliable at death)
- Track: totem in inventory but not in either hand, water bucket in inventory, netherite or diamond armor worn, XP level, riding entity type, dimension, biome (deep dark, ocean), night, thunderstorm, daylight, distance from world spawn (verify the 1.21.11 API for spawn position, skip near/far contexts if unsure), held item class (pickaxe, sword, bow, fishing rod, food, empty), no armor, 3+ stacks of cobblestone/dirt/deepslate, edible food in inventory, seconds alive since last respawn.

3. LINE SELECTION (no line repeats within the last 10 shown, remembered in stats.json)
- Main line: mob pool 60% (if a killer pool exists, else cause pool). Otherwise cause pool. Fallback generic.
- 2% chance: a "legendary" line replaces the main line, shown in animated gold with a "LEGENDARY ROAST" tag.
- Bonus line: with bonusChance (0.55), pick one matching [ctx:*] line by the priority order listed in section 4 of the library.
- Footer line (gray): death count milestone, quick repeat, same cause twice or three times, hardcore, long or short life.

4. DISPLAY
- Main line: rainbow wave text (per-character HSV color animation), shadow, gentle bobbing, word-wrapped to 80% of screen width, on a semi-transparent dark panel with an animated rainbow border.
- Bonus line: gold italic. Footer: small gray. Placeholders: {player} {killer} {weapon} {count} {xp} {minutes} {seconds} {distance}.

5. STATS: death count per world (singleplayer level name or server address), last shown lines, last cause, last death time, all in config/deadsoullaughs/stats.json (versioned, atomic writes, async).

6. CLIENT COMMANDS
- /deadsoullaughs preview [cause] [mob]: opens a safe PreviewScreen (own Screen subclass, Esc closes) using the same overlay, for example "preview lava" or "preview explosion creeper".
- /deadsoullaughs list: prints all cause and mob pool names. /deadsoullaughs reload.

7. CONFIG config/deadsoullaughs/config.json: enabled, bonusChance (0.55), legendaryChance (0.02), rainbow (true), showFooter (true), showDeathCount (true), noRepeatMemory (10), debugLogUnknownCause (true). Safe defaults on missing keys.

Default messages:
- cmd.preview: "&aShowing death screen preview. Press Esc to close."
- cmd.reload: "&aDeadSoulLaughs reloaded."
- cmd.unknown_cause: "&cUnknown cause. Use /deadsoullaughs list."
- hud.death_count: "Death #{count} in this world"
- hud.legendary: "LEGENDARY ROAST"

ROAST LIBRARY
Convert this into assets/deadsoullaughs/roasts.json EXACTLY, dropping or rewording nothing. A user override file config/deadsoullaughs/roasts.json is merged on top. Then add 3 more original lines per section in the same tone (clean, no slurs, no swearing, no self-harm or real-world harm jokes).

== 1. CAUSES ==
[cause:fall]
- Gravity: 1. {player}: 0.
- You tried to fly. The ground said no.
- Falling is just flying with a very short deadline.
- Bold of you to assume the floor would move.
- Newton called. He says "told you so".
- That landing was a 2/10. The splat was a 10/10.
- The ground was right there. It always is.
[cause:fall_ladder]
- You fell off a ladder. A LADDER.
- Ladders are not a suggestion, they are a lifestyle.
- You had one job: climb.
[cause:fall_vines]
- Vines: 1. Your confidence: 0.
- You trusted a plant. That was your first mistake.
[cause:fall_scaffolding]
- Scaffolding is for building, not for bungee jumping.
- You fell off scaffolding. The scaffolding did not even fall.
[cause:fall_pushed]
- You didn't fall. You were assisted.
- {killer} gave you wings. Temporary ones.
- Someone helped you reach the ground faster.
[cause:lava]
- You looked at lava and thought "probably fine". It was not fine.
- Lava is not a hot tub, {player}.
- Your items said goodbye. They had a good run.
- Swimming in lava: a bold lifestyle choice, a short one.
- You swam in lava. Briefly. Very briefly.
- That wasn't water. It never is. Check twice.
[cause:fire]
- You are now a crispy {player}.
- Fire: hot. You: briefly hotter.
- Stop, drop and roll. You did none of those.
- Well done. Medium rare.
- Fire doesn't care about your plans.
[cause:magma]
- That block was hot. The name was a clue. MAGMA block.
- Hot floor is not a new dance. Stop dancing.
- Pro tip: sneak. Sneaking is free.
[cause:drown]
- Fun fact: you are not a fish.
- Bubbles were your friends. You ignored them.
- The ocean says: nice try.
- You forgot to breathe. Your body does it automatically.
- Water: 1. Lungs: 0.
[cause:starve]
- The food was RIGHT THERE.
- Hunger bar: empty. Brain: also empty.
- Bread is not a suggestion.
- You starved in a game with infinite cows.
- The cow just watched. Respectfully.
[cause:suffocation]
- You got stuck in a wall. The wall won.
- Blocks are not a hug. Stop trying to hug them.
- Physics said "no". Physics said it loudly.
[cause:cramming]
- Too many mobs, not enough personal space.
- You were squished. Respectfully.
[cause:cactus]
- You hugged a cactus. Voluntarily.
- Plants fight back, apparently.
- Cacti: green, spiky, and not interested in hugs.
[cause:berry]
- Sweet berries, sour ending.
- You were killed by a berry bush. Let that sink in.
[cause:dripstone]
- A pointy rock won. It didn't even have a weapon.
- Geology: 1. {player}: 0.
- You were stalactited. That's a verb now.
[cause:anvil]
- Anvil: 1. Skull: 0.
- Something heavy and iron-y happened to you.
- You got dropped on. By an anvil. Respect.
[cause:void]
- You found the secret exit.
- The void called. You answered.
- Next time, build a floor.
- You have discovered the end of the world. The bad end.
[cause:lightning]
- Zeus has entered the chat.
- Thunder-struck and unamused.
- The sky had beef with you.
[cause:magic]
- Potion: poisoned. You: confused.
- Splash damage, big pain.
- That wasn't a health potion. Read the label.
[cause:wither_effect]
- Wither: the only thing you can't out-heal.
- Slowly... then all at once.
[cause:freeze]
- Powder snow: cold. You: colder.
- You are now a Steve-sicle.
- You forgot leather boots. Cold lesson.
[cause:fireworks]
- You celebrated a little too hard.
- Congratulations. You are the finale.
[cause:explosion]
- That explosion had your name on it. In big letters.
- Dynamite is great! Until it's your own.
- TNT: a thing that goes boom. You were warned.
- The explosion gave you instant air travel. Landing not included.
[cause:bed_explosion]
- You tried to sleep in the Nether. In the NETHER.
- That bed exploded. It was not a bed.
- Sweet dreams were not included.
[cause:elytra_wall]
- You found out the wall is harder than the sky.
- Elytra: "Look, a wall!" You: "Where?"
- Kinetic energy: 1. Your face: 0.
- You flew into a wall at the speed of regret.
[cause:thorns]
- Your own attack hurt you. Thorns are rude.
- Don't punch prickly stuff.
[cause:bee_sting]
- A bee. A BEE. It only had one shot and used it.
- Bees: tiny, fuzzy, and apparently lethal.
[cause:dragon_breath]
- Dragon breath: the bad breath you can't mint away.
- The dragon had a bad day. You were in the way.
[cause:arrow]
- Pointy stick, sent at speed. You are now a pincushion.
- Arrow: 1. Dodging skills: 0.
[cause:trident]
- A fish stick for the win. Seriously.
- Poseidon's fork got you.
[cause:fireball]
- A flaming ball of anger got you.
- Reflecting it back was an option. You chose "ouch".
[cause:spit]
- You were spat on. Fatally.
- Llama: 1. Dignity: 0.
[cause:mace]
- Mace smash. Dignity not included.
- Heavy hits, heavier regrets.
[cause:sonic_boom]
- Warden said "sonic boom". You said "ow".
- If you can hear the heartbeat, run. You didn't.
[cause:wind_charge]
- You were blown away. Literally.
- A breeze got you. A breeze.
[cause:pvp]
- {killer} cooked you. Well done, {killer}.
- {killer} sends this death with love.
- {killer} is now insufferable. Congratulations.
- Killed by {killer} using {weapon}. A {weapon}. How rude.
- GG. {killer} says hi.
- Next time, bring a bigger sword. Or a friend.
[cause:kill_command]
- You were deleted by a command. Admin said bye.
- Death by "/kill". Efficient.
[cause:generic]
- Skill issue detected.
- Task failed successfully.
- {player} has left the chat. Forcefully.
- That went well.
- Respawn is free. Dignity isn't.
- That wasn't in the tutorial.
- A bold strategy that did not pay off.
- You were so close. Nope. Not even close.
- 10/10 effort, 0/10 results.
- Death is just a loading screen with extra steps.
- You've discovered a new way to die. Not a good one.
- Plot twist: you died.
- Another one bites the dust. It's you.
- Achievement unlocked: Poor Decisions.
- You tried. The world said no.
- Hold my potion... *crash*
- Minor setback. Fatal, but minor.

== 2. MOB KILLERS ==
[mob:zombie]
- Beaten by a zombie. A zombie. They walk in straight lines.
- The zombie only wanted a hug and your brains. It left hungry.
- Zombies are slow. You were slower.
[mob:husk]
- A husk got you. Desert tax collected.
- Even in the sun, it was too fast for you.
[mob:drowned]
- A drowned got you. Technically a zombie with a pool pass.
- You lost a fight to a soggy zombie.
[mob:skeleton]
- A pile of bones out-aimed you. Think about that.
- Dodging arrows is a skill. You are not skilled.
- Skeleton: 1. You: 0. They have no eyes.
[mob:stray]
- A frozen skeleton did that.
- Cold, fast, and accurate. Everything you're not.
[mob:bogged]
- Swamp skeleton. Poison arrows. Skill issue.
- You got bogged down. Literally.
[mob:creeper]
- That creeper only wanted a hug. A very loud hug.
- Ssss... BOOM. You heard it coming.
- Creeper hugs are not recommended.
- Creeper: 1. Your base: 0. Your face: gone.
- You looked directly at a creeper. Why.
- It hissed. You ignored the hiss. Classic.
[mob:spider]
- Spiders climb walls. You can't even climb a ladder.
- Eight legs, zero chill. One of you won.
- You were out-crawled.
[mob:cave_spider]
- Tiny, poisonous, and still better than you.
- Little spider. Big poison.
[mob:enderman]
- You looked at it. You KNEW not to look at it.
- Teleporting in your face is just rude. And effective.
- Enderman: tall, dark, and murderous.
[mob:blaze]
- The Blaze brought the fire. You brought the wrong armor.
- Fire resistance: you forgot it. Blaze noticed.
[mob:ghast]
- A crying ghost-squid did this to you.
- Ghast fireballs are very reflectable. You didn't.
- It cried. You cried louder.
[mob:wither_skeleton]
- A tall black skeleton. Skulls are a gamble.
- Wither Skeleton: 1. Your health: gone.
[mob:piglin]
- You ignored the gold. You paid the price.
- Piglin brute: no negotiation. Only hits.
- Gold boots would have saved you. Probably.
[mob:zombified_piglin]
- You hit one. Their whole crew hit back.
- Rule 1: don't poke the pigmen. You poked.
[mob:hoglin]
- It had a boar's attitude and a tank's power.
- Hoglin: pork chop energy, lethal edition.
[mob:vindicator]
- An axe, rage, and a very bad day.
- Vindicator says: no tip for you.
[mob:evoker]
- You were out-spelled.
- Fangs from the ground. Surprise!
[mob:vex]
- Tiny flying sword menace.
- It was small. You were smaller, apparently.
[mob:pillager]
- Illager crossbow, your last mistake.
- A pillager did the pillaging. You were the pillage.
[mob:ravager]
- A rhino-cow-monster hit you. It was a lot.
- Ravager: 1. Your fence: gone.
[mob:witch]
- A witch brewed your end.
- Potion master vs. you. Not close.
[mob:slime]
- You lost to a bouncing jelly.
- A cube of goo won. Be humble.
[mob:guardian]
- A spiky fish with a laser. Not your best moment.
- The ocean has plenty of eyes. And lasers.
[mob:warden]
- You made noise. In a dark place. Your funeral.
- The Warden heard you. Everybody heard you.
- Sneaking is free. You didn't.
- You were not stealthy. You were a drumline.
[mob:silverfish]
- You were beaten by a bug. A BUG.
- Silverfish: 1. Your stone: infested.
[mob:endermite]
- A tiny purple bug did that. A bug.
[mob:shulker]
- A box floated at you and won.
- Levitation, then a long fall. Shulker's special.
[mob:phantom]
- You didn't sleep. They noticed.
- Phantoms are the sleep police. You got a ticket.
- Go to bed, {player}. Please.
[mob:iron_golem]
- A giant iron fella told you "no".
- You hit a village protector. Bad idea.
[mob:wolf]
- A good boy turned bad. You did that.
- You hit a wolf. The pack hit you.
[mob:polar_bear]
- A big white bear wasn't playing.
- Don't get between a mom and her cub. Seriously.
[mob:goat]
- A goat rammed you off a cliff. Peak behavior.
- Goat: 1. Mountain climber: 0.
[mob:ender_dragon]
- The dragon is the final boss. You are the first casualty.
- You didn't beat the End. The End beat you.
- Dragon: 1. Hero: 0.
[mob:wither]
- You summoned a boss. Boss said "no".
- Wither: 1. Your confidence: 0.
- Three heads. All of them better than yours.
[mob:creaking]
- You looked at it. It stopped. You blinked. Done.
- Creaking: 1. Your eyes: out.
[mob:breeze]
- Tiny tornado, big hit.
- You got blown out of the room. And the game.
[mob:rabbit]
- You were killed by a rabbit. A bunny. Ask yourself why.
- The Killer Bunny strikes again.
[mob:pufferfish]
- You got beaten by a fish. Poison included.
- Pufferfish: tiny, round, deadly.
[mob:generic]
- Beaten by a {killer}. Let that sink in.
- {killer} sends its regards.
- Even the {killer} is embarrassed for you.

== 3. CONTEXT BONUS LINES (priority order, top first) ==
[ctx:totem_in_inventory]
- You HAD a totem. In your inventory. Not in your hand.
- A totem in your bag is just a very expensive decoration.
[ctx:water_bucket_fall]
- You HAD a water bucket. It was in your inventory. Fully functional.
- Water bucket clutch? You prefer the "no clutch" version.
[ctx:food_starve]
- You had food. In your inventory. Right there.
- Inventory: full of food. Stomach: not.
[ctx:netherite_gear]
- All that netherite... and still dead. Wow.
- Full netherite doesn't protect you from poor decisions.
[ctx:diamond_gear]
- Diamond armor, zero brain cells.
- Shiny armor, shiny mistakes.
[ctx:high_xp]
- All those XP levels, gone. A real tragedy.
- You had {xp} levels. Had.
[ctx:riding]
- You died on your steed. The steed is fine, by the way.
- Riding in style, dying in style.
[ctx:nether]
- The Nether is not a vacation spot. The brochure lied.
- Hell is hot. Shocking.
[ctx:end]
- The End. Of you.
- You came, you saw, you got ended.
[ctx:deep_dark]
- You went to the Deep Dark. In the dark. Stop.
- You visited the quietest place and made noise.
[ctx:ocean]
- The ocean is deep and unforgiving. Like your death count.
[ctx:thunderstorm]
- It was thundering. You went outside. That's on you.
[ctx:night]
- It was night. Mobs spawn at night. This is not new.
[ctx:daylight]
- You died in broad daylight. Impressive.
- The sun is out. It didn't help.
[ctx:near_spawn]
- You died near spawn. You didn't even try.
- Spawn is a few blocks away. Respectfully, how.
[ctx:far_from_spawn]
- You died {distance} blocks from spawn. Long walk back. Good luck.
- Far from home, closer to the grave.
[ctx:holding_pickaxe]
- Pickaxe in hand, death in face.
- A pickaxe is not a weapon, {player}.
[ctx:holding_sword]
- A sword in hand and still lost. Interesting.
- Armed. Dangerous. Dead.
[ctx:holding_bow]
- A bow in hand. Fail in head.
[ctx:holding_fishing_rod]
- Fishing, were we? Fish: 1. You: 0.
[ctx:holding_food]
- You died while eating. It was a last snack.
[ctx:empty_hand]
- Empty hands. Optimistic.
- Bare-knuckle. A decision was made.
[ctx:no_armor]
- No armor? Brave, and also silly.
- Armor is free to craft, my friend.
[ctx:cobble_hoarder]
- Your inventory: 90% cobblestone. Nice.
- Dying with a stack of dirt. Respect.

== 4. FOOTERS (gray) ==
[count:1]
- First death in this world. Welcome to the club.
[count:2]
- Twice already? Bold strategy.
[count:3]
- Third time's... not the charm.
[count:5]
- Death #{count}. The respawn button knows your name.
[count:7]
- Death #{count}. Lucky number? Not for you.
[count:10]
- Death #{count}. Are you doing this on purpose?
[count:15]
- Death #{count}. Dying is now a hobby.
[count:20]
- Death #{count}. Your gravestone has a gravestone.
[count:25]
- Death #{count}. A legend. A very dead one.
[count:50]
- Death #{count}. You've died more than most NPCs have lived.
[count:100]
- Death #{count}. Triple digits. Certified menace. To yourself.
[special:quick_repeat]
- That was fast. New personal record?
- Respawn speedrun: any%.
[special:same_cause_twice]
- Same cause twice. Consistency!
- You've learned nothing. Impressive.
[special:same_cause_three]
- Third time with the same cause. It's your signature move now.
[special:hardcore]
- Hardcore: over. Dignity: also over.
- One life. You had one life. Wow.
[special:short_life]
- You lived for {seconds} seconds. A personal record? Probably not.
[special:long_life]
- You survived {minutes} minutes. And then... that.

== 5. LEGENDARY (2% chance, replaces main line) ==
[legendary]
- Historians will remember this death. Not fondly. But they will.
- That death belongs in a museum.
- Somewhere, a game developer just smiled. Not because of you.
- {player}: spectacular. Spectacularly wrong.
- A dramatic reading of your death has been added to the Hall of Shame.
- If this were a movie, the audience would be screaming.
- This goes straight on the highlight reel. Of mistakes.

# RULES
1. Target ONLY 1.21.11 APIs. If unsure an API exists, say so and use the safest alternative. Never invent classes or methods.
2. The build must succeed with ./gradlew build. Give exact commands and a short file tree.
3. Fail-safe: any exception while rendering or loading is caught once, logged once, and disables the overlay for that death screen. Never crash the game, never block respawn.
4. Small focused classes (for example CauseResolver, MomentSnapshot, RoastPicker, RoastLibrary, OverlayRenderer, StatsStore), Javadoc on public classes. No hardcoded roast text in Java code.
5. No network access, telemetry, or external assets.

# OUTPUT FORMAT
1. Short plan and file tree.
2. Full code for EVERY file (including build.gradle, gradle.properties, fabric.mod.json, mixin json, death_causes.json, roasts.json with the whole library). No "..." or placeholders.
3. Build and install steps.
4. Feature checklist and test plan (use /deadsoullaughs preview  [mob] and /kill, and real deaths: fall, lava, drowning, creeper).
5. Known limitations (one short list).

# NON-GOALS
- No creeper, Steve, tombstone, particles, sounds, or animations (a later part).
- No server component, config GUI, or Mod Menu dependency.
- No replacing vanilla death screen buttons or logic.
- No online features. No humor targeting real people or groups.
- Don't ask questions unless something blocks the build. Make reasonable assumptions and list them.
Kodari AI
KodariOct 5 at 10:47 am 6
  1. Set up the client-only 1.21.11 Fabric project and verified screen, tick, command, and death-cause hooks.

  2. Add configurable cause/mob/context roast selection, per-world stats, and the safe overlay/preview flow.

  3. Add the complete cause map and roast library as resource JSON, then provide concise build/install and test notes.

Created the client-only Fabric 1.21.11 project with 10 Java source files and no external library dependencies.

Plain Text
build.gradle
gradle.properties
settings.gradle
src/client/java/dev/kodari/deadsoullaughs/
  DeadSoulLaughsClient.java
  DeathScreenAccessor.java
  ModConfig.java
  CauseResolver.java
  MomentSnapshot.java
  RoastLibrary.java
  StatsStore.java
  RoastPicker.java
  OverlayRenderer.java
  PreviewScreen.java
src/main/resources/
  fabric.mod.json
  deadsoullaughs.mixins.json
  assets/deadsoullaughs/death_causes.json
  assets/deadsoullaughs/roasts.json
  assets/deadsoullaughs/lang/en_us.json

It includes the death-screen overlay, client command previews/list/reload, moment contexts, per-world versioned stats with asynchronous atomic writes, config defaults, and a user roast override merged from config/deadsoullaughs/roasts.json.

Build and install: On desktop, click Compile in the top bar; on phone, tap ⋮ → Compile Project. Click Compile in the window, then Download when it succeeds. Install the downloaded JAR in the mods folder of a Fabric 1.21.11 client.

Test plan: Try /deadsoullaughs preview lava, /deadsoullaughs preview explosion creeper, /deadsoullaughs list, and /deadsoullaughs reload. In a test world, use /kill @s and test fall, lava, drowning, and creeper deaths.

Limitation: The mounted source did not contain vanilla assets/minecraft/lang/en_us.json, so I could not verify the cause map against that exact file; rare or version-specific death-message keys may need adding. Compilation has not been run here; use Kodari’s Compile action to verify the build.

YouTube PREMIUM

It's causing crash issue fix & make sure it should work in both pc launchers and mobile launchers like pojavlauncher or mj launcher or mojo launcher

📎 1 file 26,009 chars
📄
pasted-code-1791205095653.txt
txt 412 lines
▶
--------- Starting game with Launcher Debug!
Info: Launcher version: hebe-20260326-[11b0f81]-v3_openjdk
Info: Architecture: arm64
Info: Device model: Xiaomi 25078RA3EA
Info: API version: 36
Info: Selected Minecraft version: fabric-loader-0.19.5-1.21.11
Info: Custom Java arguments: ""
Info: RAM allocated: 2032 Mb
Info: Graphics device: ARM Mali-G52 MC2 (OpenGL ES 3)
Added custom env: MOJO_RENDERER=opengles3_ltw
Added custom env: FORCE_VSYNC=false
Added custom env: LIBGL_MIPMAP=3
Added custom env: allow_higher_compat_version=true
Added custom env: MESA_GLSL_CACHE_DIR=/data/user/0/git.artdeell.mojo/cache
Added custom env: LIBGL_NOINTOVLHACK=1
Added custom env: MOD_ANDROID_RUNTIME=/data/user/0/git.artdeell.mojo/cache/app_runtime_mod
Added custom env: force_glsl_extensions_warn=true
Added custom env: LIBGL_NORMALIZE=1
Added custom env: POJAV_VSYNC_IN_ZINK=1
Added custom env: LIBGL_NOERROR=1
Added custom env: LIBGL_ES=2
Added custom env: POJAVEXEC_EGL=libltw.so
Added custom env: MESA_GLSL_VERSION_OVERRIDE=460
Added custom env: allow_glsl_extension_directive_midshader=true
LTW will force dynamic storage buffers to be coherent.
LTW will prevent all explicit buffer flushes.
--------- beginning of main
D/jrelog  (28882): dlopen libltw.so success

I/jrelog  (28882): updateLdLibPath: 0x74a79ec6a0

[1.393s][warning][jni,resolve] Re-registering of platform native method: jdk.internal.loader.NativeLibraries.load(Ljdk/internal/loader/NativeLibraries$NativeLibraryImpl;Ljava/lang/String;ZZ)Z from code in a different classloader
2026-10-05T12:54:44.118999007Z main ERROR appender Console has no parameter that matches element Policies
[18:39:44] [main/INFO]: Loading Minecraft 1.21.11 with Fabric Loader 0.19.5
[18:39:45] [main/INFO]: Loading 104 mods:
	- cloth-config 21.11.153
	   \-- cloth-basic-math 0.6.1
	- clumps 29.0.0.1
	- deadsoullaughs 1.0.0
	- debugify 1.21.11+1.1
	- entityculling 1.10.5
	   |-- transition 1.0.21
	   \-- trender 1.0.15
	- exordium 2.1.1
	- fabric-api 0.141.6+1.21.11
	   |-- fabric-api-base 1.0.5+4ebb5c083e
	   |-- fabric-api-lookup-api-v1 1.6.114+20dc27073e
	   |-- fabric-biome-api-v1 17.1.1+4fc5413f3e
	   |-- fabric-block-api-v1 1.1.10+4ebb5c083e
	   |-- fabric-block-view-api-v2 1.0.39+4ebb5c083e
	   |-- fabric-command-api-v2 2.4.7+6b42a6003e
	   |-- fabric-content-registries-v0 10.2.14+4fc5413f3e
	   |-- fabric-convention-tags-v1 2.1.55+7f945d5b3e
	   |-- fabric-convention-tags-v2 2.17.3+8ef948ba3e
	   |-- fabric-crash-report-info-v1 0.3.23+4ebb5c083e
	   |-- fabric-data-attachment-api-v1 1.8.48+eed0806f3e
	   |-- fabric-data-generation-api-v1 23.5.0+88d7da613e
	   |-- fabric-dimensions-v1 4.0.28+4fc5413f3e
	   |-- fabric-entity-events-v1 3.1.1+1d0ab4303e
	   |-- fabric-events-interaction-v0 4.1.1+3b89ecf63e
	   |-- fabric-game-rule-api-v1 2.0.3+4fc5413f3e
	   |-- fabric-item-api-v1 11.6.0+67f17bb43e
	   |-- fabric-item-group-api-v1 4.2.36+4fc5413f3e
	   |-- fabric-key-binding-api-v1 1.1.7+4fc5413f3e
	   |-- fabric-lifecycle-events-v1 2.6.15+4ebb5c083e
	   |-- fabric-loot-api-v2 3.0.73+3f89f5a53e
	   |-- fabric-loot-api-v3 2.0.20+78c8b4663e
	   |-- fabric-message-api-v1 6.1.12+4ebb5c083e
	   |-- fabric-model-loading-api-v1 6.0.15+4fc5413f3e
	   |-- fabric-networking-api-v1 5.1.6+6b6d71a53e
	   |-- fabric-object-builder-api-v1 21.1.40+4fc5413f3e
	   |-- fabric-particles-v1 4.2.12+4fc5413f3e
	   |-- fabric-recipe-api-v1 8.2.4+4ebb5c083e
	   |-- fabric-registry-sync-v0 6.2.6+1718722b3e
	   |-- fabric-renderer-api-v1 8.0.3+f4ffd2e53e
	   |-- fabric-renderer-indigo 5.0.3+f4ffd2e53e
	   |-- fabric-rendering-fluids-v1 3.1.43+4ebb5c083e
	   |-- fabric-rendering-v1 16.2.10+0290ad933e
	   |-- fabric-resource-conditions-api-v1 5.0.35+4fc5413f3e
	   |-- fabric-resource-loader-v0 3.3.4+4fc5413f3e
	   |-- fabric-resource-loader-v1 1.0.10+78c8b4663e
	   |-- fabric-screen-api-v1 3.1.7+4ebb5c083e
	   |-- fabric-screen-handler-api-v1 1.3.162+4fc5413f3e
	   |-- fabric-serialization-api-v1 1.0.5+4ebb5c083e
	   |-- fabric-sound-api-v1 1.0.51+4fc5413f3e
	   |-- fabric-tag-api-v1 1.3.0+88d7da613e
	   |-- fabric-transfer-api-v1 6.0.25+4fc5413f3e
	   \-- fabric-transitive-access-wideners-v1 7.1.0+014c8cec3e
	- fabric-language-kotlin 1.13.13+kotlin.2.4.10
	   |-- org_jetbrains_kotlin_kotlin-reflect 2.4.10
	   |-- org_jetbrains_kotlin_kotlin-stdlib 2.4.10
	   |-- org_jetbrains_kotlin_kotlin-stdlib-jdk7 2.4.10
	   |-- org_jetbrains_kotlin_kotlin-stdlib-jdk8 2.4.10
	   |-- org_jetbrains_kotlinx_atomicfu-jvm 0.33.0
	   |-- org_jetbrains_kotlinx_kotlinx-coroutines-core-jvm 1.11.0
	   |-- org_jetbrains_kotlinx_kotlinx-coroutines-jdk8 1.11.0
	   |-- org_jetbrains_kotlinx_kotlinx-datetime-jvm 0.8.0
	   |-- org_jetbrains_kotlinx_kotlinx-io-bytestring-jvm 0.9.1
	   |-- org_jetbrains_kotlinx_kotlinx-io-core-jvm 0.9.1
	   |-- org_jetbrains_kotlinx_kotlinx-serialization-cbor-jvm 1.11.0
	   |-- org_jetbrains_kotlinx_kotlinx-serialization-core-jvm 1.11.0
	   \-- org_jetbrains_kotlinx_kotlinx-serialization-json-jvm 1.11.0
	- fabricloader 0.19.5
	   \-- mixinextras 0.5.5
	- ferritecore 8.2.0
	- fxbright 1.0.0
	- fzzy_config 0.7.6+1.21.11
	   |-- blue_endless_jankson 1.2.3
	   |-- fabric-permissions-api-v0 0.6.1
	   \-- net_peanuuutz_tomlkt_tomlkt-jvm 0.3.7
	- immediatelyfast 1.14.3+1.21.11
	   \-- net_lenni0451_reflect 1.6.2
	- java 21
	- krypton 0.2.10
	   \-- com_velocitypowered_velocity-native 3.4.0-SNAPSHOT
	- lithium 0.21.4+mc1.21.11
	- minecraft 1.21.11
	- modmenu 17.0.1-beta.1
	- moreculling 1.6.2
	   |-- conditional-mixin 0.6.3
	   \-- mixinsquared 0.2.0
	- particle_core 0.3.2+1.21.11
	- placeholder-api 2.8.2+1.21.10
	- reeses-sodium-options 2.2.3+mc1.21.11
	- sodium 0.8.14-beta.1+mc1.21.11
	- sodium-extra 0.9.3+mc1.21.11
	- vmp 0.2.0+beta.7.227+1.21.11
	   \-- com_ibm_async_asyncutil 0.1.0
	- yet_another_config_lib_v3 3.8.2+1.21.11-fabric
	   |-- com_twelvemonkeys_common_common-image 3.12.0
	   |-- com_twelvemonkeys_common_common-io 3.12.0
	   |-- com_twelvemonkeys_common_common-lang 3.12.0
	   |-- com_twelvemonkeys_imageio_imageio-core 3.12.0
	   |-- com_twelvemonkeys_imageio_imageio-metadata 3.12.0
	   |-- com_twelvemonkeys_imageio_imageio-webp 3.12.0
	   |-- org_quiltmc_parsers_gson 0.2.1
	   \-- org_quiltmc_parsers_json 0.2.1
	- zoomify 2.15.2+1.21.11
	   \-- com_akuleshov7_ktoml-core-jvm 0.7.1
[18:39:46] [main/INFO]: SpongePowered MIXIN Subsystem Version=0.8.7 Source=file:/storage/emulated/0/Android/data/git.artdeell.mojo/files/.minecraft/libraries/net/fabricmc/sponge-mixin/0.17.4+mixin.0.8.7/sponge-mixin-0.17.4+mixin.0.8.7.jar Service=Knot/Fabric Env=CLIENT
[18:39:47] [main/WARN]: Reference map 'clumps.refmap.json' for clumps.mixins.json could not be read. If this is a development environment you can ignore this message
[18:39:47] [main/INFO]: Loaded configuration file for Lithium: 171 options available, 0 override(s) found.
[18:39:48] [main/WARN]: Reference map 'moreculling.refmap.json' for moreculling.mixins.json could not be read. If this is a development environment you can ignore this message
[18:39:48] [main/WARN]: Reference map 'moreculling.refmap.json' for moreculling.fabric.mixins.json could not be read. If this is a development environment you can ignore this message
[18:39:48] [main/INFO]: Loaded configuration file for Sodium: 36 options available, 0 override(s) found
[18:39:48] [main/INFO]: Loaded configuration file for Sodium Extra: 26 options available, 0 override(s) found
[18:39:48] [main/WARN]: Reference map 'sodium-extra.refmap.json' for sodium-extra.mixins.json could not be read. If this is a development environment you can ignore this message
[18:39:48] [main/INFO]: Successfully started async appender with [Tracy, SysOut, File]
[18:39:48] [main/WARN]: Reference map 'yet_another_config_lib_v3.refmap.json' for yacl.mixins.json could not be read. If this is a development environment you can ignore this message
[18:39:48] [main/WARN]: Reference map 'yet_another_config_lib_v3.refmap.json' for yacl-fabric.mixins.json could not be read. If this is a development environment you can ignore this message
[18:39:52] [main/WARN]: Error loading class: net/caffeinemc/mods/sodium/client/render/chunk/compile/pipeline/BlockOcclusionCache (java.lang.ClassNotFoundException: net/caffeinemc/mods/sodium/client/render/chunk/compile/pipeline/BlockOcclusionCache)
[18:39:53] [main/INFO]: Searching for graphics cards...
[18:39:53] [main/WARN]: Could not find any graphics adapters! Probably the device is not on a bus we can probe, or there are no devices supporting 3D acceleration.
[18:39:53] [main/WARN]: Sodium has applied one or more workarounds to prevent crashes or other issues on your system: [NO_ERROR_CONTEXT_UNSUPPORTED]
[18:39:53] [main/WARN]: This is not necessarily an issue, but it may result in certain features or optimizations being disabled. You can sometimes fix these issues by upgrading your graphics driver.
[18:39:54] [main/INFO]: Initializing MixinExtras via com.llamalad7.mixinextras.service.MixinExtrasServiceImpl(version=0.5.5).
[18:40:01] [main/WARN]: Did not find udev library in operating system. Some features may not work.
[18:40:02] [main/WARN]: File not found or not readable: /proc/stat
[18:40:05] [Datafixer Bootstrap/INFO]: 287 Datafixer optimizations took 6041 milliseconds
[18:40:33] [Render thread/INFO]: Environment: Environment[sessionHost=https://sessionserver.mojang.com, servicesHost=https://api.minecraftservices.com, profilesHost=https://api.mojang.com, name=PROD]
[18:40:33] [Render thread/INFO]: Setting user: aSoulNeverDies
[18:40:33] [Render thread/INFO]: Enabled 100 bug fixes: [MC-577, MC-4490, MC-7569, MC-8187, MC-30391, MC-35361, MC-44654, MC-46737, MC-46766, MC-57057, MC-79545, MC-80859, MC-82263, MC-84661, MC-88371, MC-89146, MC-90683, MC-93018, MC-93384, MC-94054, MC-100991, MC-105068, MC-115092, MC-116379, MC-118740, MC-119754, MC-121706, MC-121903, MC-122477, MC-122627, MC-123450, MC-123605, MC-127970, MC-129909, MC-131562, MC-132878, MC-133218, MC-134110, MC-136249, MC-139041, MC-143474, MC-147659, MC-153010, MC-155509, MC-158900, MC-159163, MC-159283, MC-160095, MC-165306, MC-165381, MC-168573, MC-170462, MC-176559, MC-176806, MC-177381, MC-179072, MC-183990, MC-187100, MC-188359, MC-197260, MC-200418, MC-201374, MC-202637, MC-206540, MC-206922, MC-210318, MC-211561, MC-215530, MC-215531, MC-217716, MC-219981, MC-221257, MC-223153, MC-224729, MC-226961, MC-227008, MC-227337, MC-231097, MC-231743, MC-232869, MC-237493, MC-242809, MC-245394, MC-251068, MC-259512, MC-263865, MC-263999, MC-264285, MC-264979, MC-267125, MC-267376, MC-268420, MC-268617, MC-271899, MC-272431, MC-280220, MC-297837, MC-298066, MC-298225, MC-298558]
[18:40:33] [Render thread/INFO]: Successfully Debugify'd your game!
[18:40:39] [Render thread/INFO]: Compression will use Java, encryption will use Java
[18:40:40] [Render thread/INFO]: [Indigo] Different rendering plugin detected; not applying Indigo.
[18:40:42] [Render thread/INFO]: Loaded config fzzy_config:keybinds in 1792ms
[18:40:42] [Render thread/INFO]: Krypton is now accelerating your Minecraft client's networking stack 🚀
[18:40:42] [Render thread/INFO]: Note that Krypton is most effective on servers, not the client.
[18:40:43] [Render thread/INFO]: Checking mod updates...
Registered forkAndExec
[LWJGL] Failed to load a library. Possible solutions:
	a) Add the directory that contains the shared library to -Djava.library.path or -Dorg.lwjgl.librarypath.
	b) Add the JAR that contains the shared library to the classpath.
[LWJGL] Enable debug mode with -Dorg.lwjgl.util.Debug=true for better diagnostics.
[LWJGL] Enable the SharedLibraryLoader debug mode with -Dorg.lwjgl.util.DebugLoader=true for better diagnostics.
[18:40:45] [Download-2/INFO]: Update available for 'debugify@1.21.11+1.1', (-> 1.21.11+1.2)
[18:40:45] [Download-2/INFO]: Update available for 'entityculling@1.10.5', (-> 1.11.2)
[18:40:45] [Download-2/INFO]: Update available for 'sodium@0.8.14-beta.1+mc1.21.11', (-> mc1.21.11-0.8.14-fabric)
[18:40:45] [Download-2/INFO]: Update available for 'modmenu@17.0.1-beta.1', (-> 17.0.1)
[18:40:45] [Download-2/INFO]: Update available for 'reeses-sodium-options@2.2.3+mc1.21.11', (-> mc1.21.11-2.2.4+fabric)
[18:40:45] [Download-2/INFO]: Update available for 'sodium-extra@0.9.3+mc1.21.11', (-> mc1.21.11-0.9.4+fabric)
[18:40:45] [Download-2/INFO]: Update available for 'fabric-language-kotlin@1.13.13+kotlin.2.4.10', (-> 1.14.1+kotlin.2.4.20)
[18:40:45] [Render thread/INFO]: Loaded config :particle_core_config in 913ms
[18:40:46] [Render thread/INFO]: [STDOUT]: [TRender] Initializing Client...
[18:40:46] [Render thread/INFO]: Deserializing YACLConfig from '/storage/emulated/0/Android/data/git.artdeell.mojo/files/instances/fabric-loader-0.19.5-1.21.11-4d6ea5ea-d97b-48fa-9c39-fbbed8588fa3/config/yacl.json5'
[18:40:48] [Render thread/WARN]: Failed to get system info for Render Extensions
java.lang.IllegalStateException: Can't getDevice() before it was initialized
	at knot//com.mojang.blaze3d.systems.RenderSystem.getDevice(RenderSystem.java:299)
	at knot//net.minecraft.class_310.method_68671(class_310.java:2527)
	at knot//net.minecraft.class_6396.method_37123(class_6396.java:78)
	at knot//net.minecraft.class_310.method_37274(class_310.java:2527)
	at knot//net.minecraft.class_310.method_22681(class_310.java:2497)
	at knot//net.minecraft.client.main.Main.main(Main.java:243)
	at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:517)
	at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:72)
	at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23)
---- Minecraft Crash Report ----
// Oops.

Time: 2026-10-05 18:40:49
Description: Initializing game

java.lang.RuntimeException: Could not execute entrypoint stage 'client' due to errors, provided by 'deadsoullaughs' at 'dev.kodari.deadsoullaughs.DeadSoulLaughsClient'!
	at net.fabricmc.loader.impl.FabricLoaderImpl.lambda$invokeEntrypoints$0(FabricLoaderImpl.java:413)
	at net.fabricmc.loader.impl.util.ExceptionUtil.gatherExceptions(ExceptionUtil.java:33)
	at net.fabricmc.loader.impl.FabricLoaderImpl.invokeEntrypoints(FabricLoaderImpl.java:411)
	at net.fabricmc.loader.impl.game.minecraft.Hooks.startClient(Hooks.java:53)
	at knot//net.minecraft.class_310.(class_310.java:475)
	at knot//net.minecraft.client.main.Main.main(Main.java:234)
	at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:517)
	at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:72)
	at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23)
Caused by: net.fabricmc.loader.api.EntrypointException: Exception while loading entries for entrypoint 'client' provided by 'deadsoullaughs'
	at net.fabricmc.loader.impl.entrypoint.EntrypointContainerImpl.getEntrypoint(EntrypointContainerImpl.java:56)
	at net.fabricmc.loader.impl.FabricLoaderImpl.invokeEntrypoints(FabricLoaderImpl.java:409)
	... 6 more
Caused by: java.lang.RuntimeException: Mixin transformation of dev.kodari.deadsoullaughs.DeadSoulLaughsClient failed
	at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.getPostMixinClassByteArray(KnotClassDelegate.java:440)
	at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.tryLoadClass(KnotClassDelegate.java:336)
	at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.loadClass(KnotClassDelegate.java:231)
	at net.fabricmc.loader.impl.launch.knot.KnotClassLoader.loadClass(KnotClassLoader.java:119)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:526)
	at java.base/java.lang.Class.forName0(Native Method)
	at java.base/java.lang.Class.forName(Class.java:536)
	at java.base/java.lang.Class.forName(Class.java:515)
	at net.fabricmc.loader.impl.util.DefaultLanguageAdapter.create(DefaultLanguageAdapter.java:53)
	at net.fabricmc.loader.impl.entrypoint.EntrypointStorage$NewEntry.getOrCreate(EntrypointStorage.java:124)
	at net.fabricmc.loader.impl.entrypoint.EntrypointContainerImpl.getEntrypoint(EntrypointContainerImpl.java:53)
	... 7 more
Caused by: org.spongepowered.asm.mixin.transformer.throwables.IllegalClassLoadError: dev.kodari.deadsoullaughs.DeadSoulLaughsClient is in a defined mixin package dev.kodari.deadsoullaughs.* owned by deadsoullaughs.mixins.json and cannot be referenced directly
	at org.spongepowered.asm.mixin.transformer.MixinProcessor.applyMixins(MixinProcessor.java:322)
	at org.spongepowered.asm.mixin.transformer.MixinTransformer.transformClass(MixinTransformer.java:237)
	at org.spongepowered.asm.mixin.transformer.MixinTransformer.transformClassBytes(MixinTransformer.java:202)
	at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.getPostMixinClassByteArray(KnotClassDelegate.java:435)
	... 17 more


A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------

-- Head --
Thread: Render thread
Stacktrace:
	at net.fabricmc.loader.impl.FabricLoaderImpl.lambda$invokeEntrypoints$0(FabricLoaderImpl.java:413)
	at net.fabricmc.loader.impl.util.ExceptionUtil.gatherExceptions(ExceptionUtil.java:33)
	at net.fabricmc.loader.impl.FabricLoaderImpl.invokeEntrypoints(FabricLoaderImpl.java:411)
	at net.fabricmc.loader.impl.game.minecraft.Hooks.startClient(Hooks.java:53)
	at knot//net.minecraft.class_310.(class_310.java:475)

-- Initialization --
Details:
	Modules: 
Stacktrace:
	at knot//net.minecraft.client.main.Main.main(Main.java:234)
	at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:517)
	at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:72)
	at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23)

-- System Details --
Details:
	Minecraft Version: 1.21.11
	Minecraft Version ID: 1.21.11
	Operating System: Linux (aarch64) version Android-16
	Java Version: 21.0.12-internal, N/A
	Java VM Version: OpenJDK 64-Bit Server VM (mixed mode), Oracle Corporation
	Memory: 1712881664 bytes (1633 MiB) / 2130706432 bytes (2032 MiB) up to 2130706432 bytes (2032 MiB)
	CPUs: 8
	Processor Vendor: ARM
	Processor Name: 
	Identifier: 0x41 Family 8 Model 0xd0a Stepping r1p0
	Microarchitecture: unknown
	Frequency (GHz): -0.00
	Number of physical packages: 1
	Number of physical CPUs: 6
	Number of logical CPUs: 8
	Graphics card #0 name: unknown
	Graphics card #0 vendor: unknown
	Graphics card #0 VRAM (MiB): 0.00
	Graphics card #0 deviceId: unknown
	Graphics card #0 versionInfo: unknown
	Virtual memory max (MiB): 12028.36
	Virtual memory used (MiB): 7464.38
	Swap memory total (MiB): 8192.00
	Swap memory used (MiB): 2049.29
	Space in storage for jna.tmpdir (MiB): 
	Space in storage for org.lwjgl.system.SharedLibraryExtractPath (MiB): 
	Space in storage for io.netty.native.workdir (MiB): 
	Space in storage for java.io.tmpdir (MiB): available: 114836.11, total: 227386.97
	Space in storage for workdir (MiB): available: 114836.11, total: 227386.97
	JVM Flags: 3 total; -Xmx2032M -Xms2032M -XX:ActiveProcessorCount=8
	Debug Flags: 0 total; 
	Fabric Mods: 
		cloth-config: Cloth Config v20 21.11.153
			cloth-basic-math: cloth-basic-math 0.6.1
		clumps: Clumps 29.0.0.1
		deadsoullaughs: DeadSoulLaughs 1.0.0
		debugify: Debugify 1.21.11+1.1
		entityculling: EntityCulling 1.10.5
			transition: TRansition 1.0.21
			trender: TRender 1.0.15
		exordium: Exordium 2.1.1
		fabric-api: Fabric API 0.141.6+1.21.11
			fabric-api-base: Fabric API Base 1.0.5+4ebb5c083e
			fabric-api-lookup-api-v1: Fabric API Lookup API (v1) 1.6.114+20dc27073e
			fabric-biome-api-v1: Fabric Biome API (v1) 17.1.1+4fc5413f3e
			fabric-block-api-v1: Fabric Block API (v1) 1.1.10+4ebb5c083e
			fabric-block-view-api-v2: Fabric BlockView API (v2) 1.0.39+4ebb5c083e
			fabric-command-api-v2: Fabric Command API (v2) 2.4.7+6b42a6003e
			fabric-content-registries-v0: Fabric Content Registries (v0) 10.2.14+4fc5413f3e
			fabric-convention-tags-v1: Fabric Convention Tags 2.1.55+7f945d5b3e
			fabric-convention-tags-v2: Fabric Convention Tags (v2) 2.17.3+8ef948ba3e
			fabric-crash-report-info-v1: Fabric Crash Report Info (v1) 0.3.23+4ebb5c083e
			fabric-data-attachment-api-v1: Fabric Data Attachment API (v1) 1.8.48+eed0806f3e
			fabric-data-generation-api-v1: Fabric Data Generation API (v1) 23.5.0+88d7da613e
			fabric-dimensions-v1: Fabric Dimensions API (v1) 4.0.28+4fc5413f3e
			fabric-entity-events-v1: Fabric Entity Events (v1) 3.1.1+1d0ab4303e
			fabric-events-interaction-v0: Fabric Events Interaction (v0) 4.1.1+3b89ecf63e
			fabric-game-rule-api-v1: Fabric Game Rule API (v1) 2.0.3+4fc5413f3e
			fabric-item-api-v1: Fabric Item API (v1) 11.6.0+67f17bb43e
			fabric-item-group-api-v1: Fabric Item Group API (v1) 4.2.36+4fc5413f3e
			fabric-key-binding-api-v1: Fabric Key Binding API (v1) 1.1.7+4fc5413f3e
			fabric-lifecycle-events-v1: Fabric Lifecycle Events (v1) 2.6.15+4ebb5c083e
			fabric-loot-api-v2: Fabric Loot API (v2) 3.0.73+3f89f5a53e
			fabric-loot-api-v3: Fabric Loot API (v3) 2.0.20+78c8b4663e
			fabric-message-api-v1: Fabric Message API (v1) 6.1.12+4ebb5c083e
			fabric-model-loading-api-v1: Fabric Model Loading API (v1) 6.0.15+4fc5413f3e
			fabric-networking-api-v1: Fabric Networking API (v1) 5.1.6+6b6d71a53e
			fabric-object-builder-api-v1: Fabric Object Builder API (v1) 21.1.40+4fc5413f3e
			fabric-particles-v1: Fabric Particles (v1) 4.2.12+4fc5413f3e
			fabric-recipe-api-v1: Fabric Recipe API (v1) 8.2.4+4ebb5c083e
			fabric-registry-sync-v0: Fabric Registry Sync (v0) 6.2.6+1718722b3e
			fabric-renderer-api-v1: Fabric Renderer API (v1) 8.0.3+f4ffd2e53e
			fabric-renderer-indigo: Fabric Renderer - Indigo 5.0.3+f4ffd2e53e
			fabric-rendering-fluids-v1: Fabric Rendering Fluids (v1) 3.1.43+4ebb5c083e
			fabric-rendering-v1: Fabric Rendering (v1) 16.2.10+0290ad933e
			fabric-resource-conditions-api-v1: Fabric Resource Conditions API (v1) 5.0.35+4fc5413f3e
			fabric-resource-loader-v0: Fabric Resource Loader (v0) 3.3.4+4fc5413f3e
			fabric-resource-loader-v1: Fabric Resource Loader (v1) 1.0.10+78c8b4663e
			fabric-screen-api-v1: Fabric Screen API (v1) 3.1.7+4ebb5c083e
			fabric-screen-handler-api-v1: Fabric Screen Handler API (v1) 1.3.162+4fc5413f3e
			fabric-serialization-api-v1: Fabric Serialization API (v1) 1.0.5+4ebb5c083e
			fabric-sound-api-v1: Fabric Sound API (v1) 1.0.51+4fc5413f3e
			fabric-tag-api-v1: Fabric Tag API (v1) 1.3.0+88d7da613e
			fabric-transfer-api-v1: Fabric Transfer API (v1) 6.0.25+4fc5413f3e
			fabric-transitive-access-wideners-v1: Fabric Transitive Access Wideners (v1) 7.1.0+014c8cec3e
		fabric-language-kotlin: Fabric Language Kotlin 1.13.13+kotlin.2.4.10
			org_jetbrains_kotlin_kotlin-reflect: kotlin-reflect 2.4.10
			org_jetbrains_kotlin_kotlin-stdlib: kotlin-stdlib 2.4.10
			org_jetbrains_kotlin_kotlin-stdlib-jdk7: kotlin-stdlib-jdk7 2.4.10
			org_jetbrains_kotlin_kotlin-stdlib-jdk8: kotlin-stdlib-jdk8 2.4.10
			org_jetbrains_kotlinx_atomicfu-jvm: atomicfu-jvm 0.33.0
			org_jetbrains_kotlinx_kotlinx-coroutines-core-jvm: kotlinx-coroutines-core-jvm 1.11.0
			org_jetbrains_kotlinx_kotlinx-coroutines-jdk8: kotlinx-coroutines-jdk8 1.11.0
			org_jetbrains_kotlinx_kotlinx-datetime-jvm: kotlinx-datetime-jvm 0.8.0
			org_jetbrains_kotlinx_kotlinx-io-bytestring-jvm: kotlinx-io-bytestring-jvm 0.9.1
			org_jetbrains_kotlinx_kotlinx-io-core-jvm: kotlinx-io-core-jvm 0.9.1
			org_jetbrains_kotlinx_kotlinx-serialization-cbor-jvm: kotlinx-serialization-cbor-jvm 1.11.0
			org_jetbrains_kotlinx_kotlinx-serialization-core-jvm: kotlinx-serialization-core-jvm 1.11.0
			org_jetbrains_kotlinx_kotlinx-serialization-json-jvm: kotlinx-serialization-json-jvm 1.11.0
		fabricloader: Fabric Loader 0.19.5
			mixinextras: MixinExtras 0.5.5
		ferritecore: FerriteCore 8.2.0
		fxbright: FXBright 1.0.0
		fzzy_config: Fzzy Config 0.7.6+1.21.11
			blue_endless_jankson: jankson 1.2.3
			fabric-permissions-api-v0: fabric-permissions-api 0.6.1
			net_peanuuutz_tomlkt_tomlkt-jvm: tomlkt-jvm 0.3.7
		immediatelyfast: ImmediatelyFast 1.14.3+1.21.11
			net_lenni0451_reflect: Reflect 1.6.2
		java: OpenJDK 64-Bit Server VM 21
		krypton: Krypton 0.2.10
			com_velocitypowered_velocity-native: velocity-native 3.4.0-SNAPSHOT
		lithium: Lithium 0.21.4+mc1.21.11
		minecraft: Minecraft 1.21.11
		modmenu: Mod Menu 17.0.1-beta.1
		moreculling: More Culling 1.6.2
			conditional-mixin: conditional mixin 0.6.3
			mixinsquared: MixinSquared 0.2.0
		particle_core: Particle Core 0.3.2+1.21.11
		placeholder-api: Placeholder API 2.8.2+1.21.10
		reeses-sodium-options: Reese's Sodium Options 2.2.3+mc1.21.11
		sodium: Sodium 0.8.14-beta.1+mc1.21.11
		sodium-extra: Sodium Extra 0.9.3+mc1.21.11
		vmp: Very Many Players 0.2.0+beta.7.227+1.21.11
			com_ibm_async_asyncutil: asyncutil 0.1.0
		yet_another_config_lib_v3: YetAnotherConfigLib 3.8.2+1.21.11-fabric
			com_twelvemonkeys_common_common-image: common-image 3.12.0
			com_twelvemonkeys_common_common-io: common-io 3.12.0
			com_twelvemonkeys_common_common-lang: common-lang 3.12.0
			com_twelvemonkeys_imageio_imageio-core: imageio-core 3.12.0
			com_twelvemonkeys_imageio_imageio-metadata: imageio-metadata 3.12.0
			com_twelvemonkeys_imageio_imageio-webp: imageio-webp 3.12.0
			org_quiltmc_parsers_gson: gson 0.2.1
			org_quiltmc_parsers_json: json 0.2.1
		zoomify: Zoomify 2.15.2+1.21.11
			com_akuleshov7_ktoml-core-jvm: ktoml-core-jvm 0.7.1
	Launched Version: 1.21.11
	Backend library: LWJGL version 3.3.6-snapshot
	Backend API: Unknown
	Window size: 
	GFLW Platform: x11
	Render Extensions: ERR
	GL debug messages: 
	Is Modded: Definitely; Client brand changed to 'fabric'
	Universe: 404
	Type: Client (map_client.txt)
	Locale: en
	System encoding: UTF-8
	File encoding: UTF-8
	CPU: 8x 
#@!@# Game crashed! Crash report saved to: #@!@# /storage/emulated/0/Android/data/git.artdeell.mojo/files/instances/fabric-loader-0.19.5-1.21.11-4d6ea5ea-d97b-48fa-9c39-fbbed8588fa3/crash-reports/crash-2026-10-05_18.40.49-client.txt
Kodari AI
KodariOct 5 at 1:03 pm 2

Plan:

  1. Move the death-screen accessor out of the mixin-owned package.

  2. Update the mixin config and client reference without changing platform-specific behavior.

  3. Confirm the fix addresses the reported crash; separate it from unrelated renderer warnings in the log.

Fixed the fatal startup crash: the mixin config now owns only dev.kodari.deadsoullaughs.mixin, keeping DeadSoulLaughsClient outside the mixin package.

For Android launcher compatibility, replaced java.awt.Color with a pure-Java HSV-to-RGB conversion, removing the desktop AWT dependency from the overlay. The mod has no direct native or LWJGL calls.

This fixes the crash shown in the log. The LWJGL and renderer warnings are separate; actual gameplay on Mojo, PojavLauncher, or other Android launchers still depends on their Minecraft 1.21.11, Java 21, and graphics-backend support.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
gradle.properties
settings.gradle
Code
18 1,374
src/client/java/dev/kodari/deadsoullaughs/DeadSoulLaughsClient.java
package dev.kodari.deadsoullaughs;

import dev.kodari.deadsoullaughs.mixin.DeathScreenAccessor;
import com.mojang.brigadier.arguments.StringArgumentType;
import net.fabricmc.api.ClientModInitializer;
import net.fabricmc.fabric.api.client.command.v2.ClientCommandManager;
import net.fabricmc.fabric.api.client.command.v2.ClientCommandRegistrationCallback;
import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientTickEvents;
import net.fabricmc.fabric.api.client.screen.v1.ScreenEvents;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.gui.screen.DeathScreen;
import net.minecraft.client.gui.screen.Screen;
import net.minecraft.text.Text;
import net.minecraft.util.Formatting;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.nio.file.Path;
import java.util.Collections;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import java.util.WeakHashMap;

/** Client entrypoint and lifecycle wiring for DeadSoulLaughs. */
public final class DeadSoulLaughsClient implements ClientModInitializer {
    static final String MOD_ID = "deadsoullaughs";
    static final Logger LOGGER = LoggerFactory.getLogger(MOD_ID);
    private static final Set<String> LOGGED = Collections.synchronizedSet(new HashSet<>());
    private final Map<Screen, OverlayRenderer.Frame> frames = new WeakHashMap<>();
    private final Set<Screen> disabledScreens = Collections.newSetFromMap(new WeakHashMap<>());
    private final Path configDirectory = Path.of("config", MOD_ID);
    private ModConfig config = ModConfig.defaults();
    private RoastLibrary roasts = RoastLibrary.empty();
    private StatsStore stats = StatsStore.empty(configDirectory.resolve("stats.json"));
    private MomentSnapshot latestSnapshot = MomentSnapshot.empty();

    @Override
    public void onInitializeClient() {
        loadInitialState();
        ClientTickEvents.END_CLIENT_TICK.register(this::onClientTick);
        ScreenEvents.AFTER_INIT.register(this::onScreenInit);
        registerCommands();
    }

    private void loadInitialState() {
        try {
            config = ModConfig.load(configDirectory.resolve("config.json"));
        } catch (Exception exception) {
            logOnce("config-load", "Could not load config; using defaults.", exception);
            config = ModConfig.defaults();
        }
        try {
            roasts = RoastLibrary.load(configDirectory.resolve("roasts.json"));
        } catch (Exception exception) {
            logOnce("roasts-load", "Could not load roast data; overlays are disabled until reload.", exception);
            roasts = RoastLibrary.empty();
        }
        try {
            stats = StatsStore.load(configDirectory.resolve("stats.json"));
        } catch (Exception exception) {
            logOnce("stats-load", "Could not load stats; starting with empty stats.", exception);
            stats = StatsStore.empty(configDirectory.resolve("stats.json"));
        }
    }

    private void onClientTick(MinecraftClient client) {
        if (client.player != null && client.world != null && client.player.isAlive()) {
            try {
                latestSnapshot = MomentSnapshot.capture(client);
            } catch (Exception exception) {
                logOnce("snapshot", "Could not update the death moment snapshot.", exception);
                latestSnapshot = MomentSnapshot.empty();
            }
        }
    }

    private void onScreenInit(MinecraftClient client, Screen screen, int scaledWidth, int scaledHeight) {
        if (screen instanceof DeathScreen) {
            try {
                if (!config.enabled) {
                    return;
                }
                Text message = ((DeathScreenAccessor) screen).deadsoullaughs$getMessage();
                CauseResolver.Cause cause = CauseResolver.resolve(message, roasts, config.debugLogUnknownCause);
                String worldId = worldId(client);
                String statsCause = cause.key().isBlank() ? cause.pool() : cause.key();
                StatsStore.DeathRecord death = stats.recordDeath(worldId, statsCause, System.currentTimeMillis());
                RoastPicker.Selection selection = RoastPicker.pick(roasts, config, cause, latestSnapshot, death,
                        client.world != null && client.world.getLevelProperties().isHardcore(), stats.recentLines(worldId));
                stats.remember(worldId, selection.displayedLines(), config.noRepeatMemory);
                registerOverlay(screen, selection, false);
            } catch (Exception exception) {
                disableFor(screen, "death-screen", exception);
            }
        } else if (screen instanceof PreviewScreen preview) {
            registerOverlay(screen, preview.selection(), true);
        }
    }

    private void registerOverlay(Screen screen, RoastPicker.Selection selection, boolean preview) {
        frames.put(screen, new OverlayRenderer.Frame(selection, preview, System.nanoTime()));
        ScreenEvents.afterRender(screen).register((renderedScreen, context, mouseX, mouseY, tickDelta) -> {
            if (disabledScreens.contains(renderedScreen)) {
                return;
            }
            try {
                OverlayRenderer.render(context, renderedScreen, frames.get(renderedScreen), config.rainbow,
                        config.showFooter, config.showDeathCount);
            } catch (Exception exception) {
                disableFor(renderedScreen, "overlay-render", exception);
            }
        });
    }

    private void disableFor(Screen screen, String reason, Exception exception) {
        disabledScreens.add(screen);
        frames.remove(screen);
        logOnce(reason, "Overlay disabled safely for this screen.", exception);
    }

    private String worldId(MinecraftClient client) {
        if (client.isInSingleplayer() && client.getServer() != null) {
            return "singleplayer:" + client.getServer().getSaveProperties().getLevelName();
        }
        if (client.getCurrentServerEntry() != null) {
            return "server:" + client.getCurrentServerEntry().address;
        }
        return client.world == null ? "unknown" : client.world.getRegistryKey().getValue().toString();
    }

    private void registerCommands() {
        ClientCommandRegistrationCallback.EVENT.register((dispatcher, registryAccess) -> dispatcher.register(
                ClientCommandManager.literal("deadsoullaughs")
                        .then(ClientCommandManager.literal("preview")
                                .executes(context -> openPreview(context.getSource(), "generic", ""))
                                .then(ClientCommandManager.argument("cause", StringArgumentType.word())
                                        .executes(context -> openPreview(context.getSource(),
                                                StringArgumentType.getString(context, "cause"), ""))
                                        .then(ClientCommandManager.argument("mob", StringArgumentType.word())
                                                .executes(context -> openPreview(context.getSource(),
                                                        StringArgumentType.getString(context, "cause"),
                                                        StringArgumentType.getString(context, "mob"))))))
                        .then(ClientCommandManager.literal("list").executes(context -> {
                            context.getSource().sendFeedback(Text.literal("Cause pools: " + String.join(", ", roasts.names("cause:"))));
                            context.getSource().sendFeedback(Text.literal("Mob pools: " + String.join(", ", roasts.names("mob:"))));
                            return 1;
                        }))
                        .then(ClientCommandManager.literal("reload").executes(context -> {
                            reloadResources();
                            context.getSource().sendFeedback(Text.translatable("cmd.reload").formatted(Formatting.GREEN));
                            return 1;
                        }))
        ));
    }

    private int openPreview(net.fabricmc.fabric.api.client.command.v2.FabricClientCommandSource source, String cause, String mob) {
        String causePool = cause.toLowerCase(java.util.Locale.ROOT);
        String mobPool = mob.toLowerCase(java.util.Locale.ROOT);
        if (!roasts.has("cause:" + causePool) && !causePool.equals("generic")) {
            source.sendFeedback(Text.translatable("cmd.unknown_cause").formatted(Formatting.RED));
            return 0;
        }
        if (!mobPool.isEmpty() && !roasts.has("mob:" + mobPool)) {
            source.sendFeedback(Text.translatable("cmd.unknown_cause").formatted(Formatting.RED));
            return 0;
        }
        RoastPicker.Selection selection = RoastPicker.preview(roasts, config, causePool, mobPool);
        MinecraftClient.getInstance().setScreen(new PreviewScreen(selection));
        source.sendFeedback(Text.translatable("cmd.preview").formatted(Formatting.GREEN));
        return 1;
    }

    private void reloadResources() {
        try {
            config = ModConfig.load(configDirectory.resolve("config.json"));
            roasts = RoastLibrary.load(configDirectory.resolve("roasts.json"));
        } catch (Exception exception) {
            logOnce("reload", "Could not reload config or roast data.", exception);
        }
    }

    static void logOnce(String key, String message, Throwable exception) {
        if (LOGGED.add(key)) {
            LOGGER.error(message, exception);
        }
    }
}