Appearance
helix / LootTableDef
Class: LootTableDef โ
Defined in: core/values/loot-table.ts:70
A loot table, registered with Datapack.lootTable. Item entries use the same items you give.
dp.lootTable("chests/reward", new LootTableDef("chest").pool( new LootPool().rolls(1).item(Item.DIAMOND.count(3))));
Constructors โ
Constructor โ
new LootTableDef(
type?):LootTableDef
Defined in: core/values/loot-table.ts:77
Parameters โ
type? โ
string
loot context type (chest, block, entity...). Omit for an untyped table.
Returns โ
LootTableDef
Properties โ
functionsList โ
readonlyfunctionsList:LootFunction[] =[]
Defined in: core/values/loot-table.ts:72
pools โ
readonlypools:LootPool[] =[]
Defined in: core/values/loot-table.ts:71
type? โ
readonlyoptionaltype?:string
Defined in: core/values/loot-table.ts:77
loot context type (chest, block, entity...). Omit for an untyped table.
Methods โ
func() โ
func(
fn):this
Defined in: core/values/loot-table.ts:86
A function applied to the whole table's output.
Parameters โ
fn โ
Returns โ
this
pool() โ
pool(
pool):this
Defined in: core/values/loot-table.ts:80
Add a pool (build it with LootPool).
Parameters โ
pool โ
Returns โ
this