Package dev.aurelium.auraskills.api.loot
Class LootPool
java.lang.Object
dev.aurelium.auraskills.api.loot.LootOptioned
dev.aurelium.auraskills.api.loot.LootPool
-
Field Summary
Fields inherited from class dev.aurelium.auraskills.api.loot.LootOptioned
options -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoublegetLoot()getName()intbooleanrollLoot(LootContextFilter filter) Rolls aLootentry from the pool's loot list randomly based on each loot's weight.Methods inherited from class dev.aurelium.auraskills.api.loot.LootOptioned
getOption, getOption, getOptions
-
Constructor Details
-
LootPool
-
-
Method Details
-
getName
-
getLoot
-
getBaseChance
public double getBaseChance() -
getSelectionPriority
public int getSelectionPriority() -
overridesVanillaLoot
public boolean overridesVanillaLoot() -
rollLoot
Rolls aLootentry from the pool's loot list randomly based on each loot's weight. The chance of an entry being selected is the weight/totalWeight. Specific loot entries can be filtered out before selection using the LootContextFilter.- Parameters:
filter- a filter checked on each loot entry, if the filter returns false the loot entry is ignored.- Returns:
- the selected Loot as an optional
-