Download Progressive Mechanics Library — Minecraft Mods — MetaMods

Progressive Mechanics Library

Active

Downloads

1

Last update

6 months ago

Versions

1.20.1 — 1.20.3
Server
Forge
Libraries
Addons

Progressive Damage Mechanics in Minecraft

This library modification provides developers with advanced control over the damage system and combat mechanics in the game.

Core Features

The mod introduces changes to the standard damage system:

  • Critical strikes are now marked with special damage type pml:player_critical
  • Sweeping attacks receive identifier pml:sweeping_damage
  • Standard methods for detecting critical and sweeping attacks are replaced with more reliable ones

For Mod Developers

The DamageControl system enables deep customization of damage calculations through various modifiers before damage is directly applied.

Working Mechanism

The calculation process includes several stages:

  • Initial damage is adjusted based on weapon characteristics
  • Base bonuses are applied (fixed and percentage-based)
  • Additional bonuses are added
  • Reductions from armor, enchantments, and special effects are subtracted
  • The final value becomes available for adjustment through LivingDamageEvent

Modifier Types

Damage Increase:

  • baseFlatBonus - fixed addition before percentage multipliers
  • basePercentBonus - percentage increase before main calculations
  • flatBonus - additional fixed addition
  • percentBonus - percentage bonus after basic computations

Damage Reduction:

  • weapondamagecontrol - weapon-based scaling
  • armorReduction - reduction from armor
  • enchReduction - protection from enchantments
  • specialReduction - direct reduction of final damage

Key Methods

Armor System:

  • getArmorReduction() returns the amount of damage reduction from armor
  • Use setArmorReduction(float value) to set values

Enchantment Protection:

  • getEnchantmentReduction() shows reduction from defensive enchantments
  • Useful for balancing effects and displaying in tooltips

Special Protection:

  • getSpecialReduction() provides direct damage reduction
  • Requires careful use as it can completely block damage

First Aid Compatibility

The system is integrated with the First Aid modification for precise identification of damaged player body parts in damage events.

getDamagedBodyPart(Player player) returns the equipment slot corresponding to the damaged area of the target.

Project members
A_teapot_orbiting_the_sun

A_teapot_orbiting_the_sun

Developer

Kettle5000

Kettle5000

Created: 9 Apr 2025

ID: 85726