Class LootPool
java.lang.Object
net.minecraft.world.level.storage.loot.LootPool
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionprivate NumberProvider
static final com.mojang.serialization.Codec<LootPool>
private final Predicate<LootContext>
private final BiFunction<ItemStack,
LootContext, ItemStack> static final com.mojang.serialization.Codec<LootPool>
private final List<LootItemCondition>
private final List<LootPoolEntryContainer>
private Optional<ICondition>
private final List<LootItemFunction>
private boolean
private NumberProvider
-
Constructor Summary
ConstructorDescriptionLootPool
(List<LootPoolEntryContainer> p_298341_, List<LootItemCondition> p_297697_, List<LootItemFunction> p_299722_, NumberProvider p_165131_, NumberProvider p_165132_) LootPool
(List<LootPoolEntryContainer> p_298341_, List<LootItemCondition> p_297697_, List<LootItemFunction> p_299722_, NumberProvider p_165131_, NumberProvider p_165132_, Optional<String> name, Optional<ICondition> forge_conditions) -
Method Summary
Modifier and TypeMethodDescriptionprivate void
addRandomItem
(Consumer<ItemStack> p_79059_, LootContext p_79060_) void
addRandomItems
(Consumer<ItemStack> p_79054_, LootContext p_79055_) private void
void
freeze()
@Nullable String
getName()
getRolls()
boolean
isFrozen()
static LootPool.Builder
lootPool()
void
(package private) void
void
void
validate
(ValidationContext p_79052_)
-
Field Details
-
CODEC
-
CONDITIONAL_CODEC
-
entries
-
conditions
-
compositeCondition
-
functions
-
compositeFunction
-
rolls
-
bonusRolls
-
name
-
forge_condition
-
isFrozen
private boolean isFrozen
-
-
Constructor Details
-
LootPool
LootPool(List<LootPoolEntryContainer> p_298341_, List<LootItemCondition> p_297697_, List<LootItemFunction> p_299722_, NumberProvider p_165131_, NumberProvider p_165132_) -
LootPool
LootPool(List<LootPoolEntryContainer> p_298341_, List<LootItemCondition> p_297697_, List<LootItemFunction> p_299722_, NumberProvider p_165131_, NumberProvider p_165132_, Optional<String> name, Optional<ICondition> forge_conditions)
-
-
Method Details
-
addRandomItem
-
addRandomItems
-
validate
-
lootPool
-
freeze
public void freeze() -
isFrozen
public boolean isFrozen() -
checkFrozen
private void checkFrozen() -
getName
-
setName
-
getRolls
-
getBonusRolls
-
setRolls
-
setBonusRolls
-