This is where you actually make a loottable. You start with an empty<code>LootPool</code>and add the necessary attributes to it.
+
This is where you actually make a loottable. You start with an empty <code>LootPool</code> and add the necessary attributes to it.
* <code>.name</code> is used for the pool name.
* <code>.name</code> is used for the pool name.
* <code>.setRolls</code> is used for the amount.
* <code>.setRolls</code> is used for the amount.
−
* <code>.add</code> is used to add an <code>ItemLootEntry</code>.
+
* <code>.add</code> is used to add an <code>ItemLootEntry</code>. You can have multiple entries.
−
An <code>ItemLootEntry</code> defines what is returned, and which functions and/or conditions are applied (see [https://minecraft.fandom.com/wiki/Loot_table Loot table] for the vanilla functions and conditions).
+
An <code>ItemLootEntry</code> defines what item is returned, and which functions and/or conditions are applied (see [https://minecraft.fandom.com/wiki/Loot_table Loot table] for the vanilla functions and conditions).
* <code>.lootTableItem</code> is used to define which item is returned.
* <code>.lootTableItem</code> is used to define which item is returned.
−
* <code>.apply</code> is used to apply a function or condition
+
* <code>.apply</code> is used to apply a function or condition. These themselves can have multiple operations.
After all attributes have been added the <code>LootPool.Builder</code> can be used to make a <code>LootTable.Builder</code> of the proper <code>LootParameterSets</code>. This builder can then be added to the <code>lootTables</code> map made in the previous section (in the overwritten abstract method).
After all attributes have been added the <code>LootPool.Builder</code> can be used to make a <code>LootTable.Builder</code> of the proper <code>LootParameterSets</code>. This builder can then be added to the <code>lootTables</code> map made in the previous section (in the overwritten abstract method).