Class FunctionReference
java.lang.Object
net.minecraft.world.level.storage.loot.functions.LootItemConditionalFunction
net.minecraft.world.level.storage.loot.functions.FunctionReference
- All Implemented Interfaces:
BiFunction<ItemStack, LootContext, ItemStack>, LootItemFunction, LootContextUser, Validatable
-
Nested Class Summary
Nested classes/interfaces inherited from class LootItemConditionalFunction
LootItemConditionalFunction.Builder<T> -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final org.slf4j.Loggerstatic final MapCodec<FunctionReference> private final ResourceKey<LootItemFunction> Fields inherited from class LootItemConditionalFunction
predicates -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateFunctionReference(List<LootItemCondition> predicates, ResourceKey<LootItemFunction> name) -
Method Summary
Modifier and TypeMethodDescriptioncodec()static LootItemConditionalFunction.Builder<?> protected ItemStackrun(ItemStack itemStack, LootContext context) voidvalidate(ValidationContext context) Methods inherited from class LootItemConditionalFunction
apply, commonFields, simpleBuilderMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface BiFunction
andThenMethods inherited from interface LootContextUser
getReferencedContextParams
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
MAP_CODEC
-
name
-
-
Constructor Details
-
FunctionReference
-
-
Method Details
-
codec
- Specified by:
codecin interfaceLootItemFunction- Specified by:
codecin classLootItemConditionalFunction
-
validate
- Specified by:
validatein interfaceLootContextUser- Specified by:
validatein interfaceValidatable- Overrides:
validatein classLootItemConditionalFunction
-
run
- Specified by:
runin classLootItemConditionalFunction
-
functionReference
public static LootItemConditionalFunction.Builder<?> functionReference(ResourceKey<LootItemFunction> name)
-