Class ConditionalRecipeOutput
java.lang.Object
net.neoforged.neoforge.common.crafting.ConditionalRecipeOutput
- All Implemented Interfaces:
RecipeOutput, BootstrapContextAccess, BootstrapContextAccessExtension, IRecipeOutputExtension
Wrapper around a
RecipeOutput that adds conditions to all received recipes.
Do not use directly, obtain via IRecipeOutputExtension.withConditions(ICondition...).-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(ResourceKey<Recipe<?>> id, Recipe<?> recipe, @Nullable AdvancementHolder advancement, ICondition... conditions) Generates a recipe with the given conditions.<S> Stream<Holder.Reference<S>> listContextElements(ResourceKey<? extends Registry<? extends S>> key) Deprecated.<S> HolderGetter<S> lookup(ResourceKey<? extends Registry<? extends S>> key) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface BootstrapContextAccessExtension
holderLookupMethods inherited from interface IRecipeOutputExtension
withConditionsMethods inherited from interface RecipeOutput
accept
-
Field Details
-
inner
-
conditions
-
-
Constructor Details
-
ConditionalRecipeOutput
-
-
Method Details
-
advancement
- Specified by:
advancementin interfaceRecipeOutput
-
accept
public void accept(ResourceKey<Recipe<?>> id, Recipe<?> recipe, @Nullable AdvancementHolder advancement, ICondition... conditions) Description copied from interface:IRecipeOutputExtensionGenerates a recipe with the given conditions.- Specified by:
acceptin interfaceIRecipeOutputExtension
-
lookup
- Specified by:
lookupin interfaceBootstrapContextAccess
-
listContextElements
@Deprecated public <S> Stream<Holder.Reference<S>> listContextElements(ResourceKey<? extends Registry<? extends S>> key) Deprecated.- Specified by:
listContextElementsin interfaceBootstrapContextAccess
-