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
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 net.minecraft.world.level.storage.loot.entries.LootPoolSingletonContainer
LootPoolSingletonContainer.Builder<T extends LootPoolSingletonContainer.Builder<T>>, LootPoolSingletonContainer.DummyBuilder, LootPoolSingletonContainer.EntryBase, LootPoolSingletonContainer.EntryConstructor
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec
<DynamicLoot> private final ResourceLocation
Fields inherited from class net.minecraft.world.level.storage.loot.entries.LootPoolSingletonContainer
compositeFunction, DEFAULT_QUALITY, DEFAULT_WEIGHT, functions, quality, weight
Fields inherited from class net.minecraft.world.level.storage.loot.entries.LootPoolEntryContainer
conditions
Fields inherited from interface net.minecraft.world.level.storage.loot.entries.ComposableEntryContainer
ALWAYS_FALSE, ALWAYS_TRUE
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
DynamicLoot
(ResourceLocation p_79465_, int p_79466_, int p_79467_, List<LootItemCondition> p_299033_, List<LootItemFunction> p_298474_) -
Method Summary
Modifier and TypeMethodDescriptionvoid
createItemStack
(Consumer<ItemStack> pStackConsumer, LootContext pLootContext) Generate the loot stacks of this entry.static LootPoolSingletonContainer.Builder
<?> dynamicEntry
(ResourceLocation pDynamicDropsName) getType()
Methods inherited from class net.minecraft.world.level.storage.loot.entries.LootPoolSingletonContainer
expand, simpleBuilder, singletonFields, validate
Methods inherited from class net.minecraft.world.level.storage.loot.entries.LootPoolEntryContainer
canRun, commonFields
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.minecraft.world.level.storage.loot.entries.ComposableEntryContainer
and, or
-
Field Details
-
CODEC
-
name
-
-
Constructor Details
-
DynamicLoot
private DynamicLoot(ResourceLocation p_79465_, int p_79466_, int p_79467_, List<LootItemCondition> p_299033_, List<LootItemFunction> p_298474_)
-
-
Method Details
-
getType
- Specified by:
getType
in classLootPoolEntryContainer
-
createItemStack
Generate 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:
createItemStack
in classLootPoolSingletonContainer
-
dynamicEntry
public static LootPoolSingletonContainer.Builder<?> dynamicEntry(ResourceLocation pDynamicDropsName)
-