#How to make Loot tables in Kjs

6 messages · Page 1 of 1 (latest)

wraith rampart
#

I'm trying to remake a loot table in Kjs but it's essentially impossible as I can't even track any calls back to the source code. If somebody can reference an example script or a link to the source with all the calls, it would be appreciated.

ServerEvents.blockLootTables(event => {
    event.addBlock('carbonize:charcoal_stairs', table => table.addPool(pool => {
        pool.rolls = 1
        pool.bonusRolls = 1
        pool.addItem('carbonize:charcoal_stairs').matchTool('minecraft:pickaxes').enchantment('minecraft:silk_touch')
        pool.addItem('minecraft:charcoal')
    }))

})
{
  "type": "minecraft:block",
  "pools": [
    {
      "rolls": 1.0,
      "bonus_rolls": 0.0,
      "entries": [
        {
          "type": "minecraft:alternatives",
          "children": [
            {
              "type": "minecraft:item",
              "conditions": [
                {
                  "condition": "minecraft:match_tool",
                  "predicate": {
                    "enchantments": [
                      {
                        "enchantment": "minecraft:silk_touch",
                        "levels": {
                          "min": 1
                        }
                      }
                    ]
                  }
                }
              ],
              "name": "carbonize:charcoal_stairs"
            },
            {
              "type": "minecraft:item",
              "name": "minecraft:charcoal"
            }
          ]
        }
      ]
    }
  ]
}
jovial caveBOT
#

Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!

fallen mesa
#

use low priority data

old vergeBOT
#

Paste version of leaves.js from @fallen mesa

wraith rampart