Prince Kajiwa
📎 1 file 9,308 chars
📄
pasted-code-1791162031437.txt
txt 113 lines
▶
# Mod Specification: Immersive Combat & Injury System with Vanilla Integration

Implement the following status effects, mechanical triggers, armor mitigation scaling, asset textures, sound effects (SFX), custom death messages, and vanilla bed healing overrides. 

## IMPORTANT GENERAL RULE: MILK MODIFICATION
* Modify the default vanilla Milk Bucket behavior. Drinking Milk must ONLY cure the "Tetanus" effect. It must NOT clear Hemorrhage, Fracture, Concussion, Winded, or Hysteria.

---

## 1. MOB & WORLD RUST LOGIC
* **Zombie Rust:** Any Zombie, Husk, or Drowned that spawns naturally holding an Iron weapon or tool will AUTOMATICALLY have a "Rusty" tag applied to that item.
* **Tetanus Trigger:** Attacking any entity with an item possessing the "Rusty" tag has a 10% chance to inflict the Tetanus debuff on the victim.

---

## 2. REALISTIC DEBUFFS & TRIGGERS (WITH ARMOR MITIGATION)

### Hemorrhage
* **Logical Sources:** 
  * Taking continuous damage from Sweet Berry Bushes or Cacti (must take damage from them 3 or more times within a 5-second window).
  * Getting hit by any weapon or tool enchanted with Sharpness.
* **Armor & Buff Mitigation:** The base probability to inflict Hemorrhage from a Sharpness weapon is 30%. For every total point of Protection enchantment on the victim's armor, and while under the Resistance potion effect, reduce this chance by 3% (down to a minimum floor of 5%).
* **Effect:** Deals damage over time (DoT). Moving or sprinting doubles the speed of the damage ticks.
* **Vanilla Cure:** Receiving ANY form of health restoration (eating food to naturally regenerate health, drinking a Healing Potion, or getting Regeneration from a Golden Apple) instantly clears Hemorrhage.
* **UI Icon Asset:** A jagged, dark-red anatomical heart with a single thick droplet dripping out of the bottom. Palette uses deep maroon and crimson.
* **Trigger SFX:** A sharp, wet slashing sound (High pitch, medium volume).
* **Custom Death Messages:** 
  * "[Player] bled out in the wilderness."
  * "[Player] left a trail of blood that ended here."

### Tetanus
* **Logical Sources:** 
  * Getting hit by a Zombie's rusty weapon.
* **Effect:** The player experiences sudden muscle spasms, forcing them to drop whatever item is currently held in their main hand. This effect has a strict 15-second internal cooldown between drops so it does not become annoying.
* **Vanilla Cure:** Drinking a bucket of Milk or consuming a Honey Bottle.
* **UI Icon Asset:** A rusty, copper-colored iron chain link that is cracked and snapping in half. Palette uses dirty orange, brown, and metallic gray.
* **Trigger SFX:** An involuntary, high-pitched muscle gasp/grunt from the player mob, followed immediately by the standard vanilla item-dropping "pop" sound (Sharp, sudden volume spike).

### Fracture
* **Logical Sources:** 
  * Taking fall damage that removes 4 or more hearts of health.
  * Getting directly struck by a Ravager's charge attack.
* **Effect:** Reduces movement speed by 40% and completely disables the ability to jump.
* **Vanilla Cure:** Disappears completely if the player stands entirely still (no movement keys pressed, no jumping, and no camera mouse/joystick movement) for 10 seconds, OR is instantly cleared by gaining the Regeneration potion effect.
* **UI Icon Asset:** A simplified white leg bone silhouette with a sharp, lightning-bolt-shaped fracture crack running right through the middle. Palette uses pale bone-white on a dark charcoal gray background.
* **Trigger SFX:** A sickening, heavy bone-snapping crunch (Low pitch, high volume).

### Concussion
* **Logical Sources (Heavy Impacts):** 
  * Being hit by a falling Anvil.
  * Taking damage from a Warden's melee slam or Sonic Boom attack.
  * Getting hit by an Iron Golem's smash.
  * Being hit by a player utilizing a Mace smash from a height of 3 or more blocks.
  * Being caught in a Creeper or TNT explosion.
* **Effect:** Applies a heavy screen-blur visual shader effect and distorts ambient audio. Melee and ranged attacks have a 20% chance to miss or deal 0 damage.
* **Vanilla Cure:** Automatically expires after 15 seconds, or clears instantly upon consuming a Golden Apple.
* **UI Icon Asset:** A human head silhouette with multiple overlapping, blurry neon-yellow rings spinning around the top of the skull. Palette uses muted purple and dizzying neon yellow.
* **Trigger SFX:** A muffled, heavy thud followed instantly by a 3-second, high-pitched ear-ringing/tinnitus whine (High volume, environment audio becomes echoey).

### Winded
* **Logical Sources:** 
  * Allowing the underwater oxygen bubble bar to fully deplete to zero.
  * Being trapped inside a suffocating block (like Sand or Gravel) for more than 3 seconds.
  * Taking heavy Knockback damage (being hit by a weapon enchanted with Knockback II, or being blasted backwards by a Wind Charge).
* **Armor & Buff Mitigation:** If the player is wearing a full suit of Netherite Armor, or possesses the Resistance potion effect, the duration of the Winded effect caused by Knockback is cut in half.
* **Effect:** Saps the player's hunger/exhaustion bar at 2x the normal rate, making it impossible to sustain a sprint for long.
* **Vanilla Cure:** If caused by drowning/suffocation, restoring the oxygen bubble bar back to 100% instantly clears it. If caused by Knockback, it automatically wears off after 10 seconds.
* **UI Icon Asset:** A pair of deflated, crumpled lungs surrounded by a swirling spiral of light gray wind particles. Palette uses faded slate blue and ash gray.
* **Trigger SFX:** A deep, desperate gasping for air exhale sound that repeats every 4 seconds (Low volume, heavy bass).
* **Custom Death Messages:** 
  * "[Player] gasped for air but found none."
  * "[Player] lost their breath permanently."

---

## 3. HIGH-RISK SEMI-BUFF MECHANICS

### A. Adrenaline (The Damage Buffer)
* **Item & Asset Visuals:** Adds an item called "Adrenaline Shot". Texture is an old-school glass syringe icon angled upward, completely filled with an intensely glowing, crimson-colored liquid.
* **Sourcing & Crafting:** 
  * **Brewing:** Brewed in a Brewing Stand by placing a Fermented Spider Eye into an existing Potion of Swiftness (Speed Potion).
  * **Villager Trading:** Purchased from Master-level Cleric villagers for 8 Emeralds + 1 Potion of Swiftness.
  * **Loot Tables:** Spawns as rare loot in Stronghold and Ancient City chests.
* **Phase 1: Rush (30 Seconds):**
  * *Effects:* +30% Movement Speed, +25% Melee/Physical Damage, and 50% Damage Mitigation. The 50% damage that was mitigated must be tracked and stored in a hidden variable called `stored_adrenaline_damage`.
  * *UI Icon Asset:* The crimson syringe with small upward-pointing gold speed arrows inside it.
  * *Activation SFX:* A clean syringe plunge sound, followed by a sudden, intense heartbeat that beats incredibly fast for 2 seconds (High volume, crisp stereo sound).
* **Phase 2: Crash (15 Seconds):**
  * *Trigger:* Activates the exact millisecond "Rush" ends.
  * *Effects:* Reduces movement speed by 40%. Instantly inflicts the total accumulated damage from `stored_adrenaline_damage` directly to the player's health pool. This damage can bypass armor and can be lethal.
  * *UI Icon Asset:* The crimson syringe, but completely empty, shattered in half, and angled downward. Background is a dark, bruised navy blue.
  * *Expiry SFX:* A deep, slowed-down dull heartbeat that thuds once, followed by a heavy gasp/groan of pain (Low pitch, high volume).
* **Custom Death Messages:** 
  * "[Player]'s heart couldn't handle the adrenaline crash."
  * "[Player] pushed their body past the breaking point."

### B. Hysteria (The Desperation Buff)
* **Trigger:** Activates automatically the exact moment the player’s health drops to 2 hearts or lower.
* **The Buff:** The player deals 50% more melee damage and gains complete immunity to Knockback, Fracture, and Concussion.
* **The Downside:** A black-and-white visual overlay with a subtle noise/static shader is applied to the screen (not too jarring, still playable). All enemy footsteps and mob growls sound 3x closer/louder than they actually are. The player can no longer see enemy health bars or nameplates. 
* **Termination:** Ends immediately the moment the player's health is restored above 2 hearts.
* **UI Icon Asset:** A wide-open, panicked eye silhouette with a completely white pupil, surrounded by jagged, chaotic static lines. Palette uses high-contrast pitch black and stark white.
* **Active SFX:** A continuous, ambient low-frequency drone mixed with nearby enemy footsteps sounding unnaturally loud and close (Background audio level, distorted).
* **Custom Death Messages:** 
  * "[Player] succumbed to the shadows in a state of panic."
  * "[Player] was consumed by the noise."

---

## 4. SYSTEM OVERRIDE: RECOVERY SLEEPING
* Modify the bed mechanics. If a player goes to sleep while suffering from ANY of the debuffs listed above (Hemorrhage, Tetanus, Fracture, Concussion, or Winded), waking up in the morning will completely heal all active injuries. 
* To balance this, sleeping to clear injuries forces the player to stay in the bed animation for an extra 5 seconds ("Deep Recovery Sleep"), passing a slightly larger portion of the morning time in exchange for full treatment.
Kodari AI
KodariOct 5 at 1:16 am 5
ImmersiveCombatInjury
Adds realistic combat injuries and status effects to Minecraft. Implements Hemorrhage, Tetanus, Fracture, Concussion, and Winded debuffs with logical triggers, armor mitigation scaling, custom UI icons, SFX, and death messages. Modifies Milk to only cure Tetanus. Adds Adrenaline Shot item with Rush/Crash phases and Hysteria desperation buff. Overrides bed sleeping to fully heal all injuries with extended recovery time. Includes zombie rusty weapon logic and custom asset textures.
  1. Build the Fabric 26.2 project skeleton and injury-state system.

  2. Add combat/world triggers, cures, sleep recovery, and adrenaline/hysteria mechanics.

  3. Add the syringe item and required assets, recipes, and loot/trading data.

Created the Fabric 26.2 project with rusty-item marking, hemorrhage triggers and ticking, tetanus and its milk/honey cures, fracture and concussion triggers, winded effects, recovery on waking, and an adrenaline item with rush/crash timing.

This is a partial implementation, not the full specification. It does not yet include the custom status icons and SFX, death messages, brewing/trading/loot integration, the extra five-second recovery sleep, fracture jump blocking, concussion visual/audio effects and attack misses, or hysteria’s combat and knockback effects. Player injury state is also transient and won’t persist across server restarts. The adrenaline item currently has no survival-game acquisition method.

Prince Kajiwa

seems like the additions arent present, not the adrenaline item nor the custom effects

Kodari AI
KodariOct 5 at 1:57 am 2
  1. Make the Adrenaline Shot visible and obtainable in-game.

  2. Add player-visible custom injury effects rather than keeping injuries only as internal state.

  1. Adrenaline Shot: added it to Tools & Utilities; it was registered but had no creative-tab entry.

  2. Injury effects: investigating the 26.2 effect registration and display APIs before wiring them into the existing injury state.

  • Adrenaline Shot is now listed in the Creative Tools & Utilities tab.

  • Hemorrhage, Tetanus, Fracture, Concussion, Winded, Hysteria, Adrenaline Rush, and Adrenaline Crash are now registered status effects and shown while active.

The effects currently use missing-icon fallbacks: custom icon artwork isn’t included yet. The shot also doesn’t yet have brewing, trading, or loot acquisition.

Prince Kajiwa

bug reports: the textures do not load in, which are rhe status effect icons, the sfx, and the on screen effects for some status effects, that and the item texture for adrenaline(also the trade option for clerics to sell it at the highest trade level requirement, that and the brewing which i wanna make so any level of speed pption and a pufferfish equals to an adrenaline shot) also the rusted versions of copper and iron tools arent in the creative menu. also i remade the prompt to be more accurate. plus i wanna say that the bed rest mechanic is bugged with the fact you cant rest during day which you should be able to but in exchange of course it skips a certain amount of time. also wanna add before it becomes an issue is the on screen effects, for the concussion, you should make it flash white before the white fade out along woth the noise mentioned, and the hysteria make the transition be that it flashes black into the effects visual. and a addition for a bug tester to make bug testing easy would be nice, dunno how but you surprise me wink wink

pasted is the prompt, make it exactly true to the prompt and refer to it everytime. oh and also, the time amount for the effects are bugged displaying a lot of numbers despite the duration being correct

📎 1 file 2,891 chars
📄
pasted-code-1791167568495.txt
txt 56 lines
▶
# Mod: Combat Injuries & Adrenaline
Rule: Milk bucket ONLY cures Tetanus.

## 1. WORLD RUST LOGIC
* Zombie/Husk/Drowned natural spawn with Iron weapon = give item "Rusty" tag.
* Attacking with "Rusty" or Copper item = 10% chance to inflict Tetanus.

## 2. STATUS EFFECTS & MECHANICS

### Hemorrhage
* Triggers: continuous damage from Sweet Berry/Cactus (3x within 5s) OR hit by Sharpness weapon.
* Sharpness mitigation: Base 30% trigger chance. Reduce chance by 3% per total Protection armor level and while under Resistance effect (Floor: 5%).
* Effect: DoT damage. Moving/sprinting doubles tick damage rate.
* Cure: Receive any health restoration (food, Health/Regen potion, Golden Apple).

### Tetanus
* Trigger: Hit by Zombie's rusty weapon.
* Effect: Muscle spasm forces player to drop main-hand item (15s internal cooldown).
* Cure: Drink Milk bucket or Honey Bottle.

### Fracture
* Triggers: Fall damage ≥ 4 hearts OR hit by Ravager charge.
* Effect: -40% Move speed. Disable jumping.
* Cure: Stand 100% still (no move/jump/camera mouse rotation) for 10s OR gain Regeneration effect.

### Concussion
* Triggers: Falling Anvil, Warden melee/Sonic Boom, Iron Golem smash, Mace smash from ≥3 blocks height, Creeper/TNT explosion.
* Effect: Screen-blur shader, distorted audio. Attacks have 20% chance to fail/deal 0 damage. Duration: 15s.
* Cure: Consuming Golden Apple.

### Asphyxia
* Triggers: Bubble bar hits 0 OR suffocation inside a block (Sand/Gravel) > 3 seconds.
* Effect: Constantly saps health over time (suffocation damage). Screen edges pulse a dark vignette. 
* Cure: Refill oxygen bubble bar back to 100%.

### Winded
* Triggers: Taking heavy knockback (Knockback II weapon, Ravager roar, or Wind Charge blast).
* Mitigation: Full Netherite armor or Resistance effect halves effect duration.
* Effect: Saps hunger/exhaustion bar at 2x rate (blocks sustained sprinting). Duration: 10s.
* Cure: Automatically expires after 10 seconds.

## 3. SEMI-BUFFS

### Adrenaline Shot
* Recipe: Brew Fermented Spider Eye into Potion of Swiftness (Speed). Sold by Master Clerics for 8 Emeralds + Speed Potion. Rare loot in Stronghold/Ancient City chests.
* Phase 1: Rush (30s). +30% Speed, +25% Melee Damage, 50% Damage Mitigation. Track/store mitigated damage in variable `stored_adrenaline_damage`.
* Phase 2: Crash (15s). Activates instantly when Rush ends. -40% Speed. Deal total `stored_adrenaline_damage` directly to health (bypasses armor, lethal).

### Hysteria
* Trigger: Automatically activates at ≤ 2 hearts health. Ends when health > 2 hearts.
* Buff: +50% Melee damage, immune to Knockback, Fracture, Concussion.
* Debuff: Black-and-white static screen shader. Enemy sounds 3x louder. Hide enemy nameplates/health.

## 4. RECOVERY SLEEP
* Sleeping in bed cures Hemorrhage, Tetanus, Fracture, Concussion, Winded. Waking up forces a 5s "Deep Recovery Sleep" animation lock.
Kodari AI
KodariOct 5 at 3:35 am 29
  1. Fix status-effect icons, sounds, screen effects, adrenaline texture, and effect-duration text.

  2. Add the requested Master Cleric trade and brewing recipe, keeping the pasted prompt as the source of truth.

  3. Add rusty copper and iron tools to Creative.

  4. Allow daytime bed rest with an appropriate time skip and recovery behavior.

  5. Add a practical bug-testing aid.

  1. Visuals and duration display: added generated effect/item icons, concussion and hysteria overlays with onset sounds, and real or infinite effect durations.

  1. Trading and brewing: added Master Cleric offers for each Swiftness potion tier, the pufferfish brewing conversion, and rare Stronghold/Ancient City loot.

  1. Rusty tools: added tagged Rusty Iron/Copper tool stacks to Creative; Copper tools and Rust-tagged weapons now trigger the Tetanus chance.

  1. Bed rest: daytime sleep now works; vanilla advances time to the next wake-up marker, and waking applies a 5-second movement lock while curing the listed injuries.

  1. Bug tester: added the moderator-only /injurytest command for the custom effects and a clear option.

  2. Bring the remaining injury triggers, cures, and Asphyxia/Winded/Fracture/Concussion behavior in line with the pasted spec.

  3. Finish the Adrenaline and Hysteria combat effects to match that spec.

Implemented the missing features and aligned the injury behavior with the pasted spec:

  1. Textures and visuals: Added generated icons for the custom status effects and a custom Adrenaline Shot texture. Enabled the client source set so the client entrypoint and client mixins are packaged. Added the concussion flash/fade, pulsing Asphyxia vignette, and Hysteria static overlay; concussion and Hysteria also play vanilla sound cues.

  2. Effect timing and mechanics: Replaced huge placeholder durations with finite timers where applicable and infinite durations for state-based effects. Added Asphyxia, concussion attack failures and Golden Apple cure, Fracture jump prevention and stillness recovery, and Winded triggers, mitigation, and timer.

  3. Adrenaline and Hysteria: Added the Rush melee-damage bonus and Hysteria’s damage, knockback, Fracture, and Concussion behavior. The Crash damage now bypasses armor. Hysteria also amplifies aggressive-mob sounds and hides their name and below-name displays.

  4. Adrenaline acquisition: Added Master Cleric level-5 trades for all three Swiftness potion tiers, pufferfish brewing with any Swiftness tier, and 1% loot rolls in Stronghold and Ancient City chest variants.

  5. Rusty tools and Tetanus: Added named, rusty-tagged Iron and Copper tools to Creative; Copper tools now qualify for Tetanus, and Milk is the only Tetanus cure.

  6. Recovery and testing: Daytime bed rest now works and uses vanilla’s wake-up time skip. Waking clears the specified injuries and applies a 5-second movement lock. Added moderator-only /injurytest <effect> commands and /injurytest clear.

I followed the explicit Speed Potion + Pufferfish brewing request; it conflicts with the pasted prompt’s Fermented Spider Eye line. The screen visuals are HUD overlays rather than custom post-processing shaders, and the sound cues reuse vanilla sounds rather than bundled audio assets.

Prince Kajiwa

The compilation failed with this error:

code
[FABRIC] Compiling 9 Java files for MC 26.2 (release 25)
[ERROR] Compilation failed

/workspace/src/main/java/com/kodari/combatinjuries/CombatInjuries.java:598: error: statements not expected outside of methods and initializers
			if (attackDamage != null) {
			^
/workspace/src/main/java/com/kodari/combatinjuries/CombatInjuries.java:609: error: statements not expected outside of methods and initializers
			if (knockbackResistance != null) {
			^
2 errors

Please fix this error by creating a new artifact with the corrected code.

Kodari AI
KodariOct 5 at 3:50 am 1

Moved the attack-damage and knockback-resistance updates into tickPlayer and removed them from outside the class, fixing the reported compilation errors.

Prince Kajiwa

just checking if we fixed the code and now we can compile it? that and we're rebranding to IFAAR (Injured For An Amazing Reason.)

Kodari AI
KodariOct 5 at 3:52 am 1
  1. Verify the reported syntax fix in CombatInjuries.java and correct it if needed.

  2. Rebrand the mod to IFAAR.

  1. The reported stray if statements are no longer present in CombatInjuries.java; the class closes normally. The specific errors are fixed, but I can’t confirm a successful build without running Kodari’s Compile action. I’ll rebrand the project next.

The reported syntax errors are fixed: those stray if statements are no longer outside a method. I can’t confirm a successful build or new jar until the project compiles.

The mod’s display name is now IFAAR (Injured For An Amazing Reason.), and the Gradle project name is IFAAR. I left the internal mod ID and package unchanged to avoid breaking resource and class references.

To compile and download the jar: click Compile in the top bar (or on phone, ⋮ → Compile Project), then click Compile in the window. Once it succeeds, click Download.

Prince Kajiwa

new bug report. the icons still do not work, they display a missing texture icon instead, i feel as if a focus on the textures should be in place. technical bugs: concussion effect works but doesnt last for the duration of the effect that displays on the inventory and the sfx isnt a ringing tinnitus sound. hysteria is almost fixed with the only two issues is that theres no monochrome filter as the screen fades to black then rveals the monochrome filter and second is the heart beat not being consistent till the effect ends which is till the player heals so that means indefinitely till player heals. issue with tetanus whereit would duplicate items? not sure if command issue with injury apply or effect issue, also should make it so any selected hand items would drop until cured. maybe also add a command to spawn varying rusty tool/weapon wielding zombie type. sleeping doesnt advance day, and having an ailment and clicking the bed without fully sleeping wipes effect immediately, tetanus also cures somehwat the same as sipping cures without actually drinking the milk. also sorry for confusion with the brewing but its already implemented to have speed potions brew into adrenaline shots with the addition of pufferfish so great job. should i also mention the sfx for the rest of the debuffs actually dont play as well?

i know its maybe messsy to add an addition in the middle of bug fixing but itd be great if you added this music with the adrenaline rushe with it "powering up" in the start then when rush ends it "powers down" typa sound effect with the music and that the screen flashes red with the use of the adrenaline shot. eh but idk if you accept audio files so find or generate an ULTRAKILL type amen break beat

Kodari AI
KodariOct 5 at 5:33 am 9
  1. Fix the missing item icons/textures.

  2. Fix concussion duration and make sure debuff sound effects play.

  3. Correct hysteria’s monochrome transition and heartbeat timing.

  4. Investigate tetanus duplication, forced item drops, and curing.

  5. Add a command for rusty-weapon zombie variants.

  6. Fix sleep progression and the bed interaction clearing ailments.

  7. Add adrenaline-shot screen feedback and a powering-up/down music cue.

  1. Icons: the effects’ texture names match their IDs, but the generated PNGs were only written under build/. I changed the generator to place them in the normal resources tree so they can be included with the mod assets.

  2. Next: investigate concussion timing and missing debuff sounds.

  1. Concussion and debuff sounds: the concussion overlay now remains subtly visible for as long as the effect is active, with a repeated high-pitched vanilla cue. Debuff cues now trigger from client ticks instead of HUD rendering, and all debuffs have an onset cue. Next: fix hysteria’s transition and heartbeat timing.

  1. Hysteria: added a full-screen grayscale post-effect after the brief fade-to-black transition, with a heartbeat cue repeating while the effect is active. Next: fix tetanus item duplication, hand drops, and curing.

  1. Tetanus: drops now transfer the stack out of alternating hands instead of duplicating it; milk cures only after its use finishes. Next: add a command that spawns a zombie with a randomly selected rusty weapon or tool.

  1. Rusty zombie command: added /injurytest rusty_zombie, which spawns a zombie wielding a randomly selected, tetanus-triggering rusty tool or weapon. Next: fix bed sleep progression and ensure an incomplete bed interaction does not clear injuries.

  1. Sleep: injuries now clear only after the player qualifies as a deep sleeper, so entering and promptly leaving a bed won’t cure them. Day advancement still follows vanilla’s sleep threshold and the ADVANCE_TIME gamerule; the daytime-bed rule itself doesn’t force the clock forward. Next: add adrenaline-shot red-screen feedback and a powering-up/loop/powering-down audio cue.

Implemented the reported fixes and additions:

  1. Missing icons: changed the texture generator to write PNGs into src/main/resources, where they can be packaged with the mod.

  2. Concussion and debuff audio: the concussion overlay now stays subtly visible until the effect ends, with a repeating high-pitched cue. Debuff cues are triggered from client ticks rather than HUD rendering.

  3. Hysteria: added a grayscale post-effect after the brief fade-to-black and repeat the heartbeat while hysteria is active.

  4. Tetanus: item drops now remove the stack from the chosen hand only after a successful drop, alternating hands when both are occupied. Milk cures tetanus after its use completes, not when drinking starts.

  5. Rusty zombie: added /injurytest rusty_zombie, spawning a zombie with a randomly chosen rusty iron or copper tool/weapon.

  6. Sleep: injury recovery now requires the player to qualify as a deep sleeper, so quickly entering and leaving a bed won’t clear injuries. Day advancement remains governed by vanilla sleep thresholds and the ADVANCE_TIME gamerule; the mod’s daytime-bed rule alone doesn’t force the clock forward.

  7. Adrenaline: added a red screen flash and a procedural breakbeat-style cue with rising and falling tones, built from vanilla percussion sounds—not a custom audio recording or an ULTRAKILL track.

I haven’t run Kodari’s Compile action, so I can’t confirm a newly built jar yet.

Prince Kajiwa

okay so hemorrhage is broken with it not sticking with constant damage from cactus dont know if this is the case for other sources, texture still not working give focus on that please its integral, death messages dont work for the custom debuffs, make the monochrome on hysteria darker high contrast while use the old monochrome of hysteria as an overlay for adrenaline as soon as the red flashes and the monochrome slowly fades into normal as rush ends and same goes for hysteria as its own monochrome slowly but slower fades into normal (note hysteria has a darker and high contrast monochrome overlay) the music for adrenaline is not too rush inducing or is just simply too soft, no way to just import or use a free amen break beat? also concussion tinnitus sound not true to the ringing sound but sounds more like beeping, advance time for sleeping might still not be working, also tetanus doesnt clear from milk now might be the same for honey check, and check if dropping on hand items is chance based or chance based if there is click input? red flash for adrenaline not red enough deep red maybe?

Give focus to ensuring the icons, sfx (if theres an issue), death messages, and visuals are fixed and tidied

Kodari AI
KodariOct 5 at 6:33 am 8
  1. Fix the missing effect icons and verify their asset paths/identifiers.

  2. Fix hemorrhage damage and custom-debuff death messages.

  3. Refine hysteria/adrenaline visuals and audio, including the tinnitus sound.

  4. Check sleep advancement, milk/honey cures, and tetanus item-drop behavior.

  1. Icons: moved generated textures into Gradle’s dedicated generated-resource directory and registered that directory as a resource source. This avoids claiming all of src/main/resources as generated output and ensures the generated effect icons are packaged.

  2. Investigating hemorrhage damage and custom-effect death messages next.

  1. Hemorrhage/death messages: hemorrhage and asphyxia now retry damage if vanilla rejects a hit instead of resetting their timers, and these deaths (plus adrenaline-crash damage) use dedicated translated damage types.

  2. Investigating the visual/audio timing before adjusting it.

  1. Visuals/audio: hysteria now uses a darker high-contrast filter that eases in/out; adrenaline gets the original grayscale look during rush and fades back afterward, with a deeper red flash. Switched concussion’s beep to a bell-resonance cue and strengthened the procedural breakbeat and onset cues.

  2. Checking sleep progression, milk/honey curing, and whether tetanus drops depend on chance or input.

Implemented the remaining fixes, with priority on the icons, visuals, sounds, and death messages:

  • Effect icons: the texture generator now writes to Gradle’s registered generated-resources directory, so the icons can be included in the packaged mod instead of relying on files under src/main/resources.

  • Hemorrhage: damage retries when Minecraft rejects a hit during invulnerability frames, rather than losing that damage interval. Asphyxia gets the same retry behavior.

  • Death messages: added translated messages and damage types for hemorrhage, asphyxia, and adrenaline-crash damage.

  • Hysteria/adrenaline visuals: hysteria now fades into a darker, higher-contrast monochrome filter and fades back out; adrenaline applies the original grayscale look with the red flash, then fades back to normal after the rush. The red flash is deeper and stronger.

  • Sounds: replaced concussion’s pling with a repeating bell-resonance cue and increased debuff onset cue levels. The adrenaline beat is faster and louder, but it remains a procedural pattern made from vanilla sounds—not an imported Amen break recording.

  • Sleep and recovery: added a sleep-completion hook to advance the clock at the wake-up marker without advancing it twice when vanilla already did. Injury recovery now also checks that the wake-up marker was reached, preventing an incomplete bed interaction from clearing injuries.

  • Milk/honey and tetanus drops: moved the cure check to completed item use, checking the item before vanilla consumption mutates the stack. Both milk and honey now cure tetanus. The hand drop is deterministic, not chance- or click-based: it drops held items immediately, then every 15 seconds while tetanus remains active.

I haven’t run Kodari’s Compile action, so the changes are not yet build-verified.

Prince Kajiwa

test documentation: using adrenaline sometimes crashes the world, not the game, adrenaline shot still does not have a texture however i provided a texture for it. provide a folder to place my own custom wav file for the music for the adrenaline (its 2 seconds so loop it until 30 secs which is adrenaline crash (also add a desaturated filter for when crash comes that fades away when the effect goes away). injury status effect icons still dont show, maybe because they dont exist? generate status effect icons for the injuries based on the descriptions in the prompt. injury based damage deal knockback, remove that. hemmorhage infliction via cactus/sweetberry not consistent sometimes applies but then dissappears, make it so you only get it if you stand long enough within the damage. sleeping recovery does not advance the day, makes player stuck on the block they spawn on after sleeping for a few seconds, and does not regen health in exchange for hunger proportionate to damage (but clears effects but check if it applies to all injuries i might be mistaken). concussion should block all in world sounds except for the concussion sound itself until the effect wears off. hysteria still does not have the monochrom high contrast filter but the static is there, please fix. remove the current music for adrenaline for the implementation of my own music as i had said in the beginning (the folder thing where i drop the wav and loop the 2second wav until adrenaline wears off)

Kodari AI
KodariOct 7 at 3:35 am 8
  1. Diagnose and fix the adrenaline world crash.

  2. Repair the provided adrenaline-shot texture and add generated injury-effect icons.

  3. Replace procedural adrenaline music with a user-provided looping WAV, and fix the crash desaturation and hysteria filter.

  4. Fix injury knockback and cactus/sweet-berry hemorrhage timing.

  5. Repair sleep day-advance and proportional health recovery; verify which injuries it clears.

  6. Mute other world sounds during concussion while preserving its tinnitus cue.

  1. Crash diagnosis: the server-side adrenaline path shows no obvious client-only call; the custom post-effect and rapid client sound cues are the main suspects. I’ll remove the procedural sound path and make the visual/audio changes next, but a crash report is needed to identify a remaining world-tick exception precisely.

  2. Checking the provided adrenaline texture and current effect icon assets.

  1. Texture check: the workspace contains no image files, so the provided adrenaline-shot art is not actually available to the project; the existing item model points to the expected texture path. I’m moving on to the requested custom-music implementation and will make its drop-in location explicit.

  1. Custom music/visuals: removed the procedural adrenaline beat, added a looped WAV stream during rush, and added a fading crash desaturation effect. The project now has a drop-in sounds folder; I’m fixing injury knockback and sustained cactus/berry exposure next.

  1. Injury damage: added vanilla’s no-knockback damage tag for hemorrhage, asphyxia, and adrenaline crash; cactus/berry hemorrhage now requires sustained repeated damage instead of just a few hits. I’m checking sleep-time advancement and recovery behavior now.

  • Adrenaline music: Removed the procedural beat. Add your mono/stereo PCM WAV at src/main/resources/assets/combatinjuries/sounds/adrenaline_music/adrenaline.wav; it loops during the 30-second rush and stops when the crash begins. Missing or unreadable WAV files now fail silent instead of being sent to the audio engine.

  • Adrenaline crash and hysteria visuals: Added a desaturation filter that fades in during the crash and fades out after it ends. Increased hysteria’s monochrome contrast and darkness. The original world-crash report still needs a crash log to identify a specific server exception.

  • Concussion audio: Stops sounds already playing when concussion starts and mutes subsequent sounds except for its tinnitus cue.

  • Injury damage: Hemorrhage, asphyxia, and adrenaline-crash damage no longer cause knockback. Cactus and sweet-berry hemorrhage now requires about five seconds of repeated damage; gaps reset the exposure timer.

  • Sleep recovery: Removed the extra time-advance hook that could conflict with vanilla’s sleep completion, and removed the post-sleep movement lock. A completed sleep clears the injury states and provides gradual healing at one health point per second, costing exhaustion in proportion to healing.

  • Textures/icons: The project contains no uploaded PNG, so I couldn’t wire in the provided adrenaline-shot image itself. The build now prefers it at src/main/resources/assets/combatinjuries/textures/item/adrenaline_shot.png instead of replacing it with the fallback. Effect icons use the 26.2 path assets/combatinjuries/textures/mob_effect/<effect-id>.png; I couldn’t create new descriptive artwork while texture generation is disabled. Enable it via project Settings → Generation, or globally at https://kodari.ai/settings?tab=features.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
gradle.properties
settings.gradle
Code
32 1,801
src/main/java/com/kodari/combatinjuries/CombatInjuries.java
package com.kodari.combatinjuries;

import java.util.HashMap;
import java.util.Map;
import java.util.UUID;
import java.util.concurrent.ThreadLocalRandom;

import net.fabricmc.api.ModInitializer;
import net.fabricmc.fabric.api.command.v2.CommandRegistrationCallback;
import net.fabricmc.fabric.api.entity.event.v1.EntitySleepEvents;
import net.fabricmc.fabric.api.entity.event.v1.ServerLivingEntityEvents;
import net.fabricmc.fabric.api.event.lifecycle.v1.ServerEntityEvents;
import net.fabricmc.fabric.api.event.lifecycle.v1.ServerTickEvents;
import net.fabricmc.fabric.api.event.player.AttackEntityCallback;
import net.fabricmc.fabric.api.event.player.UseItemCallback;
import net.fabricmc.fabric.api.creativetab.v1.CreativeModeTabEvents;
import net.fabricmc.fabric.api.loot.v3.LootTableEvents;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Registry;
import net.minecraft.core.Holder;
import net.minecraft.core.registries.BuiltInRegistries;
import net.minecraft.core.registries.Registries;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.resources.Identifier;
import net.minecraft.resources.ResourceKey;
import net.minecraft.server.level.ServerLevel;
import net.minecraft.server.level.ServerPlayer;
import net.minecraft.world.damagesource.DamageSource;
import net.minecraft.world.damagesource.DamageType;
import net.minecraft.world.damagesource.DamageTypes;
import net.minecraft.sounds.SoundEvent;
import net.minecraft.world.effect.MobEffect;
import net.minecraft.world.effect.MobEffectCategory;
import net.minecraft.world.effect.MobEffectInstance;
import net.minecraft.world.effect.MobEffects;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.EntitySpawnReason;
import net.minecraft.world.entity.EntityTypes;
import net.minecraft.world.entity.EquipmentSlot;
import net.minecraft.world.entity.ai.attributes.AttributeInstance;
import net.minecraft.world.entity.ai.attributes.AttributeModifier;
import net.minecraft.world.entity.ai.attributes.Attributes;
import net.minecraft.world.entity.monster.zombie.Zombie;
import net.minecraft.world.item.enchantment.Enchantment;
import net.minecraft.world.item.enchantment.EnchantmentHelper;
import net.minecraft.world.item.enchantment.Enchantments;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.Items;
import net.minecraft.world.item.component.CustomData;
import net.minecraft.core.component.DataComponents;
import net.minecraft.commands.CommandSourceStack;
import net.minecraft.commands.Commands;
import net.minecraft.server.permissions.Permissions;
import com.mojang.brigadier.exceptions.CommandSyntaxException;
import net.minecraft.world.level.storage.loot.BuiltInLootTables;
import net.minecraft.world.level.storage.loot.LootPool;
import net.minecraft.world.level.storage.loot.entries.LootItem;
import net.minecraft.world.level.storage.loot.predicates.LootItemRandomChanceCondition;
import net.minecraft.network.chat.Component;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.block.Blocks;
import net.minecraft.world.InteractionHand;
import net.minecraft.world.InteractionResult;

public final class CombatInjuries implements ModInitializer {
	public static final String MOD_ID = "combatinjuries";
	private static final String RUSTY_MARKER = "combatinjuries_rusty";
	private static final ResourceKey<Item> ADRENALINE_KEY = ResourceKey.create(
		Registries.ITEM,
		Identifier.fromNamespaceAndPath(MOD_ID, "adrenaline_shot")
	);
	public static final Item ADRENALINE_SHOT = Registry.register(
		BuiltInRegistries.ITEM,
		ADRENALINE_KEY,
		new Item(new Item.Properties().setId(ADRENALINE_KEY))
	);
	public static final Holder<MobEffect> HEMORRHAGE_EFFECT = registerEffect("hemorrhage", MobEffectCategory.HARMFUL, 0x7D1020);
	public static final Holder<MobEffect> TETANUS_EFFECT = registerEffect("tetanus", MobEffectCategory.HARMFUL, 0xA65E32);
	public static final Holder<MobEffect> FRACTURE_EFFECT = registerEffect("fracture", MobEffectCategory.HARMFUL, 0xC9C5B8);
	public static final Holder<MobEffect> CONCUSSION_EFFECT = registerEffect("concussion", MobEffectCategory.HARMFUL, 0xC5C02A);
	public static final Holder<MobEffect> ASPHYXIA_EFFECT = registerEffect("asphyxia", MobEffectCategory.HARMFUL, 0x263C51);
	public static final Holder<MobEffect> WINDED_EFFECT = registerEffect("winded", MobEffectCategory.HARMFUL, 0x758899);
	public static final Holder<MobEffect> HYSTERIA_EFFECT = registerEffect("hysteria", MobEffectCategory.NEUTRAL, 0xE8E8E8);
	public static final Holder<MobEffect> ADRENALINE_RUSH_EFFECT = registerEffect("adrenaline_rush", MobEffectCategory.BENEFICIAL, 0xD71935);
	public static final Holder<MobEffect> ADRENALINE_CRASH_EFFECT = registerEffect("adrenaline_crash", MobEffectCategory.HARMFUL, 0x33364A);
	private static final Identifier FRACTURE_SPEED_ID = Identifier.fromNamespaceAndPath(MOD_ID, "fracture_speed");
	private static final Identifier RUSH_SPEED_ID = Identifier.fromNamespaceAndPath(MOD_ID, "adrenaline_rush_speed");
	private static final Identifier CRASH_SPEED_ID = Identifier.fromNamespaceAndPath(MOD_ID, "adrenaline_crash_speed");
	private static final Identifier RUSH_DAMAGE_ID = Identifier.fromNamespaceAndPath(MOD_ID, "adrenaline_rush_damage");
	private static final Identifier HYSTERIA_DAMAGE_ID = Identifier.fromNamespaceAndPath(MOD_ID, "hysteria_damage");
	private static final Identifier HYSTERIA_KNOCKBACK_ID = Identifier.fromNamespaceAndPath(MOD_ID, "hysteria_knockback_resistance");
	private static final ResourceKey<DamageType> HEMORRHAGE_DAMAGE_TYPE = damageTypeKey("hemorrhage");
	private static final ResourceKey<DamageType> ASPHYXIA_DAMAGE_TYPE = damageTypeKey("asphyxia");
	private static final ResourceKey<DamageType> ADRENALINE_CRASH_DAMAGE_TYPE = damageTypeKey("adrenaline_crash");
	private static final Identifier ADRENALINE_MUSIC_ID = Identifier.fromNamespaceAndPath(MOD_ID, "adrenaline_music");
	private static final Identifier CONCUSSION_TINNITUS_ID = Identifier.fromNamespaceAndPath(MOD_ID, "concussion_tinnitus");
	public static final SoundEvent ADRENALINE_MUSIC = Registry.register(
		BuiltInRegistries.SOUND_EVENT,
		ADRENALINE_MUSIC_ID,
		SoundEvent.createVariableRangeEvent(ADRENALINE_MUSIC_ID)
	);
	public static final SoundEvent CONCUSSION_TINNITUS = Registry.register(
		BuiltInRegistries.SOUND_EVENT,
		CONCUSSION_TINNITUS_ID,
		SoundEvent.createVariableRangeEvent(CONCUSSION_TINNITUS_ID)
	);
	private static final Map<UUID, InjuryState> STATES = new HashMap<>();

	@Override
	public void onInitialize() {
		CreativeModeTabEvents.modifyOutputEvent(ResourceKey.create(
			Registries.CREATIVE_MODE_TAB,
			Identifier.withDefaultNamespace("tools_and_utilities")
		)).register(output -> {
			output.accept(ADRENALINE_SHOT);
			output.accept(rustyCreativeStack(Items.IRON_SWORD, "item.combatinjuries.rusty_iron_sword"));
			output.accept(rustyCreativeStack(Items.IRON_AXE, "item.combatinjuries.rusty_iron_axe"));
			output.accept(rustyCreativeStack(Items.IRON_PICKAXE, "item.combatinjuries.rusty_iron_pickaxe"));
			output.accept(rustyCreativeStack(Items.IRON_SHOVEL, "item.combatinjuries.rusty_iron_shovel"));
			output.accept(rustyCreativeStack(Items.IRON_HOE, "item.combatinjuries.rusty_iron_hoe"));
			output.accept(rustyCreativeStack(Items.COPPER_SWORD, "item.combatinjuries.rusty_copper_sword"));
			output.accept(rustyCreativeStack(Items.COPPER_AXE, "item.combatinjuries.rusty_copper_axe"));
			output.accept(rustyCreativeStack(Items.COPPER_PICKAXE, "item.combatinjuries.rusty_copper_pickaxe"));
			output.accept(rustyCreativeStack(Items.COPPER_SHOVEL, "item.combatinjuries.rusty_copper_shovel"));
			output.accept(rustyCreativeStack(Items.COPPER_HOE, "item.combatinjuries.rusty_copper_hoe"));
		});
		LootTableEvents.MODIFY.register((key, tableBuilder, source, registries) -> {
			if (key.equals(BuiltInLootTables.STRONGHOLD_LIBRARY)
				|| key.equals(BuiltInLootTables.STRONGHOLD_CROSSING)
				|| key.equals(BuiltInLootTables.STRONGHOLD_CORRIDOR)
				|| key.equals(BuiltInLootTables.ANCIENT_CITY)
				|| key.equals(BuiltInLootTables.ANCIENT_CITY_ICE_BOX)) {
				tableBuilder.withPool(LootPool.lootPool()
					.add(LootItem.lootTableItem(ADRENALINE_SHOT))
					.when(LootItemRandomChanceCondition.randomChance(0.01F)));
			}
		});
		ServerEntityEvents.ENTITY_LOAD.register(CombatInjuries::markNaturallyHeldIronItems);
		AttackEntityCallback.EVENT.register(CombatInjuries::onAttack);
		UseItemCallback.EVENT.register(CombatInjuries::onUseItem);
		ServerLivingEntityEvents.AFTER_DAMAGE.register(CombatInjuries::afterDamage);
		CommandRegistrationCallback.EVENT.register((dispatcher, buildContext, selection) -> dispatcher.register(
			Commands.literal("injurytest")
				.requires(source -> source.permissions().hasPermission(Permissions.COMMANDS_MODERATOR))
				.then(Commands.literal("hemorrhage").executes(context -> runInjuryTest(context.getSource(), "hemorrhage")))
				.then(Commands.literal("tetanus").executes(context -> runInjuryTest(context.getSource(), "tetanus")))
				.then(Commands.literal("fracture").executes(context -> runInjuryTest(context.getSource(), "fracture")))
				.then(Commands.literal("concussion").executes(context -> runInjuryTest(context.getSource(), "concussion")))
				.then(Commands.literal("asphyxia").executes(context -> runInjuryTest(context.getSource(), "asphyxia")))
				.then(Commands.literal("winded").executes(context -> runInjuryTest(context.getSource(), "winded")))
				.then(Commands.literal("hysteria").executes(context -> runInjuryTest(context.getSource(), "hysteria")))
				.then(Commands.literal("adrenaline_rush").executes(context -> runInjuryTest(context.getSource(), "adrenaline_rush")))
				.then(Commands.literal("adrenaline_crash").executes(context -> runInjuryTest(context.getSource(), "adrenaline_crash")))
					.then(Commands.literal("rusty_zombie").executes(context -> spawnRustyZombie(context.getSource())))
				.then(Commands.literal("clear").executes(context -> runInjuryTest(context.getSource(), "clear")))
		));
			EntitySleepEvents.START_SLEEPING.register((entity, sleepingPos) -> {
				if (entity instanceof ServerPlayer player) {
					state(player).deepSleepQualified = false;
				}
			});
			EntitySleepEvents.ALLOW_RESETTING_TIME.register(player -> {
				if (player instanceof ServerPlayer serverPlayer) {
					state(serverPlayer).deepSleepQualified = true;
				}
				return true;
			});
			EntitySleepEvents.STOP_SLEEPING.register((entity, sleepingPos) -> {
			if (entity instanceof ServerPlayer player) {
				InjuryState state = state(player);
					if (!state.deepSleepQualified) {
						return;
					}
					state.deepSleepQualified = false;
					ServerLevel level = (ServerLevel) player.level();
					var defaultClock = level.dimensionType().defaultClock();
					if (defaultClock.isEmpty() || !level.clockManager().isAtTimeMarker(defaultClock.get(), net.minecraft.world.clock.ClockTimeMarkers.WAKE_UP_FROM_SLEEP)) {
						return;
					}
				state.hemorrhage = false;
				state.tetanus = false;
				state.fracture = false;
					state.asphyxia = false;
					state.asphyxiaSawLowAir = false;
					state.asphyxiaDamageTicks = 0;
					state.buriedSuffocationTicks = 0;
					state.lastBuriedSuffocationTick = -1;
				state.concussionTicks = 0;
				state.winded = false;
					state.windedTicks = 0;
					state.hysteria = false;
					state.adrenalineRushTicks = 0;
					state.adrenalineCrashTicks = 0;
					state.storedAdrenalineDamage = 0.0F;
				state.bleedTicks = 0;
					state.tetanusCooldown = 0;
					state.tetanusDropOffHand = false;
					state.berryDamageTicks = 0;