Loot table

Use the loot table requirement in a KubeJS recipe

Use one of these methods to add a Loot Table Requirement to the recipe.

.lootTableOutput("loot_table")

.lootTableOutput("loot_table", luck)
  • The loot_table param must be a string path that point to a loot table. The loot table file must be loaded with a datapack or a loader mod. Example: custommachinery:my_test_loottable point to a file in data/custommachinery/loot_tables/my_test_loottable.json

  • The luck param must be a float. Default is 0.0 and it can be used in the loot table to alter the quantity of generated items.

Example

ServerEvents.recipes(event => {

  event.recipes.custommachinery.custom_machine("custommachinery:power_crusher", 100)
  .lootTableOutput("custommachinery:my_test_loottable")
  
})