▶️ ЗАБЕРИ СВОИ 8 ПОДАРКОВ 🎁 ПРИ СОЗДАНИИ СВОЕГО МАЙНКРАФТ СЕРВЕРА
Моды/Mebahel's RPG - Resistance & Weakness
Mebahel's RPG - Resistance & Weakness

Mebahel's RPG - Resistance & Weakness

A lightweight and highly configurable combat framework that transforms Minecraft into a tactical experience by adding comprehensive physical (Slash, Pierce, Blunt) and elemental resistance and weakness systems to every mob.

8
1

In this video, you can see hit markers of different colours depending on weapon efficiency. There is also a red or green hit marker at the right of the crossair depending on element efficiency.

Mebahel RPG Resistance & Weakness

Mebahel RPG Resistance & Weakness is a lightweight combat API and balancing framework for Minecraft that includes out-of-the-box support for vanilla mobs as well as creatures from Mebahel's Creatures - Draugr Invasion and Dwarven Automatons, requiring no initial configuration. It adds configurable damage multipliers based on both physical weapon types and elemental damage types, allowing entities to react uniquely to swords, arrows, maces, fire, frost, or any custom element added by other mods.

The goal is simple: make combat feel more readable, more tactical, and easier to balance across vanilla mobs, modded mobs, and large RPG-style modpacks.


Dependencies

Forge / NeoForge

Fabric


Core Features

  • Physical damage categories: Slash, Pierce, and Blunt
  • Elemental damage categories: Fire and Frost
  • Extensible custom elements, such as Holy, Poison, Arcane, Lightning, or any custom element a modder wants to register
  • Fully configurable entity multipliers through entities.json
  • Datapack support for preset balancing
  • Datapacks can automatically add missing entries to the config without overwriting player edits
  • Optional hitmarker feedback for physical and elemental effectiveness
  • Colorblind-friendly hitmarker mode
  • Safe support for entity IDs from mods that are not currently installed

Damage Types

The default system separates damage into two layers.

LayerTypesPurpose
PhysicalSlash, Pierce, BluntRepresents the weapon or attack shape
ElementalFire, FrostRepresents magical or elemental properties

Both layers can apply at the same time.

For example, a frost arrow may be detected as:

LayerDetected Type
PhysicalPierce
ElementalFrost

The final damage is calculated as:

finalDamage = baseDamage × physicalMultiplier × elementalMultiplier


Multiplier Rules

MultiplierMeaning
1.0Neutral damage
> 1.0Weakness, increased damage
< 1.0Resistance, reduced damage
0.0Full immunity

Recommended balancing range for most mobs is between 0.75 and 1.25.


Default Vanilla Balance Overview

The default preset is designed to keep vanilla combat familiar while adding meaningful RPG-style advantages.

EntitySlashPierceBluntFireFrost
minecraft:zombie1.00.91.11.250.9
minecraft:husk1.00.91.11.20.95
minecraft:drowned1.00.91.11.11.0
minecraft:zombie_villager1.00.91.11.250.9
minecraft:skeleton1.00.951.151.10.9
minecraft:stray1.00.951.151.150.85
minecraft:wither_skeleton1.00.951.10.851.1
minecraft:creeper1.01.050.91.10.95
minecraft:spider1.10.950.951.20.9
minecraft:cave_spider1.10.950.951.20.9
minecraft:witch1.01.01.01.10.95
minecraft:pillager1.01.01.01.01.0
minecraft:vindicator1.01.01.051.01.0
minecraft:evoker1.01.01.01.10.95
minecraft:vex1.051.051.01.10.95
minecraft:ravager0.950.91.11.050.95
minecraft:guardian0.951.01.051.150.9
minecraft:elder_guardian0.951.01.11.150.9
minecraft:slime1.01.01.11.01.0
minecraft:silverfish1.01.01.11.01.0
minecraft:endermite1.051.00.951.10.95
minecraft:enderman1.01.00.951.150.9
minecraft:shulker0.90.91.151.01.0
minecraft:ender_dragon1.00.951.050.91.05
minecraft:blaze1.01.01.00.751.25
minecraft:magma_cube1.01.01.050.81.2
minecraft:ghast1.01.050.950.91.1
minecraft:piglin1.01.01.01.050.95
minecraft:piglin_brute1.01.01.051.050.95
minecraft:zombified_piglin1.00.91.10.850.95
minecraft:hoglin1.00.951.11.01.05
minecraft:zoglin1.00.951.10.851.05
minecraft:wither1.00.951.00.91.05
minecraft:warden1.00.951.050.950.95
minecraft:phantom1.01.11.01.10.95

Built-In Mebahel Presets

The base config can also include presets for Mebahel ecosystem mobs. These entries are safe even if the related mods are not installed, because they are stored as entity ID strings.

Dwarven Automatons

EntitySlashPierceBluntFireFrost
mebahelcreaturesdwarven:dwarven_sphere0.80.81.41.01.0
mebahelcreaturesdwarven:dwarven_centurion0.80.81.41.01.0
mebahelcreaturesdwarven:dwarven_spider0.80.81.41.01.0
mebahelcreaturesdwarven:dwarven_spider_guardian0.80.81.41.01.0

Dwarven automatons are metal constructs. They resist slashing and piercing damage, but are vulnerable to blunt impact.

Draugr Invasion

EntitySlashPierceBluntFireFrost
mebahelcreaturesdraugr:draugr1.150.90.91.20.85
mebahelcreaturesdraugr:draugr_archer1.150.90.91.20.85
mebahelcreaturesdraugr:draugr_wight1.150.90.91.20.85
mebahelcreaturesdraugr:draugr_scourge1.20.850.851.150.8
mebahelcreaturesdraugr:draugr_overlord1.20.850.851.150.8
mebahelcreaturesdraugr:skeleton_warrior1.10.90.91.150.9
mebahelcreaturesdraugr:skeleton_warrior_head1.10.90.91.150.9
mebahelcreaturesdraugr:infernal_draugr1.150.90.90.751.25
mebahelcreaturesdraugr:flame_atronach1.01.01.00.751.25

Draugr are ancient undead warriors. They are weak to slashing damage and fire, but resist piercing, blunt impact, and frost.


Configuration Files

The mod creates its configuration in:

config/mebahel-rpg_resistance-weakness/

FilePurpose
config.jsonDamage detection, keywords, priorities, and client feedback options
entities.jsonEntity-specific resistance and weakness multipliers

Entity Configuration

entities.json controls the actual damage multipliers for each mob.

Example:

{
  "entities": {
    "minecraft:zombie": {
      "mebahelrpgresistanceweakness:slash": 1.0,
      "mebahelrpgresistanceweakness:pierce": 0.9,
      "mebahelrpgresistanceweakness:blunt": 1.1,
      "mebahelrpgresistanceweakness:fire": 1.25,
      "mebahelrpgresistanceweakness:frost": 0.9
    }
  }
}

This means:

Damage TypeMultiplierResult
Slash1.0Neutral
Pierce0.910% reduced damage
Blunt1.110% increased damage
Fire1.2525% increased damage
Frost0.910% reduced damage

Detection Configuration

Damage detection is configured in config.json.

The mod detects damage types using stable IDs and translation keys from weapons, projectiles, and items. This avoids relying on translated display names or custom item names.

Example detection section:

{
  "elementDetection": {
    "physicalPriority": [
      "mebahelrpgresistanceweakness:blunt",
      "mebahelrpgresistanceweakness:pierce",
      "mebahelrpgresistanceweakness:slash"
    ],
    "elementalPriority": [
      "mebahelrpgresistanceweakness:frost",
      "mebahelrpgresistanceweakness:fire"
    ],
    "needles": {
      "mebahelrpgresistanceweakness:slash": [
        "sword",
        "blade",
        "slash",
        "claw",
        "claymore",
        "cutlass",
        "katana",
        "scythe",
        "sickle",
        "dagger",
        "axe",
        "war_axe",
        "halberd"
      ],
      "mebahelrpgresistanceweakness:pierce": [
        "arrow",
        "bow",
        "bolt",
        "trident",
        "spear",
        "lance",
        "javelin",
        "rapier",
        "pierce"
      ],
      "mebahelrpgresistanceweakness:blunt": [
        "mace",
        "hammer",
        "warhammer",
        "club",
        "blunt",
        "anchor",
        "fist",
        "pickaxe",
        "staff",
        "wand"
      ],
      "mebahelrpgresistanceweakness:fire": [
        "fire",
        "flame",
        "burn",
        "lava",
        "inferno"
      ],
      "mebahelrpgresistanceweakness:frost": [
        "frost",
        "ice",
        "freeze",
        "snow",
        "stalhrim"
      ]
    }
  }
}

Physical Priority

physicalPriority decides which physical type wins when a weapon matches multiple keywords.

For example, pickaxe contains axe, but it should be treated as blunt. Placing blunt before slash ensures pickaxes are classified correctly.

Elemental Priority

elementalPriority decides which elemental type wins when a damage source matches multiple elemental keywords.

For example, a custom item containing both fire and frost keywords will use the first matching element in the priority list.


Client Feedback

The mod includes optional hitmarker feedback to show whether an attack was effective or resisted.

Config section:

{
  "clientFeedback": {
    "showPhysicalHitmarker": true,
    "showElementalHitmarker": true,
    "colorblindMode": false
  }
}
OptionDescription
showPhysicalHitmarkerEnables or disables the physical effectiveness hitmarker
showElementalHitmarkerEnables or disables the elemental effectiveness hitmarker
colorblindModeUses blue/orange instead of green/red

Default Colors

ResultNormal ModeColorblind Mode
Effective damageGreenBlue
Resisted damageRedOrange
Neutral damageWhiteWhite

The physical hitmarker uses a generic physical icon.
The elemental hitmarker uses a generic elemental icon, making it compatible with custom elements such as Holy, Poison, Lightning, or Arcane.


Datapack Support

Datapacks can add new preset values for vanilla or modded mobs.

Datapack entity files go here:

data/<namespace>/rpg_resweak/entities/<entity_namespace>/<entity_path>.json

Example path:

data/my_rpg_pack/rpg_resweak/entities/minecraft/zombie.json

Recommended format:

{
  "mebahelrpgresistanceweakness:slash": 1.0,
  "mebahelrpgresistanceweakness:pierce": 0.9,
  "mebahelrpgresistanceweakness:blunt": 1.1,
  "mebahelrpgresistanceweakness:fire": 1.25,
  "mebahelrpgresistanceweakness:frost": 0.9
}

Legacy format is also supported:

{
  "multipliers": {
    "mebahelrpgresistanceweakness:slash": 1.0,
    "mebahelrpgresistanceweakness:pierce": 0.9,
    "mebahelrpgresistanceweakness:blunt": 1.1
  }
}

How Datapack Values Are Applied

Datapacks act as presets.

When a datapack is loaded:

  • New entities are added to entities.json
  • Missing element multipliers are added
  • Existing player-edited values are never overwritten

This means datapacks are safe to use in existing worlds and modpacks.

Example:

If entities.json already contains:

{
  "entities": {
    "minecraft:zombie": {
      "mebahelrpgresistanceweakness:fire": 1.5
    }
  }
}

and a datapack provides:

{
  "mebahelrpgresistanceweakness:fire": 1.25,
  "mebahelrpgresistanceweakness:frost": 0.9
}

the final config keeps the player value and only adds the missing one:

{
  "entities": {
    "minecraft:zombie": {
      "mebahelrpgresistanceweakness:fire": 1.5,
      "mebahelrpgresistanceweakness:frost": 0.9
    }
  }
}

Loading Order

When damage is calculated, the mod checks values in this order:

PrioritySource
1Runtime overrides
2entities.json
3Datapack values
4Fallback 1.0

In normal gameplay, entities.json is the main source of truth once generated.


Adding Custom Elements

Other mods can register new elemental damage types through the API. This is useful for RPG systems that need custom elements such as Holy, Poison, Lightning, Arcane, Shadow, or Radiant damage.

A custom element has two important parts:

PartPurpose
Element IDThe unique identifier used in configs and datapacks, such as my_mod:holy
NeedlesThe keywords used by the detector to recognize that an attack belongs to this element

Example: registering a Holy element.

Identifier HOLY = new Identifier("my_mod", "holy");

RPGElements.registerElementalWithNeedles(
        HOLY,
        new ElementDefinition(HOLY),
        List.of(
                "holy",
                "sun",
                "light",
                "silver",
                "radiant"
        )
);

The third argument, List.of(...), defines the detection keywords for the element. The detector checks stable signatures built from weapon IDs, projectile IDs, item IDs, and translation keys. If one of these signatures contains a matching keyword, the attack can be classified as that element.

For example, the Holy element above may be detected from IDs such as:

ID or Translation KeyMatching Needle
my_mod:silver_swordsilver
my_mod:holy_staffholy
item.my_mod.radiant_bladeradiant
my_mod:sun_arrowsun

Once the element is registered, it can be used in entities.json like any built-in element:

{
  "entities": {
    "minecraft:zombie": {
      "my_mod:holy": 1.25
    }
  }
}

This means zombies take 25% increased damage from attacks detected as my_mod:holy.

Custom elements can also be used in datapacks:

{
  "my_mod:holy": 1.25,
  "my_mod:poison": 0.75
}

Example datapack path:

data/my_rpg_pack/rpg_resweak/entities/minecraft/zombie.json

Detection Priority for Custom Elements

When a custom element is registered with RPGElements.registerElementalWithNeedles(...), it can be added to elementalPriority in config.json.

Example:

{
  "elementDetection": {
    "elementalPriority": [
      "my_mod:holy",
      "mebahelrpgresistanceweakness:frost",
      "mebahelrpgresistanceweakness:fire"
    ]
  }
}

Priority matters when the same attack matches multiple elemental keywords. The first matching element in elementalPriority is selected.

For example, if an item ID is my_mod:holy_fire_sword, and both holy and fire match, the selected element depends on the order in elementalPriority.

Recommended Keyword Rules

For best compatibility, use lowercase English keywords that are likely to appear in item or projectile IDs.

Recommended:

List.of("holy", "sun", "light", "silver", "radiant")

Avoid overly generic keywords such as:

List.of("the", "magic", "item", "weapon")

Generic keywords can accidentally classify too many attacks as the custom element.

Custom elements are automatically supported by the generic elemental hitmarker. The hitmarker does not need a custom icon or color per element; it only indicates whether the elemental part of the attack was effective, resisted, or neutral.


API for Mod Developers

Mods can define default multipliers directly through the API.

Add the five base elements

MebahelsRPGWeaknessesResistances.addBasic(
        ModEntities.MY_ENTITY,
        1.0f,  // slash
        0.9f,  // pierce
        1.2f,  // blunt
        1.25f, // fire
        0.85f  // frost
);

Add or update one default value

MebahelsRPGWeaknessesResistances.putDefault(
        ModEntities.MY_ENTITY,
        new Identifier("my_mod", "holy"),
        1.25f
);

putDefault is safe. It only writes a value if the player has not already configured one.

Force a runtime and config override

MebahelsRPGWeaknessesResistances.setMultiplier(
        ModEntities.MY_ENTITY,
        new Identifier("my_mod", "holy"),
        1.5f
);

This is intended for commands, debug tools, or admin-side balancing. It overwrites the config value.


Notes for Modpack Authors

  • Use datapacks to distribute balancing presets
  • Use entities.json for final server-side tuning
  • Keep most values between 0.75 and 1.25 unless designing high-impact mechanics
  • Avoid setting values to 0.0 unless full immunity is intentional
  • Entity IDs from missing mods are safe; they remain unused until the relevant mod is installed
  • Datapacks will not overwrite player or server edits already present in entities.json

Summary

Mebahel RPG Resistance & Weakness provides a clean, configurable RPG combat layer for Minecraft. It gives modders and modpack authors a flexible way to make enemies feel distinct without hardcoding balance into entity classes.

Whether you want skeletons to fear maces, automatons to resist arrows, fire creatures to shrug off flames, or undead to burn under holy magic, this mod provides the framework to do it cleanly.

Совместимость

Minecraft: Java Edition

1.20.x

Платформы

Поддерживаемые окружения

Клиент и сервер

Создатели

Детали

Лицензия:LicenseRef-All-Rights-Reserved
Опубликован:1 неделю назад
Обновлён:1 неделю назад
Главная