public class LootPool
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
LootPool.Serializer |
Constructor and Description |
---|
LootPool(LootEntry[] lootEntriesIn,
LootCondition[] poolConditionsIn,
RandomValueRange rollsIn,
RandomValueRange bonusRollsIn,
java.lang.String name) |
Modifier and Type | Method and Description |
---|---|
void |
addEntry(LootEntry entry) |
protected void |
createLootRoll(java.util.Collection<ItemStack> stacks,
java.util.Random rand,
LootContext context) |
void |
freeze() |
void |
generateLoot(java.util.Collection<ItemStack> stacks,
java.util.Random rand,
LootContext context) |
RandomValueRange |
getBonusRolls() |
LootEntry |
getEntry(java.lang.String name) |
java.lang.String |
getName() |
RandomValueRange |
getRolls() |
boolean |
isFrozen() |
LootEntry |
removeEntry(java.lang.String name) |
void |
setBonusRolls(RandomValueRange v) |
void |
setRolls(RandomValueRange v) |
public LootPool(LootEntry[] lootEntriesIn, LootCondition[] poolConditionsIn, RandomValueRange rollsIn, RandomValueRange bonusRollsIn, java.lang.String name)
protected void createLootRoll(java.util.Collection<ItemStack> stacks, java.util.Random rand, LootContext context)
public void generateLoot(java.util.Collection<ItemStack> stacks, java.util.Random rand, LootContext context)
public void freeze()
public boolean isFrozen()
public java.lang.String getName()
public RandomValueRange getRolls()
public RandomValueRange getBonusRolls()
public void setRolls(RandomValueRange v)
public void setBonusRolls(RandomValueRange v)
public LootEntry getEntry(java.lang.String name)
public LootEntry removeEntry(java.lang.String name)
public void addEntry(LootEntry entry)