Better Trims provides many built-in abilities of varying types.
Count Based Values
A lot of the abilities use "count-based values". These are values that scale based on the number of matching trims the player is wearing.
See Count Based Values for more information.
Ability Types
Value Abilities
Abilities that modify the numerical value of a specific ability component. I.e. Incoming Damage, Trade Offer Costs, etc.
Add Value
{
"type":"bettertrims:add",
"value":<count-based-value>
}
Multiply Value
{
"type":"bettertrims:multiply",
"value":<count-based-value>
}
Set Value
{
"type":"bettertrims:set",
"value":<count-based-value>
}
Remove Binomial
Chance to subtract the value provided by the component by 1, based on a binomial distribution.
{
"type":"bettertrims:remove_binomial",
"chance":<count-based-value>
}
All Of
Combines multiple value abilities together. The abilities are applied in the order they are listed and the result of one ability is passed to the next.
{
"type":"bettertrims:all_of",
"abilities": [
{
"type":"<value_ability_type>",
// Ability specific fields here
},
{
"type":"<value_ability_type>",
// Ability specific fields here
}
]
}
Event Abilities
Abilities that trigger on specific events, such as after attacking, when the game ticks, when hitting a block, etc.
Apply Status Effect
{
"type":"bettertrims:apply_mob_effect",
"effect":"<namespace>:<effect_id>",
"duration":<count-based-value>,
"amplifier":<count-based-value>
}
Field
Type
Required
Description
effect
string
Yes
The ID of the status effect to apply (see Status Effect).
duration
count-based-value
Yes
The duration of the effect in seconds.
amplifier
count-based-value
Yes
The amplifier level of the effect (0 for level 1, 1 for level 2, etc.).
Change Item Damage
{
"type":"bettertrims:change_item_damage",
"amount":<count-based-value>
}
Field
Type
Required
Description
amount
count-based-value
Yes
The amount to change the item's damage by (negative to repair).
Damage Entity
Deals between min_damage and max_damage damage of damage_type to the entity in context.
Whether the explosion should be attributed to the wearer. Defaults to false.
damage_type
string
No
The type of damage to deal (see Damage Type). If not provided, the explosion will not deal damage.
knockback_multiplier
count-based-value
No
The multiplier for knockback applied by the explosion. Defaults to 1.0.
immune_blocks
string
No
A tag of blocks that the explosion will not destroy regardless of the explosion's strength.
offset
vector
No
The offset from the context position to create the explosion at. Defaults to (0, 0, 0).
radius
count-based-value
Yes
The radius of the explosion.
create_fire
boolean
No
Whether the explosion should create fire. Defaults to false.
block_interaction
string
Yes
How the explosion should interact with blocks. One of none (no effect), block (like a bed explosion), mob (like a creeper explosion), tnt (like tnt explosion), trigger (like a wind-charge explosion).
small_particle
string
Yes
The small particles in the explosion effect (see Particles).
large_particle
string
Yes
The large particles in the explosion effect (see Particles).
sound
string
Yes
The sound to play when the explosion occurs.
Ignite
{
"type":"bettertrims:ignite",
"duration":<count-based-value>
}
Field
Type
Required
Description
duration
count-based-value
Yes
The duration to set the entity on fire for, in seconds.
The ID of the status effect to apply (see Status Effect).
amplifier
count-based-value
Yes
The amplifier level of the effect (0 for level 1, 1 for level 2, etc.).
visible
boolean
No
Whether the effect should be visible on the player (particles and icon). Defaults to true.
Warning
Based on the nature of status effects, when unequipping the property any pre-existing effects of the same type will also be removed.
All Of
Combines multiple toggle abilities together. The abilities are applied in the order they are listed.
{
"type":"bettertrims:all_of",
"abilities": [
{
"type":"<toggle_ability_type>",
// Ability specific fields here
},
{
"type":"<toggle_ability_type>",
// Ability specific fields here
}
]
}
Flag Abilities
Abilities that toggle a boolean flag, such as Damage Immunity or Piglin Safety do not require any additional parameters.
Flag abilities are simply defined by the component type: