Skip to content

SpawnTableModule

Kapitencraft edited this page Sep 25, 2026 · 1 revision

this module aims to allow modders to create spawn table, which are essentially loot tables for entities instead of items.

Data

spawn tables are, just like loot tables, data driven. to spawn a zombie with speed 3, the spawn table would look like this:

{
  "pools": {
    "entries": {
      "type": "kap_lib:entity",
      "entityType": "minecraft:zombie",
      "functions": [
        {
          "function": "add_effects",
          "effects": [
            {
              "id": "speed",
              "amplifier": 2
            }
          ]
        }
      ]
    },
    "rolls": 1
  }
}

spawn tables can also be generated with datagen using the SpawnTableProvider provider.

Clone this wiki locally