{"id":125401,"date":"2026-06-07T11:49:25","date_gmt":"2026-06-07T08:49:25","guid":{"rendered":"https:\/\/vpesports.com\/minecraft\/mods\/progressive-mechanics-library\/"},"modified":"2026-06-07T11:49:25","modified_gmt":"2026-06-07T08:49:25","slug":"progressive-mechanics-library","status":"publish","type":"mod","link":"https:\/\/vpesports.com\/minecraft\/mods\/progressive-mechanics-library\/","title":{"rendered":"Progressive Mechanics Library"},"content":{"rendered":"<p>This is a library mod aimed to allow my mods and other mods have great control over damage and some combat mechanics<br \/>\nBy default this mod does this<br \/>\nModifies damage type done when landing a critical strike, allowing mods to easily track down if an attack is a critical hit. Damage type is &#8220;pml:player_critical&#8221;<br \/>\nModifies damage type done when dealing a sweeping attack. Damage type is &#8220;pml:sweeping_damage&#8221;.<\/p>\n<p>For Mod developers<br \/>\nIt adds a new way to register and add damage bonuses and reductions alongside making this work with First Aid Mod to allow control over damaged bodyparts<\/p>\n<p>The DamageControl class is a core component. It provides a structured way to modify, control, and calculate damage values before they are applied in the game.<\/p>\n<p>This system allows for multiple modifiers, including flat bonuses, percentage-based bonuses, and reductions from armor, enchantments, and special mechanics.<\/p>\n<p>\ud83d\udd27 How It Works:<br \/>\nThe system starts with raw base damage.<\/p>\n<p>It applies weapon-specific scaling (reducing damage before further calculations).<\/p>\n<p>Base bonuses are applied first (flat and percentage-based).<\/p>\n<p>Additional bonuses are applied next (flat and percentage-based).<\/p>\n<p>The system calculates reductions (armor, enchantments, special reductions).<\/p>\n<p>The final damage is stored and can be retrieved or modified in LivingDamageEvent.<\/p>\n<p>\ud83d\udcca Breakdown of Variables:<br \/>\n\ud83d\udee0\ufe0f Modifiers for Increasing Damage<br \/>\nVariable\tDescription<br \/>\nbaseFlatBonus\tFlat bonus added before percentage multipliers (e.g., +10 damage).<br \/>\nbasePercentBonus\tPercentage-based increase applied before other calculations (e.g., 1.2 multiplier).<br \/>\nflatBonus\tFlat bonus added after base bonuses (e.g., +5 damage).<br \/>\npercentBonus\tPercentage-based increase applied after base calculations.<br \/>\n\ud83d\udee1\ufe0f Modifiers for Reducing Damage<br \/>\nVariable\tDescription<br \/>\nweapondamagecontrol\tControls weapon-based scaling before all calculations.<br \/>\narmorReduction\tDamage reduced due to armor (handled separately).<br \/>\nenchReduction\tDamage reduced due to enchantments (handled separately).<br \/>\nspecialReduction\tDirectly reduces final damage, so it must be used carefully.<br \/>\n\ud83d\udccc Original Values for Reference<\/p>\n<p>Variable\tDescription<br \/>\noriginalDamage\tStores the final damage after all calculations, ready for LivingDamageEvent.<br \/>\noriginalAbsorption\tStores the absorption value before modifications.<\/p>\n<p>\ud83d\udee0\ufe0f Key Methods<br \/>\n\u2714\ufe0f Adding Bonuses<br \/>\n\ud83d\udee1\ufe0f getArmorReduction()<br \/>\n\u2705 Returns: The amount of damage reduction due to armor.<br \/>\n\ud83d\udca1 Usage: This value is set by setArmorReduction(float value) and represents the amount of damage blocked by armor-based mechanics(e.g., vanilla armor calculations or custom armor effects from other mods).<br \/>\n\ud83d\udd2e getEnchantmentReduction()<br \/>\n\u2705 Returns: The amount of damage reduction caused by enchantments.<br \/>\n\ud83d\udca1 Usage: This tracks how much defensive enchantments (such as Protection or custom enchantments) reduce the final damage. Mods can use this to balance enchantment effects or display them in tooltips.<br \/>\n\u26a0\ufe0f getSpecialReduction()<br \/>\n\u2705 Returns: The amount of direct damage reduction applied through special mechanics.<br \/>\n\ud83d\udca1 Usage: This is the most powerful form of damage reduction, as it is subtracted at the very end of the damage calculation. Mods should use this carefully because it can completely negate damage if too high.<\/p>\n<p>\ud83d\udccc First Aid Mod Compatibility System<br \/>\nThis system integrates with the First Aid mod, which modifies how damage is handled by introducing body-part-specific injuries. The following code helps track which body part was damaged when using the First Aid mod and ensures compatibility with the DamageControl system.<\/p>\n<p>\ud83d\udee0\ufe0f Key Methods<br \/>\n\ud83d\udd0d getDamagedBodyPart(Player player)<\/p>\n<p>\u2705 Purpose: Retrieves the body part that was damaged. Returns a EquipmentSlot var corresponding to the bodypart damaged.<br \/>\n\ud83d\udca1 Usage:<\/p>\n<p>This method should only be used during LivingDamageEvent and when First Aid is present.<\/p>\n<p>If the player isn&#8217;t mapped, it returns null.<\/p>\n<p>One example of use is inside the mod Just a lot more Enchantments.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Library mod for my mods and other people who which to have great control over damage mechanics in the game<br \/>\nCan work with First Aid Mod<\/p>\n","protected":false},"featured_media":125402,"template":"","meta":{"_minecraft_slug":"progressive-mechanics-library","_minecraft_project_id":"bFe2rvv4","_minecraft_author":"A_teapot_orbiting_the_sun","_minecraft_license":"LicenseRef-All-Rights-Reserved","_minecraft_downloads":120901,"_minecraft_follows":2,"_minecraft_client_side":"required","_minecraft_server_side":"required","_minecraft_storage_type":"zip","_minecraft_archive_name":"progressive-mechanics-library.zip","_minecraft_size_bytes":790231,"_minecraft_version_count":4,"_minecraft_updated_at":"2026-05-16T23:17:27.733515Z","_minecraft_date_created":"2025-04-09T09:00:17.090033Z","_minecraft_date_modified":"2026-04-06T13:08:58.439574Z","_minecraft_project_url":"https:\/\/modrinth.com\/mod\/progressive-mechanics-library","_minecraft_icon_attachment_id":125402,"_minecraft_imported_at":"2026-06-07T08:49:26+00:00","_minecraft_import_hash":"820566df4bf44356d5fecb8a955613fe","_minecraft_versions":"","_minecraft_links":"","_minecraft_gallery":"","_minecraft_api_metadata":""},"mod_category":[104,89,873,92],"mod_loader":[106],"minecraft_version":[36,60,93],"class_list":["post-125401","mod","type-mod","status-publish","has-post-thumbnail","hentry","mod_category-forge","mod_category-game-mechanics","mod_category-library","mod_category-utility","mod_loader-forge","minecraft_version-1-20-1","minecraft_version-1-20-2","minecraft_version-1-20-3"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Progressive Mechanics Library - Minecraft<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/vpesports.com\/minecraft\/mods\/progressive-mechanics-library\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Progressive Mechanics Library - Minecraft\" \/>\n<meta property=\"og:description\" content=\"Library mod for my mods and other people who which to have great control over damage mechanics in the game Can work with First Aid Mod\" \/>\n<meta property=\"og:url\" content=\"https:\/\/vpesports.com\/minecraft\/mods\/progressive-mechanics-library\/\" \/>\n<meta property=\"og:site_name\" content=\"Minecraft\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/progressive-mechanics-library\\\/\",\"url\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/progressive-mechanics-library\\\/\",\"name\":\"Progressive Mechanics Library - Minecraft\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/progressive-mechanics-library\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/progressive-mechanics-library\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/wp-content\\\/uploads\\\/2026\\\/06\\\/progressive-mechanics-library-icon-cb236a6462c3e5940191c3fd3d04204a69929c80_96.webp\",\"datePublished\":\"2026-06-07T08:49:25+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/progressive-mechanics-library\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/progressive-mechanics-library\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/progressive-mechanics-library\\\/#primaryimage\",\"url\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/wp-content\\\/uploads\\\/2026\\\/06\\\/progressive-mechanics-library-icon-cb236a6462c3e5940191c3fd3d04204a69929c80_96.webp\",\"contentUrl\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/wp-content\\\/uploads\\\/2026\\\/06\\\/progressive-mechanics-library-icon-cb236a6462c3e5940191c3fd3d04204a69929c80_96.webp\",\"width\":96,\"height\":96},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/progressive-mechanics-library\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Mods\",\"item\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Progressive Mechanics Library\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/#website\",\"url\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/\",\"name\":\"Minecraft\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Progressive Mechanics Library - Minecraft","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/vpesports.com\/minecraft\/mods\/progressive-mechanics-library\/","og_locale":"en_US","og_type":"article","og_title":"Progressive Mechanics Library - Minecraft","og_description":"Library mod for my mods and other people who which to have great control over damage mechanics in the game Can work with First Aid Mod","og_url":"https:\/\/vpesports.com\/minecraft\/mods\/progressive-mechanics-library\/","og_site_name":"Minecraft","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/vpesports.com\/minecraft\/mods\/progressive-mechanics-library\/","url":"https:\/\/vpesports.com\/minecraft\/mods\/progressive-mechanics-library\/","name":"Progressive Mechanics Library - Minecraft","isPartOf":{"@id":"https:\/\/vpesports.com\/minecraft\/#website"},"primaryImageOfPage":{"@id":"https:\/\/vpesports.com\/minecraft\/mods\/progressive-mechanics-library\/#primaryimage"},"image":{"@id":"https:\/\/vpesports.com\/minecraft\/mods\/progressive-mechanics-library\/#primaryimage"},"thumbnailUrl":"https:\/\/vpesports.com\/minecraft\/wp-content\/uploads\/2026\/06\/progressive-mechanics-library-icon-cb236a6462c3e5940191c3fd3d04204a69929c80_96.webp","datePublished":"2026-06-07T08:49:25+00:00","breadcrumb":{"@id":"https:\/\/vpesports.com\/minecraft\/mods\/progressive-mechanics-library\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/vpesports.com\/minecraft\/mods\/progressive-mechanics-library\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/vpesports.com\/minecraft\/mods\/progressive-mechanics-library\/#primaryimage","url":"https:\/\/vpesports.com\/minecraft\/wp-content\/uploads\/2026\/06\/progressive-mechanics-library-icon-cb236a6462c3e5940191c3fd3d04204a69929c80_96.webp","contentUrl":"https:\/\/vpesports.com\/minecraft\/wp-content\/uploads\/2026\/06\/progressive-mechanics-library-icon-cb236a6462c3e5940191c3fd3d04204a69929c80_96.webp","width":96,"height":96},{"@type":"BreadcrumbList","@id":"https:\/\/vpesports.com\/minecraft\/mods\/progressive-mechanics-library\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/vpesports.com\/minecraft\/"},{"@type":"ListItem","position":2,"name":"Mods","item":"https:\/\/vpesports.com\/minecraft\/mods\/"},{"@type":"ListItem","position":3,"name":"Progressive Mechanics Library"}]},{"@type":"WebSite","@id":"https:\/\/vpesports.com\/minecraft\/#website","url":"https:\/\/vpesports.com\/minecraft\/","name":"Minecraft","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/vpesports.com\/minecraft\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/vpesports.com\/minecraft\/wp-json\/wp\/v2\/mod\/125401","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/vpesports.com\/minecraft\/wp-json\/wp\/v2\/mod"}],"about":[{"href":"https:\/\/vpesports.com\/minecraft\/wp-json\/wp\/v2\/types\/mod"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/vpesports.com\/minecraft\/wp-json\/wp\/v2\/media\/125402"}],"wp:attachment":[{"href":"https:\/\/vpesports.com\/minecraft\/wp-json\/wp\/v2\/media?parent=125401"}],"wp:term":[{"taxonomy":"mod_category","embeddable":true,"href":"https:\/\/vpesports.com\/minecraft\/wp-json\/wp\/v2\/mod_category?post=125401"},{"taxonomy":"mod_loader","embeddable":true,"href":"https:\/\/vpesports.com\/minecraft\/wp-json\/wp\/v2\/mod_loader?post=125401"},{"taxonomy":"minecraft_version","embeddable":true,"href":"https:\/\/vpesports.com\/minecraft\/wp-json\/wp\/v2\/minecraft_version?post=125401"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}