Skip to content
U_Love edited this page Jul 25, 2026 · 1 revision

Adaptive Nemesis: Data Pack & KubeJS Extensions

Welcome to the Adaptive Nemesis extension hub! This wiki documents how to shape the entire world to your liking using Data Pack JSON and KubeJS scripts.

This documentation is intended for modpack authors, server administrators, and anyone who feels that vanilla difficulty is not "exciting" enough.


Quick Navigation

Page Content For
Datapack Invasion / World Stage / Nemesis data pack formats Data pack authors
KubeJS KubeJS events, API, and sample scripts KubeJS script writers
Examples Ready-to-use data packs and scripts Everyone
This page Overview, command reference, configuration entries Everyone

Two Extension Systems

1. Data Packs

The mod ships with three built-in data pack loaders. They refresh automatically on /reload or when entering a world:

Type Path Format Coverage
Invasion strategy data/<namespace>/invasions/<name>.json Customize invasion waves, enemies, and rewards
World stage data/<namespace>/world_stages/<name>.json Override difficulty multiplier, caps, and invasion wave count per stage
Nemesis global data/<namespace>/nemesis/<name>.json Nemesis system resistance/bonus caps and level formula

πŸ’‘ The mod provides built-in examples under src/main/resources/examples/datapack and src/main/resources/data/adaptive_nemesis. You can copy them directly into your data pack.

2. KubeJS Scripts

All events are registered under the event group adaptive_nemesis. Eight core events are supported:

  • entity_scale β€” when an entity is scaled
  • damage_calculation β€” when true damage is calculated
  • player_strength_evaluation β€” when player strength is evaluated
  • world_stage_change β€” when the world stage advances
  • nemesis_memory_update β€” when the nemesis memory is updated
  • invasion_start β€” when an invasion starts
  • invasion_wave_start β€” when an invasion wave starts
  • invasion_end β€” when an invasion ends

πŸ’‘ Sample scripts are located at kubejs_example/server_scripts/adaptive_nemesis/.


Command Reference

All /an invasion subcommands must be executed by a player (the command block/console will report player-only):

/an invasion trigger [namespace:name] [waves] [difficulty]
/an invasion status
/an invasion setdifficulty <multiplier>
  • Custom invasion types must be registered in a data pack before they can be triggered via namespace:name.
  • Legacy syntax is also supported: /an invasion trigger <waves> <difficulty>, defaulting to adaptive_nemesis:undead_invasion.
  • waves range: 1–20; difficulty range: 0.1–10.0.

Related Configuration Entries

In config/adaptive_nemesis-common.toml:

Config Key Description Default
invasion.enableDataPackSupport Enable data pack invasions true
invasion.enableKubejsSupport Enable KubeJS events true
invasion.enableCustomDifficulty Use a fixed invasion difficulty multiplier false
invasion.customDifficultyMultiplier Fixed invasion difficulty multiplier 1.5
invasion.maxWaveCount Upper limit for invasion wave count 6

Source Code Locations

  • Invasion data loader: src/main/java/com/adaptive_nemesis/adaptive_nemesismod/invasion/InvasionDataLoader.java
  • World stage data loader: src/main/java/com/adaptive_nemesis/adaptive_nemesismod/data/WorldStageDataLoader.java
  • Nemesis data loader: src/main/java/com/adaptive_nemesis/adaptive_nemesismod/memory/NemesisDataLoader.java
  • KubeJS event registration: src/main/java/com/adaptive_nemesis/adaptive_nemesismod/kubejs/KubeJSInitializer.java
  • KubeJS reflection trigger: src/main/java/com/adaptive_nemesis/adaptive_nemesismod/kubejs/KubeJSEventTrigger.java
  • Command implementation: src/main/java/com/adaptive_nemesis/adaptive_nemesismod/command/InvasionCommand.java

May your data packs validate and your scripts stay error-free. πŸŽ‰

Clone this wiki locally