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 interfaceNested 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 ComposableEntryContainerFields inherited from class net.minecraft.world.level.storage.loot.entries.LootPoolEntryContainer
conditionsFields inherited from interface net.minecraft.world.level.storage.loot.entries.ComposableEntryContainer
ALWAYS_FALSE, ALWAYS_TRUE -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCompositeEntryBase(List<LootPoolEntryContainer> pChildren, List<LootItemCondition> pConditions) -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract ComposableEntryContainercompose(List<? extends ComposableEntryContainer> pChildren) static <T extends CompositeEntryBase>
com.mojang.serialization.MapCodec<T> createCodec(CompositeEntryBase.CompositeEntryConstructor<T> pFactory) final booleanexpand(LootContext pLootContext, Consumer<LootPoolEntry> pEntryConsumer) Expand this loot pool entry container by callingentryConsumerwith any applicable entriesvoidvalidate(ValidationContext pValidationContext) Methods inherited from class net.minecraft.world.level.storage.loot.entries.LootPoolEntryContainer
canRun, commonFields, getTypeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:
validatein classLootPoolEntryContainer
-
compose
protected abstract ComposableEntryContainer compose(List<? extends ComposableEntryContainer> pChildren) -
expand
Expand this loot pool entry container by callingentryConsumerwith 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> pFactory)
-