Package net.minecraft.loot
Class LootPool
- java.lang.Object
-
- net.minecraft.loot.LootPool
-
public class LootPool extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
LootPool.Builder
static class
LootPool.Serializer
-
Field Summary
Fields Modifier and Type Field Description private RandomValueRange
bonusRolls
private java.util.function.Predicate<LootContext>
compositeCondition
private java.util.function.BiFunction<ItemStack,LootContext,ItemStack>
compositeFunction
private java.util.List<ILootCondition>
conditions
private java.util.List<LootEntry>
entries
private ILootFunction[]
functions
private boolean
isFrozen
private java.lang.String
name
private IRandomRange
rolls
-
Constructor Summary
Constructors Modifier Constructor 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)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
addRandomItem(java.util.function.Consumer<ItemStack> p_216095_1_, LootContext p_216095_2_)
void
addRandomItems(java.util.function.Consumer<ItemStack> p_216091_1_, LootContext p_216091_2_)
private void
checkFrozen()
void
freeze()
IRandomRange
getBonusRolls()
java.lang.String
getName()
IRandomRange
getRolls()
boolean
isFrozen()
static LootPool.Builder
lootPool()
void
setBonusRolls(RandomValueRange v)
void
setRolls(RandomValueRange v)
void
validate(ValidationTracker p_227505_1_)
-
-
-
Field Detail
-
name
private final java.lang.String name
-
entries
private final java.util.List<LootEntry> entries
-
conditions
private final java.util.List<ILootCondition> conditions
-
compositeCondition
private final java.util.function.Predicate<LootContext> compositeCondition
-
functions
private final ILootFunction[] functions
-
compositeFunction
private final java.util.function.BiFunction<ItemStack,LootContext,ItemStack> compositeFunction
-
rolls
private IRandomRange rolls
-
bonusRolls
private RandomValueRange bonusRolls
-
isFrozen
private boolean isFrozen
-
-
Constructor Detail
-
LootPool
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)
-
-
Method Detail
-
addRandomItem
private void addRandomItem(java.util.function.Consumer<ItemStack> p_216095_1_, LootContext p_216095_2_)
-
addRandomItems
public void addRandomItems(java.util.function.Consumer<ItemStack> p_216091_1_, LootContext p_216091_2_)
-
validate
public void validate(ValidationTracker p_227505_1_)
-
freeze
public void freeze()
-
isFrozen
public boolean isFrozen()
-
checkFrozen
private void checkFrozen()
-
getName
public java.lang.String getName()
-
getRolls
public IRandomRange getRolls()
-
getBonusRolls
public IRandomRange getBonusRolls()
-
setRolls
public void setRolls(RandomValueRange v)
-
setBonusRolls
public void setBonusRolls(RandomValueRange v)
-
lootPool
public static LootPool.Builder lootPool()
-
-