Package net.minecraft.loot
Class LootFunction
java.lang.Object
net.minecraft.loot.LootFunction
- All Implemented Interfaces:
BiFunction<ItemStack,
,LootContext, ItemStack> ILootFunction
,IParameterized
- Direct Known Subclasses:
ApplyBonus
,CopyBlockState
,CopyName
,CopyNbt
,EnchantRandomly
,EnchantWithLevels
,ExplorationMap
,ExplosionDecay
,FillPlayerHead
,LimitCount
,LootingEnchantBonus
,SetAttributes
,SetContents
,SetCount
,SetDamage
,SetLootTable
,SetLore
,SetName
,SetNBT
,SetStewEffect
,Smelt
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
LootFunction.Builder<T extends LootFunction.Builder<T>>
static class
LootFunction.Serializer<T extends LootFunction>
(package private) static final class
Nested classes/interfaces inherited from interface net.minecraft.loot.functions.ILootFunction
ILootFunction.IBuilder
-
Field Summary
Modifier and TypeFieldDescriptionprivate final Predicate<LootContext>
protected final ILootCondition[]
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal ItemStack
apply
(ItemStack p_apply_1_, LootContext p_apply_2_) protected abstract ItemStack
run
(ItemStack p_215859_1_, LootContext p_215859_2_) protected static LootFunction.Builder<?>
simpleBuilder
(Function<ILootCondition[], ILootFunction> p_215860_0_) void
validate
(ValidationTracker p_225580_1_) 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.functions.ILootFunction
getType
Methods inherited from interface net.minecraft.loot.IParameterized
getReferencedContextParams
-
Field Details
-
predicates
-
compositePredicates
-
-
Constructor Details
-
LootFunction
-
-
Method Details
-
apply
- Specified by:
apply
in interfaceBiFunction<ItemStack,
LootContext, ItemStack>
-
run
-
validate
- Specified by:
validate
in interfaceIParameterized
-
simpleBuilder
protected static LootFunction.Builder<?> simpleBuilder(Function<ILootCondition[], ILootFunction> p_215860_0_)
-