Class AlternativesEntry
java.lang.Object
net.minecraft.world.level.storage.loot.entries.LootPoolEntryContainer
net.minecraft.world.level.storage.loot.entries.CompositeEntryBase
net.minecraft.world.level.storage.loot.entries.AlternativesEntry
- All Implemented Interfaces:
ComposableEntryContainer
A composite loot pool entry container that expands all its children in order until one of them succeeds.
This container succeeds if one of its children succeeds.
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class net.minecraft.world.level.storage.loot.entries.CompositeEntryBase
CompositeEntryBase.CompositeEntryConstructor<T extends CompositeEntryBase> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<AlternativesEntry> Fields inherited from class net.minecraft.world.level.storage.loot.entries.CompositeEntryBase
childrenFields 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
ConstructorsConstructorDescriptionAlternativesEntry(List<LootPoolEntryContainer> p_299062_, List<LootItemCondition> p_298668_) -
Method Summary
Modifier and TypeMethodDescriptionstatic <E> AlternativesEntry.Builderalternatives(Collection<E> pChildrenSources, Function<E, LootPoolEntryContainer.Builder<?>> pToChildrenFunction) static AlternativesEntry.Builderalternatives(LootPoolEntryContainer.Builder<?>... pChildren) protected ComposableEntryContainercompose(List<? extends ComposableEntryContainer> pChildren) getType()voidvalidate(ValidationContext pValidationContext) Methods inherited from class net.minecraft.world.level.storage.loot.entries.CompositeEntryBase
createCodec, expandMethods inherited from class net.minecraft.world.level.storage.loot.entries.LootPoolEntryContainer
canRun, commonFieldsMethods 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
-
CODEC
-
-
Constructor Details
-
AlternativesEntry
AlternativesEntry(List<LootPoolEntryContainer> p_299062_, List<LootItemCondition> p_298668_)
-
-
Method Details
-
getType
- Specified by:
getTypein classLootPoolEntryContainer
-
compose
- Specified by:
composein classCompositeEntryBase
-
validate
- Overrides:
validatein classCompositeEntryBase
-
alternatives
public static AlternativesEntry.Builder alternatives(LootPoolEntryContainer.Builder<?>... pChildren) -
alternatives
public static <E> AlternativesEntry.Builder alternatives(Collection<E> pChildrenSources, Function<E, LootPoolEntryContainer.Builder<?>> pToChildrenFunction)
-