Repository navigation
1.21.1 calculations
What the game does with the numbers in your files, so you can work backwards from the result you want. Formulas are Minecraft 1.21.1's, plus the few places where Custom Gear adds its own. For vanilla values to compare against, see the reference tables in Blocks, Tools, Weapons, Armor Sets and Food.
destroy_time is hardness, not seconds. The time depends on what you hold
and on whether the block drops with it:
seconds = destroy_time × 1.5 / speed when the block drops with what you hold
seconds = destroy_time × 5 / speed when it does not
-
speed is 1 by hand or with the wrong kind of tool. With the kind named in
the block's
required_tool, it is that tool'smining_speed, even when its tier is too low. -
Whether it drops comes from
harvest_level. At 0 the block drops with anything, hand included. At 1 or more it only drops with the right tool of a high enough tier; anything else uses the slower formula and drops nothing.
Example, destroy_time 20:
| Held |
harvest_level 0, required_tool shovel |
harvest_level 2, required_tool pickaxe |
|---|---|---|
| Hand | 30 s, drops | 100 s, drops nothing |
| Stone tool (4.0) | 7.5 s, drops | 25 s, drops nothing (tier too low) |
| Iron tool (6.0) | 5 s, drops | 5 s, drops |
| Diamond tool (8.0) | 3.75 s, drops | 3.75 s, drops |
To aim for a time by hand on a block that drops by hand, use
destroy_time = seconds / 1.5: 20 seconds is 13.3.
Things that change speed:
- Efficiency adds level² + 1 (Efficiency V: +26), only with the right tool.
- Haste multiplies it by 1 + 0.2 × level.
- Mining Fatigue multiplies it by 0.3 per level (level II: 0.09).
- Underwater (without Aqua Affinity) or not standing on the ground: × 0.2 each.
destroy_time 0 breaks instantly; -1 never breaks.
What the tooltip shows, for swords and tools:
damage = attack_damage × damage_multiplier + attack_damage_bonus
test_dagger: 4 × 1.5 + 1 = 7. On top of that, at hit time:
- Sharpness adds 1 at level I and 0.5 per level after that.
- Strength adds 3 per level; Weakness takes 4.
- A critical hit (falling, not sprinting) multiplies the total by 1.5.
attack_speed is full-strength hits per second. After a swing the weapon needs
1 / attack_speed seconds to recharge: 1.6 (a sword) is 0.625 s, 2.4 is
0.42 s. Hitting before it recharges scales the damage by 0.2 + 0.8 × p², where
p is how far it recharged — a hit at half charge does 40%.
The most damage per second a weapon deals is damage × attack_speed: the dagger
above does 7 × 2.4 = 16.8, a vanilla diamond sword 7 × 1.6 = 11.2.
An arrow carries a base damage, 2.0 in vanilla, and hits for its speed times that base, rounded up. A fully drawn bow shoots at speed 3.0, so 3 × 2 = 6. A fully drawn shot is a critical one and adds a random 0 to half its damage + 1. A crossbow always shoots at full power, at speed 3.15.
Custom Gear rewrites the base of every arrow its bows and crossbows fire:
base = 2.0 × (arrow_damage / 9) × arrow_damage_multiplier + arrow_damage_bonus
When arrow_damage is 0 (or left out), the arrow_damage / 9 part is 1. So:
-
arrow_damageis not the hit damage. 9 is vanilla's; 18 doubles it. -
arrow_damage_bonusis multiplied by the arrow's speed like the rest of the base: a bonus of 1 adds about 3 to a full bow shot.
Example: arrow_damage 12 and multiplier 1.5 give a base of 2 × 12/9 × 1.5 =
4, and a full bow shot of 3 × 4 = 12.
Each piece adds its defense, toughness and knockback_resistance to the
wearer's totals. A hit is then reduced in this order:
-
Custom Gear resistances (
damage_resistances,attacker_resistances,conditional_resistances) take their percentage off the raw damage. See Damage Resistances. -
Armor:
effective = clamp(defense − damage / (2 + toughness / 4), defense / 5, 20) damage after armor = damage × (1 − effective / 25)At most 80% off. Toughness matters against big hits: it keeps armor from losing effect as the damage grows. A full diamond set (20 defense, 8 toughness) takes a 10-damage hit down to 3.
-
The Resistance effect: 20% per level.
-
Protection enchantments: 4% per level across all pieces, at most 80%.
Armor does nothing against damage that bypasses it — falling, drowning, starving, poison, magic and the like. Resistances in step 1 still do, if you give them for those damage types.
knockback_resistance adds up across pieces; 1.0 means no knockback at all. A
netherite set has 0.4.
- A tool loses 1 per block it breaks (blocks that break instantly cost nothing) and 2 per hit when used as a weapon.
- A sword loses 1 per hit and 2 per block it breaks.
- An armor piece loses 1 for every 4 damage of a hit it took part in, rounded down, but at least 1.
- A bow or crossbow loses 1 per shot.
- Unbreaking makes a tool last about (level + 1) times longer; on armor it helps less.
hunger restored = nutrition
saturation restored = nutrition × saturation × 2 (never above your hunger level)
Bread (5, 0.6) gives 5 hunger and 6 saturation. Hunger and saturation both cap at 20.
Eating takes eat_duration seconds. Left out (-1), it is 1.6 s, or 0.8 s with
fast_food. 0 is instant. Each of on_eat_effects rolls its own
probability.
spread_distance is how many blocks a fluid covers on flat ground in a
straight line, counting its source: water is 8, lava 4. Any value from 2 to 32
is exact. Spreading in every direction, one source fills a diamond of
2R² + 2R + 1 blocks, where R = spread_distance − 1: 113 for 8, 481 for 16,
1985 for 32. Every one of them updates while it flows, which is why the log
warns past 16.
Falling down a ledge gives the fluid its full reach again from where it lands. Taking the source away makes the whole fluid recede.
flow_delay is the seconds between each step outwards. Water (0.25) takes
7 × 0.25 ≈ 1.75 s to reach its edge; lava (1.5) takes 3 × 1.5 = 4.5 s.
Minecraft 1.21.1
English
Content
Systems
- Textures & Models
- Recipes
- Recipe Examples
- Tags
- Mob Drops
- Damage Resistances
- How Values Are Calculated
Servers
Reference
Español
Contenido
Sistemas
- Texturas y modelos
- Recetas
- Ejemplos de recetas
- Tags
- Drops de mobs
- Resistencias de daño
- Cómo se calculan los valores
Servidores
Referencia