Class CompositeEntryBase
java.lang.Object
net.minecraft.world.level.storage.loot.entries.LootPoolEntryContainer
net.minecraft.world.level.storage.loot.entries.CompositeEntryBase
- All Implemented Interfaces:
ComposableEntryContainer
- Direct Known Subclasses:
AlternativesEntry
,EntryGroup
,SequentialEntry
Base class for loot pool entry containers that delegate to one or more children.
The actual functionality is provided by composing the children into one composed container (see
compose(java.util.List<? extends net.minecraft.world.level.storage.loot.entries.ComposableEntryContainer>)
).-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface
Nested classes/interfaces inherited from class net.minecraft.world.level.storage.loot.entries.LootPoolEntryContainer
LootPoolEntryContainer.Builder<T extends LootPoolEntryContainer.Builder<T>>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final List
<LootPoolEntryContainer> private final ComposableEntryContainer
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
ConstructorsModifierConstructorDescriptionprotected
CompositeEntryBase
(List<LootPoolEntryContainer> pChildren, List<LootItemCondition> pConditions) -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract ComposableEntryContainer
compose
(List<? extends ComposableEntryContainer> pChildren) static <T extends CompositeEntryBase>
com.mojang.serialization.MapCodec<T> createCodec
(CompositeEntryBase.CompositeEntryConstructor<T> p_299248_) final boolean
expand
(LootContext pLootContext, Consumer<LootPoolEntry> pEntryConsumer) Expand this loot pool entry container by callingentryConsumer
with any applicable entriesvoid
validate
(ValidationContext pValidationContext) Methods inherited from class net.minecraft.world.level.storage.loot.entries.LootPoolEntryContainer
canRun, commonFields, getType
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
-
children
-
composedChildren
-
-
Constructor Details
-
CompositeEntryBase
protected CompositeEntryBase(List<LootPoolEntryContainer> pChildren, List<LootItemCondition> pConditions)
-
-
Method Details
-
validate
- Overrides:
validate
in classLootPoolEntryContainer
-
compose
protected abstract ComposableEntryContainer compose(List<? extends ComposableEntryContainer> pChildren) -
expand
Expand this loot pool entry container by callingentryConsumer
with any applicable entries- Returns:
- whether this loot pool entry container successfully expanded or not
-
createCodec
public static <T extends CompositeEntryBase> com.mojang.serialization.MapCodec<T> createCodec(CompositeEntryBase.CompositeEntryConstructor<T> p_299248_)
-