Package net.minecraft.loot.function
Class ConditionalLootFunction
java.lang.Object
net.minecraft.loot.function.ConditionalLootFunction
- All Implemented Interfaces:
BiFunction<ItemStack,LootContext,ItemStack>
,LootContextAware
,LootFunction
- Direct Known Subclasses:
ApplyBonusLootFunction
,CopyNameLootFunction
,CopyNbtLootFunction
,CopyStateFunction
,EnchantRandomlyLootFunction
,EnchantWithLevelsLootFunction
,ExplorationMapLootFunction
,ExplosionDecayLootFunction
,FillPlayerHeadLootFunction
,FurnaceSmeltLootFunction
,LimitCountLootFunction
,LootingEnchantLootFunction
,SetAttributesLootFunction
,SetContentsLootFunction
,SetCountLootFunction
,SetDamageLootFunction
,SetLootTableLootFunction
,SetLoreLootFunction
,SetNameLootFunction
,SetNbtLootFunction
,SetStewEffectLootFunction
public abstract class ConditionalLootFunction extends Object implements LootFunction
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ConditionalLootFunction.Builder<T extends ConditionalLootFunction.Builder<T>>
(package private) static class
ConditionalLootFunction.Joiner
static class
ConditionalLootFunction.Serializer<T extends ConditionalLootFunction>
-
Field Summary
Fields Modifier and Type Field Description protected LootCondition[]
conditions
private Predicate<LootContext>
predicate
-
Constructor Summary
Constructors Modifier Constructor Description protected
ConditionalLootFunction(LootCondition[] conditions)
-
Method Summary
Modifier and Type Method Description ItemStack
apply(ItemStack itemStack, LootContext lootContext)
protected static ConditionalLootFunction.Builder<?>
builder(Function<LootCondition[],LootFunction> joiner)
protected abstract ItemStack
process(ItemStack stack, LootContext context)
void
validate(LootTableReporter reporter)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.function.BiFunction
andThen
Methods inherited from interface net.minecraft.loot.context.LootContextAware
getRequiredParameters
Methods inherited from interface net.minecraft.loot.function.LootFunction
getType
-
Field Details
-
conditions
-
predicate
-
-
Constructor Details
-
ConditionalLootFunction
-
-
Method Details
-
apply
- Specified by:
apply
in interfaceBiFunction<ItemStack,LootContext,ItemStack>
-
process
-
validate
- Specified by:
validate
in interfaceLootContextAware
-
builder
protected static ConditionalLootFunction.Builder<?> builder(Function<LootCondition[],LootFunction> joiner)
-