public class LootPool
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
LootPool.Builder |
static class |
LootPool.Serializer |
Modifier and Type | Field and Description |
---|---|
private RandomValueRange |
bonusRolls |
private java.util.function.Predicate<LootContext> |
combinedConditions |
private java.util.function.BiFunction<ItemStack,LootContext,ItemStack> |
combinedFunctions |
private java.util.List<ILootCondition> |
conditions |
private ILootFunction[] |
functions |
private boolean |
isFrozen |
private java.util.List<LootEntry> |
lootEntries |
private java.lang.String |
name |
private IRandomRange |
rolls |
Modifier | Constructor and Description |
---|---|
private |
LootPool(LootEntry[] p_i51268_1_,
ILootCondition[] p_i51268_2_,
ILootFunction[] p_i51268_3_,
IRandomRange p_i51268_4_,
RandomValueRange p_i51268_5_,
java.lang.String name) |
Modifier and Type | Method and Description |
---|---|
static LootPool.Builder |
builder() |
private void |
checkFrozen() |
void |
freeze() |
void |
func_227505_a_(ValidationTracker p_227505_1_) |
void |
generate(java.util.function.Consumer<ItemStack> p_216091_1_,
LootContext p_216091_2_) |
private void |
generateRoll(java.util.function.Consumer<ItemStack> p_216095_1_,
LootContext p_216095_2_) |
IRandomRange |
getBonusRolls() |
java.lang.String |
getName() |
IRandomRange |
getRolls() |
boolean |
isFrozen() |
void |
setBonusRolls(RandomValueRange v) |
void |
setRolls(RandomValueRange v) |
private final java.lang.String name
private final java.util.List<LootEntry> lootEntries
private final java.util.List<ILootCondition> conditions
private final java.util.function.Predicate<LootContext> combinedConditions
private final ILootFunction[] functions
private final java.util.function.BiFunction<ItemStack,LootContext,ItemStack> combinedFunctions
private IRandomRange rolls
private RandomValueRange bonusRolls
private boolean isFrozen
private LootPool(LootEntry[] p_i51268_1_, ILootCondition[] p_i51268_2_, ILootFunction[] p_i51268_3_, IRandomRange p_i51268_4_, RandomValueRange p_i51268_5_, java.lang.String name)
private void generateRoll(java.util.function.Consumer<ItemStack> p_216095_1_, LootContext p_216095_2_)
public void generate(java.util.function.Consumer<ItemStack> p_216091_1_, LootContext p_216091_2_)
public void func_227505_a_(ValidationTracker p_227505_1_)
public static LootPool.Builder builder()
public void freeze()
public boolean isFrozen()
private void checkFrozen()
public java.lang.String getName()
public IRandomRange getRolls()
public IRandomRange getBonusRolls()
public void setRolls(RandomValueRange v)
public void setBonusRolls(RandomValueRange v)