Skip to content

Configuration (common.json)

The configuration file is located at:

config/stylizeddamage/common.json

If the file does not exist, the mod will automatically generate a default config on first load.

Selectors

Selectors determine which style is used for each damage event. Three-layer matching:

LayerMatch Type
1Damage value range (optional)
2Target entity type/team (optional)
3Damage type match array

Range Key Format

FormatMeaning
"common"Default fallback
"[min,max]"Closed interval
"[min,...]"Min and above
"[...,max]"Max and below

Branch Paths

BranchCondition
player.yourTeamTarget is player on your team
player.otherTeamTarget is player on different team
player.commonTarget is player with no team info
mob.hostileTarget is hostile mob
mob.passiveTarget is passive mob
mob.commonTarget is mob with unknown hostility
commonFallback

Match Array

  • Conditions are OR-ed together
  • Supports damage type IDs: "minecraft:in_fire"
  • Supports tags: "#minecraft:bypasses_armor", "#minecraft:is_fire" (auto-expanded at startup)
  • Supports pseudo types: "heal", "absorption", "kill"
  • Supports critical hits: "critical"
  • Wildcard: "*" matches all real damage types, but not pseudo types (heal, absorption, kill). Pseudo types must be matched by explicit rules; omitting a pseudo type's rule suppresses that pseudo type's popup entirely

Display Filter

Controls which damage events show numbers.

OptionTypeDefaultDescription
modestring"byTarget"Judgment mode: "bySource" or "byTarget"
hideSelfDamagebooleantrueHide self-damage

Display Opacity

Controls damage number opacity based on the damage source.

json
"displayOpacity": {
    "player": 1.0,
    "mobHostile": 0.5,
    "mobPassive": 0.75,
    "other": 1.0
}
OptionTypeDefaultDescription
playerfloat1.0Opacity for player-caused damage
mobHostilefloat0.5Opacity for hostile mob damage
mobPassivefloat0.75Opacity for passive mob damage
otherfloat1.0Opacity for other sources

This multiplies on top of the animation opacity. E.g. animation opacity 0.8 × mobHostile 0.5 = final alpha 0.4.

Display Settings

OptionTypeDefaultDescription
minDamageDisplayfloat0.1Minimum damage to show a number
maxActiveNumbersint999Max concurrent floating numbers
showHealingbooleantrueShow healing numbers
showAbsorptionbooleantrueShow absorption numbers
hideFullHealthHealbooleantrueHide healing numbers when entity is at full HP
killOnlyOnMobDeathbooleanfalseOnly show "kill" text on fatal hits (suppress damage number)
killOnlyFullHealthbooleanfalseWhen killOnlyOnMobDeath is enabled, only apply to one-shot kills (full-HP targets)
displayScopestring"all"Which damage numbers to show: all (everything) / selfDealt (own damage only) / selfRelated (own damage + damage taken)
hideBehindWallbooleanfalseHide numbers when fully solid opaque blocks block the line between camera and trigger point (glass, leaves etc. do not count)

displayScope and hideBehindWall are disabled by default and do not change existing behavior.

Number Abbreviation

Abbreviates large damage values, e.g. 1200 → 1.2k, 1500000 → 1.5M.

json
"numberAbbreviation": {
    "enabled": false,
    "threshold": 1000.0,
    "suffixes": ["k", "M", "B", "T"],
    "decimalPlaces": 1
}
OptionTypeDefaultDescription
enabledbooleanfalseEnable abbreviation (disabled by default)
thresholdfloat1000.0Values below this are never abbreviated
suffixesstring array["k","M","B","T"]Suffixes per 1000× step, ascending
decimalPlacesint1Decimal places kept after abbreviation (e.g. 1.2k, 1.23k)
  • Integer results drop decimals (2000 → 2k); non-integers keep decimalPlaces digits
  • Applies to both floating numbers and the total-damage panel

Distance Scale

The current configuration uses a nested object:

json
"distanceScale": {
  "segment": 10.0,
  "factor": 0.2,
  "min": 0.3,
  "maxDisplayDistance": 64.0
}
OptionTypeDefaultDescription
segmentfloat10.0Distance segment (blocks)
factorfloat0.2Scale factor per segment
minfloat0.3Minimum scale multiplier
maxDisplayDistancefloat64.0Maximum display distance (blocks)

Legacy flat fields distanceScaleSegment / distanceScaleFactor / distanceScaleMin / maxDisplayDistance are still accepted for compatibility, but the nested format above is the recommended/current generated form.

Total Damage Panel

OptionTypeDefaultDescription
enabledbooleantrueEnable total damage panel
resetTimeoutint100Reset delay in ticks (20 ticks = 1 second)
maxTrailCountint20Max trail entries
baseFontSizefloat2.0Base font size multiplier
sizeOffsetPerThousandfloat0.5Font size increment per 100 damage
sizeOffsetMaxfloat3.0Max font size multiplier
positionXfloat-0.15Horizontal offset as fraction of window width (negative = left)
positionYfloat0.15Vertical offset as fraction of window height (positive = down)
enableEntryAnimationbooleantruePlay entry animation on total damage number
enableExitAnimationbooleantruePlay exit animation on total damage number
enableBounceAnimationbooleantrueBounce when total damage value changes
enableTrailEntryAnimationbooleantrueTrail entries slide in from right
enableTrailExitAnimationbooleantrueTrail entries slide out to left
bounceScalePeakfloat1.4Peak scale during bounce (1.4 = 140% size)
labelTextstring"Damage"Label text displayed above the total damage number. Set to "" to hide.

Pseudo Damage Types

IDTriggerNotes
healEntity healedRequires showHealing: true
absorptionAbsorption increasedRequires showAbsorption: true
killFatal damageNot counted in total damage / trail. Always rendered on top. Uses matched style's killText field instead of damage value.

Reload

bash
/stylizeddamage reload

Released under the MIT License