Class DynamicLoot
java.lang.Object
net.minecraft.world.level.storage.loot.entries.LootPoolEntryContainer
net.minecraft.world.level.storage.loot.entries.LootPoolSingletonContainer
net.minecraft.world.level.storage.loot.entries.DynamicLoot
- All Implemented Interfaces:
ComposableEntryContainer, Validatable
A loot pool entry container that will generate the dynamic drops with a given name.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class LootPoolSingletonContainer
LootPoolSingletonContainer.Builder<T>, LootPoolSingletonContainer.EntryBase, LootPoolSingletonContainer.EntryConstructor -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<DynamicLoot> private final IdentifierFields inherited from class LootPoolSingletonContainer
DEFAULT_QUALITY, DEFAULT_WEIGHT, functions, quality, weightFields inherited from class LootPoolEntryContainer
conditionsFields inherited from interface ComposableEntryContainer
ALWAYS_FALSE, ALWAYS_TRUE -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateDynamicLoot(Identifier name, int weight, int quality, List<LootItemCondition> conditions, List<LootItemFunction> functions) -
Method Summary
Modifier and TypeMethodDescriptioncom.mojang.serialization.MapCodec<DynamicLoot> codec()voidcreateItemStack(Consumer<ItemStack> output, LootContext context) Generate the loot stacks of this entry.static LootPoolSingletonContainer.Builder<?> dynamicEntry(Identifier name) Methods inherited from class LootPoolSingletonContainer
expand, simpleBuilder, singletonFields, validateMethods inherited from class LootPoolEntryContainer
canRun, commonFieldsMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ComposableEntryContainer
and, or
-
Field Details
-
MAP_CODEC
-
name
-
-
Constructor Details
-
DynamicLoot
private DynamicLoot(Identifier name, int weight, int quality, List<LootItemCondition> conditions, List<LootItemFunction> functions)
-
-
Method Details
-
codec
- Specified by:
codecin classLootPoolSingletonContainer
-
createItemStack
Description copied from class:LootPoolSingletonContainerGenerate the loot stacks of this entry. Contrary to the method name this method does not always generate one stack, it can also generate zero or multiple stacks.- Specified by:
createItemStackin classLootPoolSingletonContainer
-
dynamicEntry
-