CurseForge · Minecraft mod
Wild Battle API
Shared wild battle AI API for Cobblemon.
Quick answer
Which Wild Battle API release should I use?
Wild Battle API 1.1.2-Fabric targets 1.21.1 with Fabric. The project page does not say whether this file belongs on the client, dedicated server, or both. No extra mods listed for this file.
Where it goes
Is Wild Battle API required on the client, server, or both?
The project page does not say whether this file belongs on the client, dedicated server, or both.
The source does not explicitly classify this release as client-only or server-only.
What else does Wild Battle API 1.1.2-Fabric need?
Wild Battle API 1.1.2-Fabric. Change the file and its required mods may change too.
This file does not list any required mods. Do not add a library just because a different file uses it.
This file does not list any required or optional mods.
Before you install it
Add Wild Battle API without breaking your instance.
Built for Wild Battle API 1.1.2-Fabric. Pick another file and the loader, install side or required mods may change.
- 01
Stick to this file
Use Wild Battle API 1.1.2-Fabric. It targets 1.21.1 with Fabric; another release may have different loader, side or dependency requirements.
- 02
Bring the mods it needs
This file does not list any required mods. Do not add a library just because a different file uses it.
- 03
Put it on the correct side
The project page does not say whether this file belongs on the client, dedicated server, or both.
- 04
Pick the file you checked
Use the “Get this file” button beside Wild Battle API 1.1.2-Fabric. It opens that exact file at the source.
About this project
What does Wild Battle API add?
I grant permission to anyone seeking to add my mod to a modpack
Wild Battle API
Wild Battle API is a shared wild battle AI framework for Cobblemon.
For players and pack authors, it provides configurable smarter wild battle behavior with built-in presets and admin tools. For developers, it exposes a supported public API for registering custom wild BattleAI implementations without replacing Cobblemon internals directly.
Wild Battle API installs a delegating AI on wild battle actors at battle start. On each AI decision:
- Higher-priority providers are checked first.
- The first provider that returns a non-null
BattleAIis used. - Returning
nulldefers to lower-priority providers. - If no provider claims the context, the actor's original Cobblemon AI is used as fallback.
This lets multiple mods cooperate safely while keeping a reliable fallback path when no custom provider applies.
Included Features
- Shared API for wild battle AI extensions
- Priority-based provider resolution
- Safe fallback to the actor's original Cobblemon AI
- Built-in configurable smart wild AI behavior
- Difficulty presets from
easytoextreme - Admin UI and debug commands
- Fabric and NeoForge support for Minecraft
1.21.1
Admin Commands
Wild Battle API includes operator/admin commands for testing and configuration.
Commands:
/wildbattleapi ui/wildbattleapi difficulty <easy|medium|hard|extreme>/wildbattleapi debug on/wildbattleapi debug off/wildbattleapi debug status
Aliases:
/wba ui/wba difficulty <easy|medium|hard|extreme>/wba debug on|off|status
These commands require permission level 2.
Developer Usage
Supported Public API
Use only these classes for third-party integrations:
com.github.raguto.wildbattleapi.api.WildBattleAPIcom.github.raguto.wildbattleapi.api.WildAIProvidercom.github.raguto.wildbattleapi.api.WildAIContext
Do not depend on internal packages such as impl, mixin, config, or network.
Runtime Dependency
Install Wild Battle API anywhere your dependent mod loads. In normal modpacks, that means both client and server.
Mod ID:
wild_battle_api
Also declare it as a dependency in your mod metadata.
Fabric (fabric.mod.json):
{
"depends": {
"wild_battle_api": "*"
}
}
NeoForge (META-INF/neoforge.mods.toml):
[[dependencies.your_mod_id]]
modId = "wild_battle_api"
type = "required"
versionRange = "[1.0.0,)"
ordering = "AFTER"
side = "BOTH"
Adjust the minimum version to the first Wild Battle API version your mod supports.
Compile-Time Dependency
If you are not consuming a published Maven artifact, compile against the loader-specific jar directly.
Fabric example:
dependencies {
modCompileOnly files("libs/wild_battle_api-fabric-1.0.0.jar")
}
NeoForge example:
dependencies {
compileOnly files("libs/wild_battle_api-neoforge-1.0.0.jar")
}
Use the loader-appropriate jar for your environment.
Registering a Provider
Register your provider once during your mod's common initialization.
import com.github.raguto.wildbattleapi.api.WildBattleAPI;
import com.github.raguto.wildbattleapi.api.WildAIContext;
public final class MyWildAIRegistration {
public static void init() {
WildBattleAPI.registerProvider(150, context -> {
if (shouldUseMyAI(context)) {
return new MyCustomWildBattleAI();
}
return null;
});
}
private static boolean shouldUseMyAI(WildAIContext context) {
return context.getBattle() != null && context.getActor() != null;
}
}
You can also register at the default priority:
WildBattleAPI.registerProvider(context -> null);
Priority Guidance
0: catch-all or default provider50: standard override100+: high-priority or boss-specific override200+: hard override, use carefully
If your provider only handles specific cases, return null for everything else.
Implementing Your Own BattleAI
You may provide any class that implements Cobblemon's BattleAI.
import com.cobblemon.mod.common.api.battles.model.PokemonBattle;
import com.cobblemon.mod.common.api.battles.model.ai.BattleAI;
import com.cobblemon.mod.common.battles.ActiveBattlePokemon;
import com.cobblemon.mod.common.battles.BattleSide;
import com.cobblemon.mod.common.battles.PassActionResponse;
import com.cobblemon.mod.common.battles.ShowdownActionResponse;
import com.cobblemon.mod.common.battles.ShowdownMoveset;
import com.cobblemon.mod.common.net.messages.client.battle.BattleHealthChangePacket;
import org.jetbrains.annotations.Nullable;
public final class MyCustomWildBattleAI implements BattleAI {
@Override
public ShowdownActionResponse choose(
ActiveBattlePokemon activeBattlePokemon,
PokemonBattle battle,
BattleSide side,
@Nullable ShowdownMoveset moveset,
boolean forceSwitch
) {
if (forceSwitch || moveset == null) {
return PassActionResponse.INSTANCE;
}
// Replace this with your own move or switch logic.
return PassActionResponse.INSTANCE;
}
@Override
public void onHealthChange(BattleHealthChangePacket packet) {
// Optional state tracking.
}
}
WildAIContext
WildAIContext gives providers the information needed to decide whether to claim a wild battle actor.
Always available:
getActor()getPokemonList()getBattle()isForceSwitch()
Nullable depending on the current decision:
getActiveBattlePokemon()getAiSide()getMoveset()
Guard nullable fields before using them.
Integration Notes
- Keep provider logic fast and predictable.
- Return
nullwhen your mod does not want to claim the current context. - Avoid throwing exceptions from provider or AI logic.
- Test in both dedicated server and integrated singleplayer.
- If multiple mods register providers, higher numeric priority is checked first.
Licensing
Wild Battle API code and binaries are All Rights Reserved.
Third-party usage and distribution permissions are defined by the author policy on the mod page.
Project description from CurseForge.
Pick your setup
Wild Battle API by Minecraft version and loader
Choose the version and loader you play, then open the matching release.
Check the dependencies, then try the file in a copied instance before changing a world you care about.
Recent files
Wild Battle API versions and loaders
Wild Battle API 1.1.2-Fabric
wild_battle_api-fabric-1.1.2.jar
16 Mar 2026
Wild Battle API 1.1.2-NeoForge
wild_battle_api-neoforge-1.1.2.jar
16 Mar 2026
Wild Battle API 1.0.1-Fabric
wild_battle_api-fabric-1.0.1.jar
11 Mar 2026
Wild Battle API 1.0.1-NeoForge
wild_battle_api-neoforge-1.0.1.jar
11 Mar 2026
Wild Battle API 1.0.0-Fabric
wild_battle_api-fabric-1.0.0.jar
9 Mar 2026
Wild Battle API 1.0.0-NeoForge
wild_battle_api-neoforge-1.0.0.jar
9 Mar 2026
Looking for an older file? The official CurseForge project page is in Resources.