public static interface Enchantment.RandomListBuilder extends ResettableBuilder<List<Enchantment>,Enchantment.RandomListBuilder>
Enchantment
.Modifier and Type | Method and Description |
---|---|
List<Enchantment> |
build()
Builds an instance of a
Enchantment based on the entered
information. |
Enchantment.RandomListBuilder |
fixedPool(List<Enchantment> pool)
Sets a fixed pool for the random enchantments to pick from.
|
Enchantment.RandomListBuilder |
item(ItemStack item)
Sets the item for which the enchantments are chosen
|
Enchantment.RandomListBuilder |
level(int level)
Sets the enchanting level.
|
Enchantment.RandomListBuilder |
option(int option)
Sets the enchanting option.
|
Enchantment.RandomListBuilder |
seed(int seed)
Sets the random seed.
|
Enchantment.RandomListBuilder |
treasure(boolean treasure)
Sets whether to include treasure enchantments or not
|
from, reset
Enchantment.RandomListBuilder seed(int seed)
seed
- the random seedEnchantment.RandomListBuilder option(int option)
option
- the enchanting optionEnchantment.RandomListBuilder level(int level)
level
- the enchanting levelEnchantment.RandomListBuilder treasure(boolean treasure)
treasure
- whether to include treasure enchantments or notEnchantment.RandomListBuilder fixedPool(List<Enchantment> pool)
If empty a pool will be calculated based on the other values instead.
pool
- the fixed pool of enchantmentsEnchantment.RandomListBuilder item(ItemStack item)
item
- the item for which the enchantments are chosenList<Enchantment> build() throws IllegalStateException
Enchantment
based on the entered
information.IllegalStateException
- If a required value was not specified