Package net.minecraft.loot
Class LootFunction
- java.lang.Object
-
- net.minecraft.loot.LootFunction
-
- All Implemented Interfaces:
java.util.function.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
public abstract class LootFunction extends java.lang.Object implements ILootFunction
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classLootFunction.Builder<T extends LootFunction.Builder<T>>static classLootFunction.Serializer<T extends LootFunction>(package private) static classLootFunction.SimpleBuilder-
Nested classes/interfaces inherited from interface net.minecraft.loot.functions.ILootFunction
ILootFunction.IBuilder
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.function.Predicate<LootContext>compositePredicatesprotected ILootCondition[]predicates
-
Constructor Summary
Constructors Modifier Constructor Description protectedLootFunction(ILootCondition[] p_i51231_1_)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description ItemStackapply(ItemStack p_apply_1_, LootContext p_apply_2_)protected abstract ItemStackrun(ItemStack p_215859_1_, LootContext p_215859_2_)protected static LootFunction.Builder<?>simpleBuilder(java.util.function.Function<ILootCondition[],ILootFunction> p_215860_0_)voidvalidate(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 net.minecraft.loot.functions.ILootFunction
getType
-
Methods inherited from interface net.minecraft.loot.IParameterized
getReferencedContextParams
-
-
-
-
Field Detail
-
predicates
protected final ILootCondition[] predicates
-
compositePredicates
private final java.util.function.Predicate<LootContext> compositePredicates
-
-
Constructor Detail
-
LootFunction
protected LootFunction(ILootCondition[] p_i51231_1_)
-
-
Method Detail
-
apply
public final ItemStack apply(ItemStack p_apply_1_, LootContext p_apply_2_)
- Specified by:
applyin interfacejava.util.function.BiFunction<ItemStack,LootContext,ItemStack>
-
run
protected abstract ItemStack run(ItemStack p_215859_1_, LootContext p_215859_2_)
-
validate
public void validate(ValidationTracker p_225580_1_)
- Specified by:
validatein interfaceIParameterized
-
simpleBuilder
protected static LootFunction.Builder<?> simpleBuilder(java.util.function.Function<ILootCondition[],ILootFunction> p_215860_0_)
-
-