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> private final List<LootItemCondition>
private final List<LootPoolEntryContainer>
private final List<LootItemFunction>
private boolean
private @Nullable String
private NumberProvider
-
Constructor Summary
ConstructorDescriptionLootPool
(List<LootPoolEntryContainer> p_298764_, List<LootItemCondition> p_299316_, List<LootItemFunction> p_298954_, NumberProvider p_165131_, NumberProvider p_165132_, Optional<String> name) -
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
-
entries
-
conditions
-
compositeCondition
-
functions
-
compositeFunction
-
rolls
-
bonusRolls
-
isFrozen
private boolean isFrozen -
name
-
-
Constructor Details
-
LootPool
LootPool(List<LootPoolEntryContainer> p_298764_, List<LootItemCondition> p_299316_, List<LootItemFunction> p_298954_, NumberProvider p_165131_, NumberProvider p_165132_, Optional<String> name)
-
-
Method Details
-
addRandomItem
-
addRandomItems
-
validate
-
freeze
public void freeze() -
isFrozen
public boolean isFrozen() -
checkFrozen
private void checkFrozen() -
getName
-
setName
-
getRolls
-
getBonusRolls
-
setRolls
-
setBonusRolls
-
lootPool
-