Back to mods
Keep But Penalty project artwork

Modrinth · Minecraft mod

Keep But Penalty

Keep your inventory on death without altering gamerules — configurable XP, percentage durability, anti-suicide hunger, and respawn debuff penalties.

Choose a version Pick your version below, then grab the matching file.

Quick answer

Which Keep But Penalty release matches 26.1.2?

Updated today
Best match for your filters 2.0.1+26.1.2-neoforge
Game version 26.1.2
Loader NeoForge

Keep But Penalty 2.0.1+26.1.2-neoforge targets 26.1.2 with NeoForge. Installation on the client is optional. Installation on the dedicated server is optional. No extra mods listed for this file.

Where it goes

Is Keep But Penalty required on the client, server, or both?

Installation on the client is optional. Installation on the dedicated server is optional.

Client Optional
Dedicated server Optional
Loader for this release NeoForge
Required install it here Optional supported, not mandatory Not supported do not install here Source doesn’t say do not assume

The source marks this as usable on both the client and server.

What else does Keep But Penalty 2.0.1+26.1.2-neoforge need?

2.0.1+26.1.2-neoforge on 26.1.2. Every mod below is checked against that same setup.

No extra mods listed for this file

This file does not list any required mods. Do not add a library just because a different file uses it.

This file does not list any required or optional mods.

Before you install it

Add Keep But Penalty without breaking your instance.

Built for Keep But Penalty 2.0.1+26.1.2-neoforge on 26.1.2. Pick another file and the loader, install side or required mods may change.

  1. 01

    Stick to this file

    Use 2.0.1+26.1.2-neoforge. It targets 26.1.2 with NeoForge; another release may have different loader, side or dependency requirements.

  2. 02

    Bring the mods it needs

    This file does not list any required mods. Do not add a library just because a different file uses it.

  3. 03

    Put it on the correct side

    Installation on the client is optional. Installation on the dedicated server is optional.

  4. 04

    Pick the file you checked

    Use the “Get this file” button beside 2.0.1+26.1.2-neoforge. It opens that exact file at the source.

About this project

What does Keep But Penalty add?

Keep But Penalty

Keep But Penalty

Keep your inventory. Pay a fair price for death.

Keep But Penalty is a lightweight, zero-dependency multi-loader mod for Fabric, Forge, and NeoForge that keeps player inventories on death without mutating the world's keepInventory gamerule—while replacing tedious corpse runs with fair, configurable experience, durability, hunger, and progressive respawn debuff penalties.

Highlights

  • Death-Scoped Keep Inventory: Temporarily projects keepInventory = true via a reentrant ThreadLocal only while ServerPlayer.die and ServerPlayer.restoreFrom execute. Your world's real keepInventory gamerule is never altered.
  • Exact Experience Penalty: Defaults to keeping 75% of total experience (25% lost). Computes experienceLevel, experienceProgress, and totalExperience directly with exact vanilla math—never calling giveExperiencePoints, so XP pickup events and Mending are never spuriously triggered.
  • Fair Durability Penalty: Defaults to 10% of max durability (PERCENT_MAX) or optional fixed points (FLAT), with IdentityHashMap deduplication across armor, hands, and optional Curios, Trinkets, and Accessories slots.
    • Safe-by-Default & Vanilla-Decoupled Breaking Protocol: Defaults to allowBreak = false, clamping durability loss to keep at least 1 durability remaining so items never shatter from death penalties. When explicitly set to allowBreak = true and an item reaches max damage, Keep But Penalty invokes standard vanilla ItemStack.hurtAndBreak(...)—destroying the item cleanly in vanilla (no 0/max ghost armor) or naturally letting anti-break mods (such as Keep My Sword) take over with zero hardcoded coupling. Vanilla Elytra always stops at maxDamage - 1 (broken-wing state).
    • Item & Tag Exclusions: Exempt specific items or #tags via excludedItems (pre-configured with #keep_but_penalty:excluded, #tconstruct:modifiable, #tetra:modular_items, and #slashblade:swords).
  • Anti-Suicide Hunger Preservation: Preserves below-full hunger across death with a configurable floor (minRespawnFoodLevel = 6, 3 drumsticks) so players cannot reset hunger by dying while preventing starvation loops.
  • Progressive Respawn Debuffs: Optional configurable status effects with consecutive-death duration scaling, persisted in player NBT.
  • Respawn Actionbar Summary: Displays a concise one-line summary of actual death costs on respawn (suppressed when no penalty occurred).
  • In-Game Config Screen & 4 Languages: Native zero-dependency KeepButPenaltyConfigScreen accessible via Mod Menu (Fabric) or the Mods screen (Forge / NeoForge), with full English, 简体中文, 繁體中文, and 日本語 localization.

Configuration

Stored at config/keep_but_penalty.toml (edits saved in-game take effect immediately). Legacy config/keep_but_penalty-common.toml files from 1.x are automatically migrated on first startup without data loss.

[death]
keepInventory = true
enableExperiencePenalty = true
experienceKeepRatio = 0.75
preserveHungerOnDeath = true
minRespawnFoodLevel = 6
skipOnPvp = false
respawnDebuffs = []
respawnDebuffDurationsSecondsByDeath = []
respawnDebuffStreakResetSeconds = 600
showRespawnSummary = true

[durability]
enableDurabilityPenalty = true
penaltyMode = "PERCENT_MAX"
durabilityPercent = 0.1
durabilityFlat = 80
allowBreak = false
damageArmor = true
damageMainHand = true
damageOffHand = true
damageCurios = true
damageTrinkets = true
damageAccessories = true
excludedItems = ["#keep_but_penalty:excluded", "#tconstruct:modifiable", "#tetra:modular_items", "#slashblade:swords"]

Supported Versions & Loaders

Zero external library dependencies—single self-contained JAR per target:

Minecraft Loaders Optional Accessory Compat
1.20.1 Fabric, Forge Curios, Trinkets, Accessories
1.21.1 Fabric, NeoForge Curios, Trinkets, Accessories
26.1.2 Fabric, NeoForge Curios, Trinkets, Accessories
26.2 Fabric, NeoForge Curios, Trinkets, Accessories

Download

Project description from Modrinth.

Pick your setup

Keep But Penalty by Minecraft version and loader

Choose the version and loader you play, then open the matching release.

8 available setups

Check the dependencies, then try the file in a copied instance before changing a world you care about.

Recent files

Keep But Penalty versions and loaders

2 of 8 releases match
Clear filters

Looking for an older file? The official Modrinth project page is in Resources.