Appearance
helix / LootPool
Class: LootPool โ
Defined in: core/values/loot-table.ts:22
Fluent loot pool: how many rolls, which entries, and pool-wide functions.
Constructors โ
Constructor โ
new LootPool():
LootPool
Returns โ
LootPool
Properties โ
entriesList โ
readonlyentriesList:LootEntry[] =[]
Defined in: core/values/loot-table.ts:24
functionsList โ
readonlyfunctionsList:LootFunction[] =[]
Defined in: core/values/loot-table.ts:25
rollsValue โ
rollsValue:
NumberProvider=1
Defined in: core/values/loot-table.ts:23
Methods โ
empty() โ
empty(
weight?):this
Defined in: core/values/loot-table.ts:50
Add an empty (nothing) entry with weight.
Parameters โ
weight? โ
number
Returns โ
this
func() โ
func(
fn):this
Defined in: core/values/loot-table.ts:56
A function applied to every entry rolled from this pool.
Parameters โ
fn โ
Returns โ
this
item() โ
item(
item,opts?):this
Defined in: core/values/loot-table.ts:37
Add a minecraft:item entry. Adds set_count / set_components from the item automatically, before any opts.functions.
Parameters โ
item โ
opts? โ
Returns โ
this
lootTable() โ
lootTable(
ref,opts?):this
Defined in: core/values/loot-table.ts:43
Add a nested-loot-table entry.
Parameters โ
ref โ
string | LootTableRef
opts? โ
Returns โ
this
rolls() โ
rolls(
n):this
Defined in: core/values/loot-table.ts:28
Number of times this pool is rolled (exact or a {min,max} range).
Parameters โ
n โ
Returns โ
this