Class RecipeManager
java.lang.Object
net.minecraft.world.item.crafting.RecipeManager
- All Implemented Interfaces:
RecipeAccess
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceRecipeManager.CachedCheck<I extends RecipeInput, T extends Recipe<I>>static classstatic interfacestatic final record -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate List<RecipeManager.ServerDisplayInfo> private final Collection<RecipeHolder<?>> private static final org.slf4j.Loggerprivate Map<ResourceKey<RecipePropertySet>, RecipePropertySet> private static final Map<ResourceKey<RecipePropertySet>, RecipeManager.IngredientExtractor> private it.unimi.dsi.fastutil.objects.Object2IntMap<ResourceKey<Recipe<?>>> private final RecipeMapprivate Map<ResourceKey<Recipe<?>>, List<RecipeManager.ServerDisplayInfo>> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionOptional<RecipeHolder<?>> byKey(ResourceKey<Recipe<?>> recipeId) private <T extends Recipe<?>>
@Nullable RecipeHolder<T> byKeyTyped(RecipeType<T> type, ResourceKey<Recipe<?>> recipeId) static <I extends RecipeInput, T extends Recipe<I>>
RecipeManager.CachedCheck<I, T> createCheck(RecipeType<T> type) private static List<Ingredient> filterDisabled(FeatureFlagSet enabledFlags, List<Ingredient> ingredients) voidfinalizeRecipeLoading(FeatureFlagSet enabledFlags) private static RecipeManager.IngredientExtractorforSingleInput(RecipeType<? extends SingleItemRecipe> type) <I extends RecipeInput, T extends Recipe<I>>
Optional<RecipeHolder<T>> getRecipeFor(RecipeType<T> type, I input, Level level) <I extends RecipeInput, T extends Recipe<I>>
Optional<RecipeHolder<T>> getRecipeFor(RecipeType<T> type, I input, Level level, @Nullable ResourceKey<Recipe<?>> recipeHint) <I extends RecipeInput, T extends Recipe<I>>
Optional<RecipeHolder<T>> getRecipeFor(RecipeType<T> type, I input, Level level, @Nullable RecipeHolder<T> recipeHint) private static booleanisIngredientEnabled(FeatureFlagSet enabledFlags, Ingredient ingredient) voidlistDisplaysForRecipe(ResourceKey<Recipe<?>> id, Consumer<RecipeDisplayEntry> output) voidsetPriorityMap(it.unimi.dsi.fastutil.objects.Object2IntMap<ResourceKey<Recipe<?>>> recipePriorities) private static List<RecipeManager.ServerDisplayInfo> unpackRecipeInfo(Iterable<RecipeHolder<?>> recipes, FeatureFlagSet enabledFeatures)
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
RECIPE_PROPERTY_SETS
private static final Map<ResourceKey<RecipePropertySet>, RecipeManager.IngredientExtractor> RECIPE_PROPERTY_SETS -
recipes
-
propertySets
-
stonecutterRecipes
-
allDisplays
-
recipeToDisplay
-
learnableRecipes
-
recipePriorities
-
-
Constructor Details
-
RecipeManager
-
-
Method Details
-
finalizeRecipeLoading
-
filterDisabled
private static List<Ingredient> filterDisabled(FeatureFlagSet enabledFlags, List<Ingredient> ingredients) -
isIngredientEnabled
-
getRecipeFor
public <I extends RecipeInput, T extends Recipe<I>> Optional<RecipeHolder<T>> getRecipeFor(RecipeType<T> type, I input, Level level, @Nullable ResourceKey<Recipe<?>> recipeHint) -
getRecipeFor
public <I extends RecipeInput, T extends Recipe<I>> Optional<RecipeHolder<T>> getRecipeFor(RecipeType<T> type, I input, Level level, @Nullable RecipeHolder<T> recipeHint) -
getRecipeFor
public <I extends RecipeInput, T extends Recipe<I>> Optional<RecipeHolder<T>> getRecipeFor(RecipeType<T> type, I input, Level level) -
byKey
-
byKeyTyped
private <T extends Recipe<?>> @Nullable RecipeHolder<T> byKeyTyped(RecipeType<T> type, ResourceKey<Recipe<?>> recipeId) -
getSynchronizedItemProperties
-
getSynchronizedStonecutterRecipes
-
propertySet
- Specified by:
propertySetin interfaceRecipeAccess
-
stonecutterRecipes
- Specified by:
stonecutterRecipesin interfaceRecipeAccess
-
getRecipes
-
getLearnableRecipes
-
getRecipeFromDisplay
-
listDisplaysForRecipe
-
createCheck
public static <I extends RecipeInput, T extends Recipe<I>> RecipeManager.CachedCheck<I,T> createCheck(RecipeType<T> type) -
unpackRecipeInfo
private static List<RecipeManager.ServerDisplayInfo> unpackRecipeInfo(Iterable<RecipeHolder<?>> recipes, FeatureFlagSet enabledFeatures) -
forSingleInput
private static RecipeManager.IngredientExtractor forSingleInput(RecipeType<? extends SingleItemRecipe> type) -
recipeMap
-
setPriorityMap
public void setPriorityMap(it.unimi.dsi.fastutil.objects.Object2IntMap<ResourceKey<Recipe<?>>> recipePriorities)
-