HomeJavaModsCobblemon KubeJS
Cobblemon KubeJS
ModsJava

Cobblemon KubeJS

by RapidMesck · on CurseForge

⬇ Download on CurseForge

The author built this one for Minecraft 1.21.1 on NeoForge. On other versions it may install and then do nothing.

Cobblemon KubeJS Bridge

Bring Cobblemon data, events, storage queries, administrative utilities, and client-side Pokedex displays into KubeJS.

Cobblemon KubeJS Bridge lets modpack developers build custom progression, quests, rewards, commands, interfaces, battle systems, and server mechanics using JavaScript.

Features

Cobblemon events

Listen to server-side events such as:

CobblemonEvents.pokemonCaptured(event => {
  event.player.tell(
    `You caught ${event.species} at level ${event.level}!`
  )
})

Pokedex API

Query a player's Pokedex progress:

var caughtFire = CobblemonJS.pokedex.countCaughtByType(
  player,
  'fire'
)

Species API

Both short and namespaced IDs are supported:

CobblemonJS.species.exists('charizard')
CobblemonJS.species.exists('cobblemon:charizard')

Party and PC API

Read safe Pokemon snapshots from a player's party and PC:

var party = CobblemonJS.pokemon.getParty(player)
var pokemon = CobblemonJS.pokemon.getByUuid(player, pokemonUuid)

Administrative utilities

Trusted server scripts can:

CobblemonJS.admin.givePokemon(
  player,
  'charizard level=50 shiny=true'
)

CobblemonJS.admin.spawnPokemon(
  player.serverLevel,
  'rayquaza level=70',
  100,
  80,
  -50
)

Client-side Pokedex synchronization

The server synchronizes a read-only Pokedex cache to the owning client. Client scripts can use it for live tooltips and other interfaces without requesting data from the server every frame.

CobblemonClientJS.pokedex.countSeen()
CobblemonClientJS.pokedex.countCaught()
CobblemonClientJS.pokedex.countCaughtByType('fire')

The included examples contain a tested dynamic spyglass tooltip.

Requirements

Install the bridge on both the client and server when using the synchronized client Pokedex API.

Loader support

NeoForge is currently supported.

Fabric support is not available yet. The Fabric module is only a compile-time stub and does not expose events, APIs, or client synchronization.

Documentation and examples

The project includes:

Links

Notes

Quick facts

Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.

Verified by MCModsHub

These come from our own check of the pack file, not from the source page.

Explore more