Cobblemon is the Minecraft mod that integrates Pokémon into the game natively, leveraging Minecraft's resource and datapack system to offer maximum customization. One of the major advantages of this approach is the ability to completely modify Pokémon spawn logic without touching the mod's source code. Thanks to a well-structured datapack, a server administrator or modpack creator can precisely control which Pokémon appear, in which biomes, under what conditions, and how frequently.

This technical guide is aimed at Cobblemon server administrators and modpack creators who want to master the mod's custom spawn system. We'll see together how to structure a datapack, understand the JSON format of spawn files, and deploy everything on a production server.

Why Customize Spawns with a Datapack?

By default, Cobblemon generates its own spawn files for all Pokémon generations (Gen 1 to Gen 9). These files define the conditions under which each species can appear in the world. However, several situations justify creating a custom spawn datapack:

  • Rebalance rarity: a Pokémon may be too common or too rare in your biome configuration.
  • Add thematic spawns: make aquatic Pokémon appear only in specific ocean biomes of your modpack.
  • Create exclusive zones: reserve certain Pokémon for particular dimensions or structures.
  • Remove unwanted spawns: disable the appearance of certain species for balance reasons.
  • Synchronize with third-party mods: integrate biomes added by mods like Terralith or BYG into the spawn logic.

Cobblemon datapacks are fully compatible with hot reloading via the /reload command, which makes debugging and live adjustments easier.

Structure of a Cobblemon Datapack

A standard Minecraft datapack follows a precise folder hierarchy. For Cobblemon, spawn files are placed in a specific subfolder. Here is the minimum structure to follow:

my-datapack/
├── pack.mcmeta
└── data/
    └── cobblemon/
        └── spawn_pool_world/
            ├── bulbasaur.json
            ├── pikachu.json
            └── ...

The pack.mcmeta file must contain at minimum:

{
  "pack": {
    "pack_format": 15,
    "description": "Custom Cobblemon Spawns"
  }
}

Adapt the pack_format value to the Minecraft version you are using (15 for 1.20.x, 18 for 1.21.x). The spawn_pool_world folder is the directory that Cobblemon monitors to load spawn rules in the main world. There are also spawn_pool_nether and spawn_pool_end for the corresponding dimensions.

Anatomy of a Spawn JSON File

Each spawn JSON file can contain multiple entries for the same Pokémon or for multiple species. Here is a commented example for Pikachu:

{
  "enabled": true,
  "neededInstalledMods": [],
  "neededUninstalledMods": [],
  "spawns": [
    {
      "id": "cobblemon:pikachu_forest",
      "pokemon": "pikachu",
      "type": "land",
      "context": "grounded",
      "bucket": "uncommon",
      "level": "10-25",
      "weight": 8.0,
      "condition": {
        "biomes": [
          "#minecraft:is_forest"
        ],
        "timeRange": "any",
        "isRaining": false,
        "minY": 60,
        "maxY": 120
      },
      "anticondition": {
        "structures": ["#minecraft:villages"]
      }
    }
  ]
}

Essential Fields

  • id: unique identifier for the rule, in the format namespace:descriptive_name. It must be unique throughout the datapack.
  • pokemon: internal name of the Pokémon in lowercase, as it appears in Cobblemon (ex: bulbasaur, garchomp, iron_bundle).
  • type: the spawn movement mode. Possible values: land, water, water_surface, underwater, air, lava.
  • context: additional context. For land, use grounded. For flying Pokémon, use flying.
  • bucket: rarity category. Recognized values are common, uncommon, rare, and ultra_rare.
  • level: level range of the spawned Pokémon, in the format "min-max".
  • weight: relative weight in the bucket. The higher this value relative to other entries in the same bucket, the more frequent the Pokémon is.

The Condition Block

The condition field is the heart of customization. It accepts many parameters:

  • biomes: list of biomes or biome tags. Tags start with # (ex: #minecraft:is_ocean, #forge:is_hot, or mod tags like #terralith:tropical_island).
  • structures: list of structures within which spawning is allowed (ex: minecraft:stronghold).
  • timeRange: time range. Values: any, day, night, dawn, dusk.
  • minY / maxY: minimum and maximum altitude for spawning.
  • minLight / maxLight: minimum and maximum light level (0-15).
  • isRaining: boolean, true to restrict spawning to rain.
  • isThundering: boolean, for thunderstorms only.
  • moonPhase: moon phase (0 = full moon, integer 0-7).
  • nearbyBlocks: list of blocks that should be present near the spawn point.

The Anticondition Block

The anticondition field works like condition but in the negative: if one of the anticondition's conditions is met, the spawn is blocked. This allows, for example, preventing a Pokémon from spawning inside a structure while allowing it to spawn in the biome that hosts that structure.

Practical Customization Cases

Case 1: Pokémon Exclusive to a Mod Biome

If you use Terralith, you can make Sneasel appear only in the terralith:snowy_badlands biome:

{
  "spawns": [
    {
      "id": "mypack:sneasel_snowy_badlands",
      "pokemon": "sneasel",
      "type": "land",
      "context": "grounded",
      "bucket": "rare",
      "level": "25-40",
      "weight": 5.0,
      "condition": {
        "biomes": ["terralith:snowy_badlands"]
      }
    }
  ]
}

Case 2: Conditional Nocturnal Spawn

To make Haunter appear only at night, in caves or dark areas:

{
  "spawns": [
    {
      "id": "mypack:haunter_cave_night",
      "pokemon": "haunter",
      "type": "land",
      "context": "grounded",
      "bucket": "rare",
      "level": "20-35",
      "weight": 4.0,
      "condition": {
        "timeRange": "night",
        "maxY": 50,
        "maxLight": 3
      }
    }
  ]
}

Case 3: Disable an Existing Spawn

To disable a native Cobblemon spawn, create a JSON file with "enabled": false and the same identifier as the original rule. Cobblemon merges datapacks and user datapacks take priority over built-in data:

{
  "enabled": false,
  "spawns": [
    {
      "id": "cobblemon:magikarp_river"
    }
  ]
}

Warning: you must know the exact identifier of the original rule. These can be found in the mod's source code on the official Cobblemon GitLab repository, or by extracting the mod JAR.

Spawns of Forms and Variants

Cobblemon supports Pokémon forms directly in spawn files. To target a specific form, add the form after the Pokémon name:

"pokemon": "rattata form=alolan"

You can also add visual aspects or modifiers:

"pokemon": "pikachu aspects=[original_cap]"

The properties accepted in the pokemon field follow the syntax of Cobblemon commands and allow you to specify gender, level, special abilities, or any other attribute recognized by the mod.

Server Deployment

Once your datapack is created and tested locally, deployment on a Cobblemon server follows a simple procedure:

  1. Compress to ZIP: your my-datapack/ folder must be compressed to my-datapack.zip. The root of the archive must directly contain pack.mcmeta and the data/ folder.
  2. Place in the correct folder: on a Minecraft server, datapacks are placed in world/datapacks/ (or world_nether/datapacks/ for the Nether).
  3. Enable the datapack: on first launch or after a /reload, execute /datapack enable "file/my-datapack.zip" if the datapack is not automatically activated.
  4. Reload spawns: run /reload so Cobblemon reloads all spawn files. No server restart is necessary.

On panels like PteroPilot or Pterodactyl, you can upload the ZIP directly via the web file manager or via SFTP in the world/datapacks/ folder.

Verify Datapack Loading

To confirm that your datapack is properly loaded and active:

  • Command /datapack list: lists all active datapacks. Yours should appear with its name.
  • Server logs: on startup or during a /reload, Cobblemon displays messages indicating the number of spawn rules loaded.
  • Cobblemon command /cobblemon spawnpool (if available): allows you to inspect the current spawn pool at your position.

Best Practices and Pitfalls to Avoid

Identifier Conflicts

Two rules with the same id override each other. This is useful for disabling native spawns, but can cause unexpected behavior if two datapacks on your server accidentally define the same identifier. Always adopt a unique namespace for your identifiers (ex: myserver:...).

Weight and Buckets

The weight system works by bucket, not globally. A Pokémon with a weight of 100 in the ultra_rare bucket will not necessarily be common: the probability that the ultra_rare bucket is selected remains low. Adjust the bucket first, then the weight within the bucket.

Unrecognized Biome Tags

If a biome tag in your condition does not exist in your instance (for example, a mod tag that is not installed), the spawn rule may be silently ignored.


Posted on June 23, 2026 by _Xios_
https://pixelmongo.fr
Loading...