Skip to content

Datapack

U_Love edited this page Jul 25, 2026 · 1 revision

Adaptive Nemesis: Data Pack Wiki

Data packs are the lightest and most stable way to customize the mod. As long as you are familiar with JSON, you can customize invasion armies, world stage curves, and global nemesis rules.


Directory Structure

A standard data pack should look like this:

<your_datapack>/
├── pack.mcmeta
├── data/
│   ├── your_namespace/
│   │   ├── invasions/
│   │   │   └── undead_invasion.json
│   │   ├── world_stages/
│   │   │   ├── stage_1.json
│   │   │   └── stage_2.json
│   │   └── nemesis/
│   │       └── default.json
│   └── minecraft/
│       └── tags/
│           └── entity_type/
│               └── bosses.json   # Optional, overrides Boss classification

⚠️ All JSON changes take effect after /reload; no restart is required.


Invasion Strategy Data Pack

Path

data/<namespace>/invasions/<name>.json

The in-game unique identifier is namespace:name, for example adaptive_nemesis:undead_invasion.

Complete Field Reference

{
  "name": "adaptive_nemesis.invasion.undead.name",  // Display name translation key (optional)
  "max_waves": 6,                                   // Total wave count (default 6)
  "spawn_distance": 60,                             // Spawn distance from the player (default 60, minimum 20)
  "rewards": {                                      // Invasion victory rewards (optional)
    "loot_tables": ["minecraft:chests/simple_dungeon"], // List of loot table IDs
    "experience": 500,                                // Experience points
    "effects": [                                      // Potion effects granted to players
      {"id": "minecraft:regeneration", "duration": 30, "amplifier": 1}
    ]
  },
  "waves": [                                        // Wave list; at least one wave is required
    {
      "wave": 1,                                    // Wave number (starts at 1)
      "difficulty_multiplier": 1.0,                 // Wave difficulty multiplier (default 1.0)
      "enemies": [                                  // Enemy type list
        {
          "entity_type": "minecraft:zombie",        // Entity ID (required)
          "count": 4,                               // Spawn count per attempt (default 1)
          "weight": 1,                              // Weight (default 1)
          "is_boss": false,                         // Mark as BOSS (default false)
          "glowing": false,                         // Glowing effect (default false)
          "frost_walker": false,                    // Built-in Frost Walker effect (default false)
          "spawn_direction": "north",               // Spawn direction: north/south/east/west (optional)
          "custom_name": "adaptive_nemesis.invasion.boss_name", // Custom name translation key (optional)
          "health_multiplier": 1.0,                 // Extra health multiplier (default 1.0)
          "damage_multiplier": 1.0,                 // Extra damage multiplier (default 1.0)
          "equipment_loot_table": "minecraft:chests/nether_bridge", // Equipment loot table (optional)
          "effects": [                                // Potion effects applied to the enemy (optional)
            {"id": "minecraft:fire_resistance", "duration": 30, "amplifier": 0}
          ]
        }
      ]
    }
  ]
}

Field Quick Reference

Field Type Required Default Description
name string No null Translation key used for commands/messages
max_waves int No 6 Total wave count; limited by maxWaveCount config
spawn_distance int No 60 Spawn distance; minimum 20
rewards object No empty Victory rewards
rewards.loot_tables string[] No [] List of loot table IDs
rewards.loot_table string No - Single loot table shorthand (compatibility field)
rewards.experience int No 0 Experience points
rewards.effects object[] No [] Player potion effects; duration is in seconds
waves object[] Yes - Wave array
waves[].wave int No 1 Wave number
waves[].difficulty_multiplier double No 1.0 Difficulty multiplier for this wave
waves[].enemies object[] Yes - Enemy configuration array
waves[].enemies[].entity_type string Yes - Entity ID
waves[].enemies[].count int No 1 Spawn count
waves[].enemies[].weight int No 1 Selection weight
waves[].enemies[].is_boss bool No false BOSS flag
waves[].enemies[].glowing bool No false Glowing effect
waves[].enemies[].frost_walker bool No false Built-in Frost Walker effect
waves[].enemies[].spawn_direction string No null Fixed spawn direction
waves[].enemies[].custom_name string No null Custom name translation key
waves[].enemies[].health_multiplier double No 1.0 Extra health multiplier
waves[].enemies[].damage_multiplier double No 1.0 Extra damage multiplier
waves[].enemies[].equipment_loot_table string No null Equipment loot table
waves[].enemies[].effects object[] No [] Enemy potion effects

Full Example: Undead Invasion

Repository example: src/main/resources/examples/datapack/data/adaptive_nemesis/invasions/undead_invasion.json

{
  "name": "adaptive_nemesis.invasion.undead.name",
  "max_waves": 6,
  "spawn_distance": 60,
  "rewards": {
    "loot_tables": [
      "minecraft:chests/simple_dungeon",
      "minecraft:chests/shipwreck_treasure"
    ],
    "experience": 500,
    "effects": [
      {"id": "minecraft:regeneration", "duration": 30, "amplifier": 1},
      {"id": "minecraft:absorption", "duration": 300, "amplifier": 0}
    ]
  },
  "waves": [
    {
      "wave": 1,
      "difficulty_multiplier": 1.0,
      "enemies": [
        {"entity_type": "minecraft:zombie", "count": 4, "weight": 1},
        {"entity_type": "minecraft:skeleton", "count": 4, "weight": 1}
      ]
    },
    {
      "wave": 6,
      "difficulty_multiplier": 2.0,
      "enemies": [
        {"entity_type": "minecraft:giant", "count": 1, "weight": 1, "is_boss": true}
      ]
    }
  ]
}

Trigger Command

/an invasion trigger adaptive_nemesis:undead_invasion
/an invasion trigger adaptive_nemesis:nether_invasion 5 2.5

World Stage Data Pack

Path

data/<namespace>/world_stages/<name>.json

Each JSON file corresponds to a stage number stage. Multiple files can define different stages; later-loaded files do not overwrite earlier ones (they are distinguished by the stage field).

Field Reference

{
  "stage": 1,                    // Stage number (required, ≥0)
  "multiplier": 1.5,             // Stage difficulty multiplier (optional, -1 means use config default)
  "max_health_multiplier": 3.0,  // Health multiplier cap (optional)
  "max_damage_multiplier": 2.5,  // Damage multiplier cap (optional)
  "max_armor_multiplier": 2.0,   // Armor multiplier cap (optional)
  "float_min": 0.9,              // Minimum difficulty fluctuation (optional)
  "float_max": 1.1,              // Maximum difficulty fluctuation (optional)
  "invasion_max_waves": 4        // Max invasion waves for this stage (optional)
}

Field Quick Reference

Field Type Required Default Description
stage int Yes - Stage number
multiplier double No -1.0 Stage multiplier; overrides config when >0
max_health_multiplier double No -1.0 Health cap; overrides config when >0
max_damage_multiplier double No -1.0 Damage cap; overrides config when >0
max_armor_multiplier double No -1.0 Armor cap; overrides config when >0
float_min double No -1.0 Minimum fluctuation; overrides config when >0
float_max double No -1.0 Maximum fluctuation; overrides config when >0
invasion_max_waves int No -1 Invasion wave count; takes effect when >0

Example

{
  "stage": 2,
  "multiplier": 2.0,
  "max_health_multiplier": 4.0,
  "max_damage_multiplier": 3.0,
  "max_armor_multiplier": 2.5,
  "float_min": 0.85,
  "float_max": 1.15,
  "invasion_max_waves": 5
}

Nemesis Global Data Pack

Path

data/<namespace>/nemesis/<name>.json

Nemesis configuration is globally unique: when multiple files exist, the last-loaded file completely overwrites the previous ones. It is recommended to keep only one.

Field Reference

{
  "melee_resistance_cap": 0.3,   // Melee resistance bonus cap
  "ranged_resistance_cap": 0.3,  // Ranged resistance bonus cap
  "magic_resistance_cap": 0.3,   // Magic resistance bonus cap
  "attack_bonus_cap": 0.25,      // Attack bonus cap
  "speed_bonus_cap": 0.2,        // Speed bonus cap
  "health_bonus_cap": 0.5,       // Health bonus cap
  "kills_per_level": 10,         // Kills required per base level
  "deaths_per_level": 5,         // Deaths required per extra level
  "max_level": 50                // Maximum nemesis level
}

Field Quick Reference

Field Type Required Default Description
melee_resistance_cap double No 0.3 Melee resistance cap
ranged_resistance_cap double No 0.3 Ranged resistance cap
magic_resistance_cap double No 0.3 Magic resistance cap
attack_bonus_cap double No 0.25 Attack bonus cap
speed_bonus_cap double No 0.2 Speed bonus cap
health_bonus_cap double No 0.5 Health bonus cap
kills_per_level int No 10 Kill-to-level conversion
deaths_per_level int No 5 Death-to-level conversion
max_level int No 50 Level cap

Example

{
  "melee_resistance_cap": 0.4,
  "ranged_resistance_cap": 0.4,
  "magic_resistance_cap": 0.4,
  "attack_bonus_cap": 0.3,
  "speed_bonus_cap": 0.25,
  "health_bonus_cap": 0.6,
  "kills_per_level": 8,
  "deaths_per_level": 4,
  "max_level": 100
}

Boss Tag

The mod identifies which entities should advance the world stage on death via data/minecraft/tags/entity_type/bosses.json.

Default Tag

{
  "replace": false,
  "values": [
    "minecraft:ender_dragon",
    "minecraft:wither",
    "minecraft:warden"
  ]
}

You can use "replace": true to override the default list, or add other boss entities:

{
  "replace": false,
  "values": [
    "some_mod:custom_boss"
  ]
}

Debug Tips

  1. Enable debug logs: set enableDebugLog = true in config/adaptive_nemesis-common.toml.
  2. After reloading, check the logs for the number of loaded invasion / world stage / nemesis configs.
  3. Use /an invasion status to check whether an invasion is currently active.

Don't forget /reload after editing data packs, or the enemies might still use the default config! 🧟

Clone this wiki locally