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: "*"

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.

Distance Scale

OptionTypeDefaultDescription
distanceScaleSegmentfloat10.0Distance segment (blocks)
distanceScaleFactorfloat0.2Scale factor per segment
distanceScaleMinfloat0.3Minimum scale multiplier
maxDisplayDistancefloat64.0Maximum display distance (blocks)

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