ActiveBattlePokemonTracks a currently fielded slot on a BattleActor including its BattlePokemon and visual position.
Fields: actor, battlePokemon, battle, position (+1) · Methods: getActor, getBattlePokemon, setBattlePokemon, getBattle (+25)
Bytecode-verified architecture reference for all 67 core classes inside com.cobblemon.mod.common.battles (complementing the 80 Showdown tokens on Battle Protocol and 42 AI/catching classes on Battle AI). Covers BattleBuilder (pvp1v1, pvp2v2, pve, pvn), BattleRegistry, all 5 BattleTypes, 9 ShowdownActionResponseType enum decoders & 10 response classes, 7 BattleStartError types, BattleDispatch execution queues, and the GraalShowdownService vs SocketShowdownService JavaScript runners.
pvp1v1 · pvp2v2 · pve · pvnGraalShowdownService (embedded) · SocketShowdownService (TCP)ActiveBattlePokemonTracks a currently fielded slot on a BattleActor including its BattlePokemon and visual position.
Fields: actor, battlePokemon, battle, position (+1) · Methods: getActor, getBattlePokemon, setBattlePokemon, getBattle (+25)
AlreadyInBattleErrorBattleStartError returned when an actor is already participating in another battle.
Fields: actorUUID, name · Methods: getActorUUID, getName, getMessageFor
BagItemActionResponseTurn response applying an in-battle BagItem script from a player's inventory.
Fields: bagItem, target, data · Methods: getBagItem, getTarget, getData, isValid (+1)
BagItemsDataRegistry loading all 11 data/cobblemon/bag_items/*.js scripts and mapping ItemStacks to in-battle BagItemLike actions.
Fields: id, type, observable, bagItems (+1) · Methods: getId, getType, getObservable, sync (+3)
BattleActorErrorsAggregates per-actor and general BattleStartErrors for localized chat feedback.
Methods: get, getSize, size, containsKey (+7)
BattleBuilderServer factory building PvP 1v1 (pvp1v1), PvP 2v2 (pvp2v2), wild PvE (pve), and trainer PvN (pvn) battles with validation.
Methods: pvp1v1, pvp2v2, pve, pvn
BattleCaptureActionServer action executing a Poké Ball capture attempt against a wild target inside an active battle.
Fields: battle, targetPokemon, pokeBallEntity, pokemonName · Methods: getBattle, getTargetPokemon, getPokeBallEntity, getPokemonName (+1)
BattleFormatSerializable battle format specification bundling mod, BattleType, gen, adjustLevel, and ruleSet strings.
Fields: mod, battleType, ruleSet, gen (+6) · Methods: getMod, getBattleType, getRuleSet, setRuleSet (+5)
BattleRegistrySingleton tracking all active PokemonBattle instances by UUID, packing Showdown teams, ticking battles, and handling disconnects.
Fields: gson, battleMap · Methods: getGson, onServerStarted, onPlayerDisconnect, packTeam (+7)
BattleRulesConstants defining all 10 official Showdown ruleset strings (Obtainable, +Past, +Unobtainable, Bag Clause, Wild Alpha, etc.).
Fields: OBTAINABLE, PAST, UNOBTAINABLE, BAG_CLAUSE (+6)
BattleSideRepresents one side of a PokemonBattle holding BattleActors, active slots, and side-wide state.
Fields: actors, battle, contextManager · Methods: getActors, getActivePokemon, getBattle, setBattle (+5)
BattleStartErrorInterface for structured validation failures preventing battle launch.
Methods: getMessageFor
BattleStartResultSealed result wrapper returned by BattleBuilder and BattleRegistry.startBattle (SuccessfulBattleStart or ErroredBattleStart).
Methods: ifSuccessful, ifErrored
BattleTypeInterface defining a battle format's Showdown name, displayName, actorsPerSide, and slotsPerActor.
Methods: getName, getDisplayName, getActorsPerSide, getSlotsPerActor (+2)
BattleTypesRegistry defining the 5 built-in BattleType formats: SINGLES (1×1), DOUBLES (1×2), TRIPLES (1×3), MULTI (2×1), and ROYAL (freeforall).
Fields: SINGLES, DOUBLES, TRIPLES, MULTI (+1) · Methods: getSINGLES, getDOUBLES, getTRIPLES, getMULTI (+2)
BusyErrorBattleStartError returned when a player or Pokémon is busy (e.g. trading, evolving, or locked).
Fields: targetName · Methods: getTargetName, getMessageFor
CanceledErrorBattleStartError returned when a CobblemonEvents.BATTLE_STARTED_PRE listener cancels the battle.
Fields: reason · Methods: getReason, getMessageFor
ChallengeManagerManages timed PvP battle challenge requests and multi-battle invitations between players.
Fields: MAX_BATTLE_RADIUS, selectedLead · Methods: expirationPacket, notificationPacket, onDecline, onSend (+6)
CommonBattleStartErrorReusable BattleStartError implementation for common rule/format rejections.
DefaultActionResponseFallback response submitting Showdown's default action (used by timeouts/fallbacks).
Methods: isValid, toShowdownString
ErroredBattleStartBattleStartResult holding BattleActorErrors when battle creation fails validation.
Fields: generalErrors, participantErrors · Methods: getGeneralErrors, getParticipantErrors, ifErrored, forError (+8)
FleeAttemptActionResponseTurn response attempting to flee a wild PvE encounter.
Methods: isValid, toShowdownString
ForcePassActionResponseServer-generated forced pass action when a slot cannot act.
Methods: isValid, toShowdownString
ForfeitActionResponseTurn response forfeiting a battle immediately.
Methods: isValid, toShowdownString
HealItemActionResponseSpecialized BagItemActionResponse for healing/status items applied to a party target.
Fields: item · Methods: getItem, setItem, saveToBuffer, loadFromBuffer (+2)
InBattleGimmickMoveSpecial move descriptor for gimmick-enabled moves inside Showdown action requests.
Fields: move, target, disabled · Methods: getMove, setMove, getTarget, setTarget (+3)
InBattleMoveDeserialized move option inside a ShowdownActionRequest with id, pp, maxpp, target, disabled, and gimmick flags.
Fields: id, move, pp, maxpp (+3) · Methods: getId, setId, getMove, setMove (+14)
IncorrectActorCountErrorBattleStartError returned when actor count violates the BattleType actorsPerSide requirement.
Fields: requiredCount, hadCount · Methods: getRequiredCount, getHadCount, getMessageFor
InsufficientPokemonErrorBattleStartError returned when an actor lacks enough healthy Pokémon for the BattleType slot count.
Fields: actorEntity, requiredCount, hadCount · Methods: getActorEntity, getRequiredCount, getHadCount, getMessageFor
MoveActionResponseTurn response selecting a move slot, optional target PNX, and gimmick flag.
Fields: moveName, targetPnx, gimmickID, VALID_GIMMICK_IDS · Methods: getMoveName, setMoveName, getTargetPnx, setTargetPnx (+6)
MoveTargetEnum mapping Showdown move target scopes (self, normal, allAdjacent, allySide, foeSide, etc.) to valid ActiveBattlePokemon targets.
Fields: targetList, VALUES, any, all (+13) · Methods: getTargetList
NoPartyErrorBattleStartError returned when an actor has an empty or all-fainted party.
Fields: npc · Methods: getNpc, getMessageFor
PassActionResponseTurn response passing an active slot's turn when required by Showdown.
Methods: isValid, toShowdownString
ShiftActionResponseTurn response shifting a Pokémon's position in Triples battles.
Methods: isValid, toShowdownString
ShowdownActionRequestDeserialized Showdown |request| JSON payload containing active moves, forceSwitch flags, side roster, and teamPreview.
Fields: wait, active, forceSwitch, noCancel (+1) · Methods: getWait, setWait, getActive, setActive (+10)
ShowdownActionResponseAbstract base class for every player or AI turn decision serialized back to Showdown.
Fields: type · Methods: getType, saveToBuffer, loadFromBuffer, isValid (+1)
ShowdownActionResponseTypeNine-value enum (SWITCH, MOVE, DEFAULT, FORCE_PASS, PASS, SHIFT, HEAL_ITEM, FORFEIT, FLEE_ATTEMPT) with network decoders.
Values: SWITCH, MOVE, DEFAULT, FORCE_PASS, PASS, SHIFT · Methods: getLoader
ShowdownInterpreterCentral protocol dispatcher mapping 80 unique Showdown protocol tokens to 65 instruction classes.
Fields: lastCauser, updateInstructionParser, splitInstructionParser, sideInstructionParser · Methods: getLastCauser, interpretMessage, interpret, broadcastOptionalAbility (+6)
ShowdownMovesetContainer for a Pokémon's available InBattleMoves and gimmick options during a turn.
Fields: moves, trapped, canMegaEvo, canUltraBurst (+5) · Methods: getMoves, setMoves, getTrapped, setTrapped (+19)
ShowdownMovesetAdapterGson TypeAdapter deserializing Showdown move request JSON arrays.
Fields: gson · Methods: getGson, deserialize
ShowdownPokemonShowdown side-slot snapshot (ident, details, condition HP/status, active, stats, moves, baseAbility, item, pokeball).
Fields: ident, details, condition, active (+9) · Methods: getIdent, setIdent, getDetails, setDetails (+22)
ShowdownSideDeserialized side roster sent inside a ShowdownActionRequest.
Fields: name, id, pokemon · Methods: getName, setName, getId, setId (+4)
ShowdownThreadDedicated daemon worker thread executing ShowdownService JavaScript engine calls off the main server tick thread.
Fields: latch, whenReady · Methods: launch, queue, run
SuccessfulBattleStartBattleStartResult carrying the newly started PokemonBattle instance.
Fields: battle · Methods: getBattle, ifSuccessful
SwitchActionResponseTurn response swapping an active slot to a benched party Pokémon by UUID.
Fields: newPokemonId · Methods: getNewPokemonId, setNewPokemonId, saveToBuffer, loadFromBuffer (+2)
TargetableInterface implemented by ActiveBattlePokemon and BattleSide slots that can receive move targeting.
Methods: getAllActivePokemon, getActorPokemon, getSidePokemon, getFormat (+13)
TeamManagerManages multi-battle team invites and paired player squads prior to starting Multi battles.
Fields: MAX_TEAM_MEMBER_COUNT, playerToTeam, multiBattleTeams · Methods: getTeam, notificationPacket, expirationPacket, disbandTeam (+7)
MultiPokemonBattleActorBattleActor controlling multiple wild Pokémon entities together on one side.
Fields: type · Methods: getName, nameOwned, getType
PlayerBattleActorBattleActor representing a ServerPlayer with party storage, inventory bag access, and client packet sync.
Fields: initialPos, battleTheme, type · Methods: getInitialPos, getEntity, getBattleTheme, setBattleTheme (+6)
PokemonBattleActorBattleActor representing a single wild PokemonEntity driven by a BattleAI implementation.
Fields: pokemon, fleeDistance, initialPos, type · Methods: getPokemon, getFleeDistance, getInitialPos, getName (+5)
TrainerBattleActorBattleActor representing an NPC trainer with a fixed party, name, and configurable BattleAI skill level.
Fields: trainerName, type · Methods: getTrainerName, getName, nameOwned, getType
ActionEffectInstructionContract for instructions that trigger a client-side ActionEffect timeline animation and optional battle hold.
Methods: getFuture, setFuture, getHolds, setHolds (+6)
BattleDispatchInterface representing a single queued step in a PokemonBattle's server-to-client execution queue.
Methods: invoke
CauserInstructionMarker interface for instructions that record a causing effect/move for subsequent battle log messages.
DispatchResultInterface governing when a BattleDispatch finishes (GO immediately, WaitDispatch timed delay, or UntilDispatch predicate).
Methods: canProceed
DispatchResultKtClass in Cobblemon 1.8.4 battles/dispatch (1 field, 1 method).
Fields: GO · Methods: getGO
InstructionSetOrdered bundle of InterpreterInstructions parsed from one Showdown message batch and dispatched sequentially.
Fields: instructions · Methods: getInstructions, getSubsequentInstructions, getPreviousInstructions, getMostRecentInstruction (+4)
InterpreterInstructionContract for Showdown protocol instructions invoked against a PokemonBattle.
Methods: invoke
UntilDispatchDispatchResult pausing battle progression until a boolean predicate returns true.
Fields: condition, afterAction · Methods: getCondition, getAfterAction, setAfterAction, canProceed (+1)
WaitDispatchDispatchResult pausing battle progression for a fixed real-time duration in seconds.
Fields: readyTime · Methods: getReadyTime, canProceed
BattleMoveIn-battle wrapper tracking a Move's temporary PP, disabled state, and Showdown identifier.
Fields: move, disabled · Methods: getMove, getDisabled, setDisabled
BattlePokemonIn-battle wrapper around a Pokemon instance tracking UUID, stat changes, health, held item, and post-battle sync.
Fields: originalPokemon, effectedPokemon, postBattlePokemonOperations, postBattleEntityOperations (+9) · Methods: getOriginalPokemon, getEffectedPokemon, getPostBattlePokemonOperations, setPostBattlePokemonOperations (+27)
ShowdownServiceService interface bridging Cobblemon's JVM server with the Pokémon Showdown JavaScript battle engine.
Methods: openConnection, closeConnection, startBattle, endBattle (+7)
GraalLoggerSLF4J logging bridge capturing GraalJS Showdown stdout/stderr output.
Methods: publish, flush, close
GraalShowdownServiceDefault embedded GraalJS ShowdownService running Pokémon Showdown in-process inside the Minecraft JVM.
Fields: context, sendBattleMessageFunction, unbundler, gson · Methods: getContext, setContext, getSendBattleMessageFunction, setSendBattleMessageFunction (+18)
GraalShowdownUnbundlerExtracts data/cobblemon/showdown.zip to the runtime directory when showdownVersion changes.
Fields: gson · Methods: attemptUnbundle, loadShowdownMetadata, readShowdownMetadata
SocketShowdownServiceAlternative TCP socket ShowdownService client for connecting to an external Node.js Showdown process.
Fields: host, port, localPort, socket (+3) · Methods: getHost, getPort, getLocalPort, getGson (+16)
Every Cobblemon 1.8.4 battle starts through BattleBuilder (pvp1v1, pvp2v2, pve, or pvn), validates actors into a BattleStartResult (SuccessfulBattleStart or ErroredBattleStart), registers the UUID in BattleRegistry.battleMap, packs teams via BattleRegistry.packTeam(), and streams commands to ShowdownService on the dedicated ShowdownThread (default GraalShowdownService extracting showdown.zip via GraalShowdownUnbundler, or optional external Node.js SocketShowdownService). Incoming protocol batches parse into an InstructionSet queued through BattleDispatch (WaitDispatch / UntilDispatch).
| BattleTypes Field | Showdown Format ID | Actors / Side | Slots / Actor | Active Field Size |
|---|---|---|---|---|
BattleTypes.SINGLES | singles | 1 | 1 | 1 active slot per side |
BattleTypes.DOUBLES | doubles | 1 | 2 | 2 active slots per side |
BattleTypes.TRIPLES | triples | 1 | 3 | 3 active slots per side |
BattleTypes.MULTI | multi | 2 | 1 | 2 active slots per side |
BattleTypes.ROYAL | freeforall | 1 | 1 | 1 active slot per side |
ShowdownActionResponseType defines 9 network decoder types (SWITCH, MOVE, DEFAULT, FORCE_PASS, PASS, SHIFT, HEAL_ITEM, FORFEIT, FLEE_ATTEMPT) backing 10 ShowdownActionResponse subclasses (including BagItemActionResponse for the 11 BagItems scripts and BattleCaptureAction for Poké Ball throws). Failed battle starts return one of 7 structured BattleStartError types.
| Response Class | Parent Class | Verified Turn Behaviour |
|---|---|---|
BagItemActionResponse | ShowdownActionResponse | Turn response applying an in-battle BagItem script from a player's inventory. |
DefaultActionResponse | ShowdownActionResponse | Fallback response submitting Showdown's default action (used by timeouts/fallbacks). |
FleeAttemptActionResponse | ShowdownActionResponse | Turn response attempting to flee a wild PvE encounter. |
ForcePassActionResponse | ShowdownActionResponse | Server-generated forced pass action when a slot cannot act. |
ForfeitActionResponse | ShowdownActionResponse | Turn response forfeiting a battle immediately. |
HealItemActionResponse | ShowdownActionResponse | Specialized BagItemActionResponse for healing/status items applied to a party target. |
MoveActionResponse | ShowdownActionResponse | Turn response selecting a move slot, optional target PNX, and gimmick flag. |
PassActionResponse | ShowdownActionResponse | Turn response passing an active slot's turn when required by Showdown. |
ShiftActionResponse | ShowdownActionResponse | Turn response shifting a Pokémon's position in Triples battles. |
SwitchActionResponse | ShowdownActionResponse | Turn response swapping an active slot to a benched party Pokémon by UUID. |
| BattleStartError Class | Rejection Condition |
|---|---|
AlreadyInBattleError | BattleStartError returned when an actor is already participating in another battle. |
BusyError | BattleStartError returned when a player or Pokémon is busy (e.g. trading, evolving, or locked). |
CanceledError | BattleStartError returned when a CobblemonEvents.BATTLE_STARTED_PRE listener cancels the battle. |
CommonBattleStartError | Reusable BattleStartError implementation for common rule/format rejections. |
IncorrectActorCountError | BattleStartError returned when actor count violates the BattleType actorsPerSide requirement. |
InsufficientPokemonError | BattleStartError returned when an actor lacks enough healthy Pokémon for the BattleType slot count. |
NoPartyError | BattleStartError returned when an actor has an empty or all-fainted party. |
| Class & Package | Subsystem / Kind | Inheritance | Fields / Methods | Bytecode Summary |
|---|---|---|---|---|
ActiveBattlePokemonbattles.ActiveBattlePokemon | Core Battle & Formats Class | — implements Targetable | 5 / 29 | Tracks a currently fielded slot on a BattleActor including its BattlePokemon and visual position. Fields: actor: BattleActor, battlePokemon: BattlePokemon, battle: PokemonBattle, position: Pair<? extends ServerLevel, ? extends Vec3> · Methods: getActor, getBattlePokemon, setBattlePokemon, getBattle, getSide |
AlreadyInBattleErrorbattles.AlreadyInBattleError | Start Results & Errors Class | — implements BattleStartError | 2 / 3 | BattleStartError returned when an actor is already participating in another battle. Fields: actorUUID: UUID, name: Component · Methods: getActorUUID, getName, getMessageFor |
BagItemActionResponsebattles.BagItemActionResponse | Action Responses & Showdown Bridge Class | ShowdownActionResponse | 3 / 5 | Turn response applying an in-battle BagItem script from a player's inventory. Fields: bagItem: BagItem, target: BattlePokemon, data: String · Methods: getBagItem, getTarget, getData, isValid, toShowdownString |
BagItemsbattles.BagItems | Core Battle & Formats Object | — implements DataRegistry | 5 / 7 | DataRegistry loading all 11 data/cobblemon/bag_items/*.js scripts and mapping ItemStacks to in-battle BagItemLike actions. Fields: id: ResourceLocation, type: PackType, observable: SimpleObservable<BagItems>, bagItems: PrioritizedList<BagItemLike> · Methods: getId, getType, getObservable, sync, getBagItems |
BattleActorErrorsbattles.BattleActorErrors | Start Results & Errors Class | HashMap<BattleActor, | 0 / 11 | Aggregates per-actor and general BattleStartErrors for localized chat feedback. Methods: get, getSize, size, containsKey, remove |
BattleBuilderbattles.BattleBuilder | Core Battle & Formats Object | — | 0 / 4 | Server factory building PvP 1v1 (pvp1v1), PvP 2v2 (pvp2v2), wild PvE (pve), and trainer PvN (pvn) battles with validation. Methods: pvp1v1, pvp2v2, pve, pvn |
BattleCaptureActionbattles.BattleCaptureAction | Core Battle & Formats Class | — | 4 / 5 | Server action executing a Poké Ball capture attempt against a wild target inside an active battle. Fields: battle: PokemonBattle, targetPokemon: ActiveBattlePokemon, pokeBallEntity: EmptyPokeBallEntity, pokemonName: MutableComponent · Methods: getBattle, getTargetPokemon, getPokeBallEntity, getPokemonName, attach |
BattleFormatbattles.BattleFormat | Core Battle & Formats Class | — | 10 / 9 | Serializable battle format specification bundling mod, BattleType, gen, adjustLevel, and ruleSet strings. Fields: mod: String, battleType: BattleType, ruleSet: Set<String>, gen: int · Methods: getMod, getBattleType, getRuleSet, setRuleSet, getGen |
BattleRegistrybattles.BattleRegistry | Core Battle & Formats Object | — | 2 / 11 | Singleton tracking all active PokemonBattle instances by UUID, packing Showdown teams, ticking battles, and handling disconnects. Fields: gson: Gson, battleMap: concurrent.ConcurrentHashMap<UUID, PokemonBattle> · Methods: getGson, onServerStarted, onPlayerDisconnect, packTeam, startShowdown |
BattleRulesbattles.BattleRules | Core Battle & Formats Object | — | 10 / 0 | Constants defining all 10 official Showdown ruleset strings (Obtainable, +Past, +Unobtainable, Bag Clause, Wild Alpha, etc.). Fields: OBTAINABLE: String, PAST: String, UNOBTAINABLE: String, BAG_CLAUSE: String |
BattleSidebattles.BattleSide | Core Battle & Formats Class | — | 3 / 9 | Represents one side of a PokemonBattle holding BattleActors, active slots, and side-wide state. Fields: actors: BattleActor[], battle: PokemonBattle, contextManager: ContextManager · Methods: getActors, getActivePokemon, getBattle, setBattle, getContextManager |
BattleStartErrorbattles.BattleStartError | Start Results & Errors Interface | — | 0 / 1 | Interface for structured validation failures preventing battle launch. Methods: getMessageFor |
BattleStartResultbattles.BattleStartResult | Start Results & Errors Abstract | — | 0 / 2 | Sealed result wrapper returned by BattleBuilder and BattleRegistry.startBattle (SuccessfulBattleStart or ErroredBattleStart). Methods: ifSuccessful, ifErrored |
BattleTypebattles.BattleType | Core Battle & Formats Interface | — | 0 / 6 | Interface defining a battle format's Showdown name, displayName, actorsPerSide, and slotsPerActor. Methods: getName, getDisplayName, getActorsPerSide, getSlotsPerActor, getPokemonPerSide |
BattleTypesbattles.BattleTypes | Core Battle & Formats Object | — | 5 / 6 | Registry defining the 5 built-in BattleType formats: SINGLES (1×1), DOUBLES (1×2), TRIPLES (1×3), MULTI (2×1), and ROYAL (freeforall). Fields: SINGLES: BattleType, DOUBLES: BattleType, TRIPLES: BattleType, MULTI: BattleType · Methods: getSINGLES, getDOUBLES, getTRIPLES, getMULTI, getROYAL |
BusyErrorbattles.BusyError | Start Results & Errors Class | — implements BattleStartError | 1 / 2 | BattleStartError returned when a player or Pokémon is busy (e.g. trading, evolving, or locked). Fields: targetName: Component · Methods: getTargetName, getMessageFor |
CanceledErrorbattles.CanceledError | Start Results & Errors Class | — implements BattleStartError | 1 / 2 | BattleStartError returned when a CobblemonEvents.BATTLE_STARTED_PRE listener cancels the battle. Fields: reason: MutableComponent · Methods: getReason, getMessageFor |
ChallengeManagerbattles.ChallengeManager | Core Battle & Formats Object | RequestManager<ChallengeManager$BattleChallenge> | 2 / 10 | Manages timed PvP battle challenge requests and multi-battle invitations between players. Fields: MAX_BATTLE_RADIUS: double, selectedLead: Map<UUID, UUID> · Methods: expirationPacket, notificationPacket, onDecline, onSend, onAccept |
CommonBattleStartErrorbattles.CommonBattleStartError | Start Results & Errors Enum | — implements BattleStartError | 0 / 0 | Reusable BattleStartError implementation for common rule/format rejections. |
DefaultActionResponsebattles.DefaultActionResponse | Action Responses & Showdown Bridge Class | ShowdownActionResponse | 0 / 2 | Fallback response submitting Showdown's default action (used by timeouts/fallbacks). Methods: isValid, toShowdownString |
ErroredBattleStartbattles.ErroredBattleStart | Start Results & Errors Class | BattleStartResult | 2 / 12 | BattleStartResult holding BattleActorErrors when battle creation fails validation. Fields: generalErrors: Set<BattleStartError>, participantErrors: BattleActorErrors · Methods: getGeneralErrors, getParticipantErrors, ifErrored, forError, sendTo |
FleeAttemptActionResponsebattles.FleeAttemptActionResponse | Action Responses & Showdown Bridge Class | ShowdownActionResponse | 0 / 2 | Turn response attempting to flee a wild PvE encounter. Methods: isValid, toShowdownString |
ForcePassActionResponsebattles.ForcePassActionResponse | Action Responses & Showdown Bridge Class | ShowdownActionResponse | 0 / 2 | Server-generated forced pass action when a slot cannot act. Methods: isValid, toShowdownString |
ForfeitActionResponsebattles.ForfeitActionResponse | Action Responses & Showdown Bridge Class | ShowdownActionResponse | 0 / 2 | Turn response forfeiting a battle immediately. Methods: isValid, toShowdownString |
HealItemActionResponsebattles.HealItemActionResponse | Action Responses & Showdown Bridge Class | ShowdownActionResponse | 1 / 6 | Specialized BagItemActionResponse for healing/status items applied to a party target. Fields: item: String · Methods: getItem, setItem, saveToBuffer, loadFromBuffer, isValid |
InBattleGimmickMovebattles.InBattleGimmickMove | Core Battle & Formats Class | — | 3 / 7 | Special move descriptor for gimmick-enabled moves inside Showdown action requests. Fields: move: String, target: MoveTarget, disabled: boolean · Methods: getMove, setMove, getTarget, setTarget, getDisabled |
InBattleMovebattles.InBattleMove | Core Battle & Formats Class | — | 7 / 18 | Deserialized move option inside a ShowdownActionRequest with id, pp, maxpp, target, disabled, and gimmick flags. Fields: id: String, move: String, pp: int, maxpp: int · Methods: getId, setId, getMove, setMove, getPp |
IncorrectActorCountErrorbattles.IncorrectActorCountError | Start Results & Errors Class | — implements BattleStartError | 2 / 3 | BattleStartError returned when actor count violates the BattleType actorsPerSide requirement. Fields: requiredCount: int, hadCount: int · Methods: getRequiredCount, getHadCount, getMessageFor |
InsufficientPokemonErrorbattles.InsufficientPokemonError | Start Results & Errors Class | — implements BattleStartError | 3 / 4 | BattleStartError returned when an actor lacks enough healthy Pokémon for the BattleType slot count. Fields: actorEntity: Entity, requiredCount: int, hadCount: int · Methods: getActorEntity, getRequiredCount, getHadCount, getMessageFor |
MoveActionResponsebattles.MoveActionResponse | Action Responses & Showdown Bridge Class | ShowdownActionResponse | 4 / 10 | Turn response selecting a move slot, optional target PNX, and gimmick flag. Fields: moveName: String, targetPnx: String, gimmickID: String, VALID_GIMMICK_IDS: Set<String> · Methods: getMoveName, setMoveName, getTargetPnx, setTargetPnx, getGimmickID |
MoveTargetbattles.MoveTarget | Core Battle & Formats Enum | — | 17 / 1 | Enum mapping Showdown move target scopes (self, normal, allAdjacent, allySide, foeSide, etc.) to valid ActiveBattlePokemon targets. Fields: targetList: Function1<Targetable, List<Targetable>>, VALUES: MoveTarget[], any: MoveTarget, all: MoveTarget · Methods: getTargetList |
NoPartyErrorbattles.NoPartyError | Start Results & Errors Class | — implements BattleStartError | 1 / 2 | BattleStartError returned when an actor has an empty or all-fainted party. Fields: npc: NPCEntity · Methods: getNpc, getMessageFor |
PassActionResponsebattles.PassActionResponse | Action Responses & Showdown Bridge Object | ShowdownActionResponse | 0 / 2 | Turn response passing an active slot's turn when required by Showdown. Methods: isValid, toShowdownString |
ShiftActionResponsebattles.ShiftActionResponse | Action Responses & Showdown Bridge Class | ShowdownActionResponse | 0 / 2 | Turn response shifting a Pokémon's position in Triples battles. Methods: isValid, toShowdownString |
ShowdownActionRequestbattles.ShowdownActionRequest | Action Responses & Showdown Bridge Class | — | 5 / 14 | Deserialized Showdown |request| JSON payload containing active moves, forceSwitch flags, side roster, and teamPreview. Fields: wait: boolean, active: List<ShowdownMoveset>, forceSwitch: List<Boolean>, noCancel: boolean · Methods: getWait, setWait, getActive, setActive, getForceSwitch |
ShowdownActionResponsebattles.ShowdownActionResponse | Action Responses & Showdown Bridge Abstract | — | 1 / 5 | Abstract base class for every player or AI turn decision serialized back to Showdown. Fields: type: ShowdownActionResponseType · Methods: getType, saveToBuffer, loadFromBuffer, isValid, toShowdownString |
ShowdownActionResponseTypebattles.ShowdownActionResponseType | Action Responses & Showdown Bridge Enum | — | 1 / 1 | Nine-value enum (SWITCH, MOVE, DEFAULT, FORCE_PASS, PASS, SHIFT, HEAL_ITEM, FORFEIT, FLEE_ATTEMPT) with network decoders. Enum: SWITCH, MOVE, DEFAULT, FORCE_PASS, PASS, SHIFT · Methods: getLoader |
ShowdownInterpreterbattles.ShowdownInterpreter | Action Responses & Showdown Bridge Object | — | 4 / 10 | Central protocol dispatcher mapping 80 unique Showdown protocol tokens to 65 instruction classes. Fields: lastCauser: Map<UUID, BattleMessage>, updateInstructionParser: Map<String, Function4<PokemonBattle, InstructionSet, BattleMessage, Iterator<BattleMessage>, InterpreterInstruction>>, splitInstructionParser: Map<String, Function6<PokemonBattle, BattleActor, InstructionSet, BattleMessage, BattleMessage, Iterator<BattleMessage>, InterpreterInstruction>>, sideInstructionParser: Map<String, Function4<PokemonBattle, BattleActor, InstructionSet, BattleMessage, InterpreterInstruction>> · Methods: getLastCauser, interpretMessage, interpret, broadcastOptionalAbility, broadcastAbility |
ShowdownMovesetbattles.ShowdownMoveset | Action Responses & Showdown Bridge Class | — | 9 / 23 | Container for a Pokémon's available InBattleMoves and gimmick options during a turn. Fields: moves: List<InBattleMove>, trapped: boolean, canMegaEvo: boolean, canUltraBurst: boolean · Methods: getMoves, setMoves, getTrapped, setTrapped, getCanMegaEvo |
ShowdownMovesetAdapterbattles.ShowdownMovesetAdapter | Action Responses & Showdown Bridge Object | — implements JsonDeserializer<ShowdownMoveset> | 1 / 2 | Gson TypeAdapter deserializing Showdown move request JSON arrays. Fields: gson: Gson · Methods: getGson, deserialize |
ShowdownPokemonbattles.ShowdownPokemon | Action Responses & Showdown Bridge Class | — | 13 / 26 | Showdown side-slot snapshot (ident, details, condition HP/status, active, stats, moves, baseAbility, item, pokeball). Fields: ident: String, details: String, condition: String, active: boolean · Methods: getIdent, setIdent, getDetails, setDetails, getCondition |
ShowdownSidebattles.ShowdownSide | Action Responses & Showdown Bridge Class | — | 3 / 8 | Deserialized side roster sent inside a ShowdownActionRequest. Fields: name: UUID, id: String, pokemon: List<ShowdownPokemon> · Methods: getName, setName, getId, setId, getPokemon |
ShowdownThreadbattles.ShowdownThread | Action Responses & Showdown Bridge Class | Thread | 2 / 3 | Dedicated daemon worker thread executing ShowdownService JavaScript engine calls off the main server tick thread. Fields: latch: concurrent.CountDownLatch, whenReady: Queue<Function1<ShowdownService, Unit>> · Methods: launch, queue, run |
SuccessfulBattleStartbattles.SuccessfulBattleStart | Start Results & Errors Class | BattleStartResult | 1 / 2 | BattleStartResult carrying the newly started PokemonBattle instance. Fields: battle: PokemonBattle · Methods: getBattle, ifSuccessful |
SwitchActionResponsebattles.SwitchActionResponse | Action Responses & Showdown Bridge Class | ShowdownActionResponse | 1 / 6 | Turn response swapping an active slot to a benched party Pokémon by UUID. Fields: newPokemonId: UUID · Methods: getNewPokemonId, setNewPokemonId, saveToBuffer, loadFromBuffer, isValid |
Targetablebattles.Targetable | Core Battle & Formats Interface | — | 0 / 17 | Interface implemented by ActiveBattlePokemon and BattleSide slots that can receive move targeting. Methods: getAllActivePokemon, getActorPokemon, getSidePokemon, getFormat, isAllied |
TeamManagerbattles.TeamManager | Core Battle & Formats Object | RequestManager<TeamManager$TeamRequest> | 3 / 11 | Manages multi-battle team invites and paired player squads prior to starting Multi battles. Fields: MAX_TEAM_MEMBER_COUNT: int, playerToTeam: Map<UUID, TeamManager$MultiBattleTeam>, multiBattleTeams: Map<UUID, TeamManager$MultiBattleTeam> · Methods: getTeam, notificationPacket, expirationPacket, disbandTeam, removeTeamMember |
MultiPokemonBattleActorbattles.actor.MultiPokemonBattleActor | Actors & Battle Pokémon Class | AIBattleActor | 1 / 3 | BattleActor controlling multiple wild Pokémon entities together on one side. Fields: type: ActorType · Methods: getName, nameOwned, getType |
PlayerBattleActorbattles.actor.PlayerBattleActor | Actors & Battle Pokémon Class | BattleActor implements EntityBackedBattleActor<ServerPlayer> | 3 / 10 | BattleActor representing a ServerPlayer with party storage, inventory bag access, and client packet sync. Fields: initialPos: Vec3, battleTheme: ResourceLocation, type: ActorType · Methods: getInitialPos, getEntity, getBattleTheme, setBattleTheme, getName |
PokemonBattleActorbattles.actor.PokemonBattleActor | Actors & Battle Pokémon Class | AIBattleActor implements EntityBackedBattleActor<PokemonEntity>, FleeableBattleActor | 4 / 9 | BattleActor representing a single wild PokemonEntity driven by a BattleAI implementation. Fields: pokemon: BattlePokemon, fleeDistance: float, initialPos: Vec3, type: ActorType · Methods: getPokemon, getFleeDistance, getInitialPos, getName, nameOwned |
TrainerBattleActorbattles.actor.TrainerBattleActor | Actors & Battle Pokémon Class | AIBattleActor | 2 / 4 | BattleActor representing an NPC trainer with a fixed party, name, and configurable BattleAI skill level. Fields: trainerName: String, type: ActorType · Methods: getTrainerName, getName, nameOwned, getType |
ActionEffectInstructionbattles.dispatch.ActionEffectInstruction | Dispatch & Instructions Interface | InterpreterInstruction | 0 / 10 | Contract for instructions that trigger a client-side ActionEffect timeline animation and optional battle hold. Methods: getFuture, setFuture, getHolds, setHolds, getId |
BattleDispatchbattles.dispatch.BattleDispatch | Dispatch & Instructions Interface | — | 0 / 1 | Interface representing a single queued step in a PokemonBattle's server-to-client execution queue. Methods: invoke |
CauserInstructionbattles.dispatch.CauserInstruction | Dispatch & Instructions Interface | — | 0 / 0 | Marker interface for instructions that record a causing effect/move for subsequent battle log messages. |
DispatchResultbattles.dispatch.DispatchResult | Dispatch & Instructions Interface | — | 0 / 1 | Interface governing when a BattleDispatch finishes (GO immediately, WaitDispatch timed delay, or UntilDispatch predicate). Methods: canProceed |
DispatchResultKtbattles.dispatch.DispatchResultKt | Dispatch & Instructions Class | — | 1 / 1 | Class in Cobblemon 1.8.4 battles/dispatch (1 field, 1 method). Fields: GO: DispatchResult · Methods: getGO |
InstructionSetbattles.dispatch.InstructionSet | Dispatch & Instructions Class | — | 1 / 8 | Ordered bundle of InterpreterInstructions parsed from one Showdown message batch and dispatched sequentially. Fields: instructions: List<InterpreterInstruction> · Methods: getInstructions, getSubsequentInstructions, getPreviousInstructions, getMostRecentInstruction, findInstructionsCausedBy |
InterpreterInstructionbattles.dispatch.InterpreterInstruction | Dispatch & Instructions Interface | — | 0 / 1 | Contract for Showdown protocol instructions invoked against a PokemonBattle. Methods: invoke |
UntilDispatchbattles.dispatch.UntilDispatch | Dispatch & Instructions Class | — implements DispatchResult | 2 / 5 | DispatchResult pausing battle progression until a boolean predicate returns true. Fields: condition: Function0<Boolean>, afterAction: Function0<Unit> · Methods: getCondition, getAfterAction, setAfterAction, canProceed, andThen |
WaitDispatchbattles.dispatch.WaitDispatch | Dispatch & Instructions Class | — implements DispatchResult | 1 / 2 | DispatchResult pausing battle progression for a fixed real-time duration in seconds. Fields: readyTime: long · Methods: getReadyTime, canProceed |
BattleMovebattles.pokemon.BattleMove | Actors & Battle Pokémon Class | — | 2 / 3 | In-battle wrapper tracking a Move's temporary PP, disabled state, and Showdown identifier. Fields: move: Move, disabled: boolean · Methods: getMove, getDisabled, setDisabled |
BattlePokemonbattles.pokemon.BattlePokemon | Actors & Battle Pokémon Class | — | 13 / 31 | In-battle wrapper around a Pokemon instance tracking UUID, stat changes, health, held item, and post-battle sync. Fields: originalPokemon: Pokemon, effectedPokemon: Pokemon, postBattlePokemonOperations: List<Function1<BattlePokemon, Unit>>, postBattleEntityOperations: List<Function1<PokemonEntity, Unit>> · Methods: getOriginalPokemon, getEffectedPokemon, getPostBattlePokemonOperations, setPostBattlePokemonOperations, getPostBattleEntityOperations |
ShowdownServicebattles.runner.ShowdownService | Showdown Runners Interface | — | 0 / 11 | Service interface bridging Cobblemon's JVM server with the Pokémon Showdown JavaScript battle engine. Methods: openConnection, closeConnection, startBattle, endBattle, send |
GraalLoggerbattles.runner.graal.GraalLogger | Showdown Runners Object | logging.Handler | 0 / 3 | SLF4J logging bridge capturing GraalJS Showdown stdout/stderr output. Methods: publish, flush, close |
GraalShowdownServicebattles.runner.graal.GraalShowdownService | Showdown Runners Class | — implements ShowdownService | 4 / 22 | Default embedded GraalJS ShowdownService running Pokémon Showdown in-process inside the Minecraft JVM. Fields: context: Context, sendBattleMessageFunction: Value, unbundler: GraalShowdownUnbundler, gson: Gson · Methods: getContext, setContext, getSendBattleMessageFunction, setSendBattleMessageFunction, getUnbundler |
GraalShowdownUnbundlerbattles.runner.graal.GraalShowdownUnbundler | Showdown Runners Class | — | 1 / 3 | Extracts data/cobblemon/showdown.zip to the runtime directory when showdownVersion changes. Fields: gson: Gson · Methods: attemptUnbundle, loadShowdownMetadata, readShowdownMetadata |
SocketShowdownServicebattles.runner.socket.SocketShowdownService | Showdown Runners Class | — implements ShowdownService | 7 / 20 | Alternative TCP socket ShowdownService client for connecting to an external Node.js Showdown process. Fields: host: String, port: int, localPort: int, socket: java.net.Socket · Methods: getHost, getPort, getLocalPort, getGson, openConnection |