Class AddTableLootModifier

java.lang.Object
net.neoforged.neoforge.common.loot.LootModifier
net.neoforged.neoforge.common.loot.AddTableLootModifier
All Implemented Interfaces:
IGlobalLootModifier

public class AddTableLootModifier extends LootModifier

Loot modifier that rolls one loot table (the "subtable") and adds the results to the loot being modified (the "target table"). Loot modifiers are not rolled for the subtable, as that could result in the subtables' items being modified twice (by downstream loot modifiers modifying the target table).

Acts similarly to adding another pool with a single minecraft:loot_table entry.

Json format:

{
  "type": "neoforge:add_table",
  "condition": {}, // optional loot condition to predicate application by (ie neoforge:loot_table_id). Can use minecraft:all_of for AND or minecraft:any_of for OR
  "table": "namespace:loot_table_id" // subtable to roll loot for to add to the target table(s)
}