Class RecipeManager
java.lang.Object
net.minecraft.server.packs.resources.SimplePreparableReloadListener<Map<ResourceLocation,com.google.gson.JsonElement>>
net.minecraft.server.packs.resources.SimpleJsonResourceReloadListener
net.minecraft.world.item.crafting.RecipeManager
- All Implemented Interfaces:
PreparableReloadListener
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
RecipeManager.CachedCheck<I extends RecipeInput,
T extends Recipe<I>> Nested classes/interfaces inherited from interface net.minecraft.server.packs.resources.PreparableReloadListener
PreparableReloadListener.PreparationBarrier
-
Field Summary
Modifier and TypeFieldDescriptionprivate Map
<ResourceLocation, RecipeHolder<?>> private com.google.common.collect.Multimap
<RecipeType<?>, RecipeHolder<?>> private final ICondition.IContext
private static final com.google.gson.Gson
private boolean
private static final org.slf4j.Logger
private final HolderLookup.Provider
-
Constructor Summary
ConstructorDescriptionRecipeManager
(HolderLookup.Provider p_330459_) Deprecated.RecipeManager
(HolderLookup.Provider p_330459_, ICondition.IContext context) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
apply
(Map<ResourceLocation, com.google.gson.JsonElement> p_44037_, ResourceManager p_44038_, ProfilerFiller p_44039_) Optional
<RecipeHolder<?>> byKey
(ResourceLocation p_44044_) private <T extends Recipe<?>>
RecipeHolder<T> byKeyTyped
(RecipeType<T> p_332930_, ResourceLocation p_335282_) private <I extends RecipeInput,
T extends Recipe<I>>
Collection<RecipeHolder<T>> byType
(RecipeType<T> p_44055_) static <I extends RecipeInput,
T extends Recipe<I>>
RecipeManager.CachedCheck<I, T> createCheck
(RecipeType<T> p_220268_) protected static RecipeHolder
<?> fromJson
(ResourceLocation p_44046_, com.google.gson.JsonObject p_44047_, HolderLookup.Provider p_328308_) <I extends RecipeInput,
T extends Recipe<I>>
List<RecipeHolder<T>> getAllRecipesFor
(RecipeType<T> p_44014_) <I extends RecipeInput,
T extends Recipe<I>>
Optional<RecipeHolder<T>> getRecipeFor
(RecipeType<T> p_44016_, I p_344358_, Level p_44018_) <I extends RecipeInput,
T extends Recipe<I>>
Optional<RecipeHolder<T>> getRecipeFor
(RecipeType<T> p_220249_, I p_344518_, Level p_220251_, ResourceLocation p_220252_) <I extends RecipeInput,
T extends Recipe<I>>
Optional<RecipeHolder<T>> getRecipeFor
(RecipeType<T> p_343647_, I p_342793_, Level p_344483_, RecipeHolder<T> p_345187_) <I extends RecipeInput,
T extends Recipe<I>>
List<RecipeHolder<T>> getRecipesFor
(RecipeType<T> p_44057_, I p_345126_, Level p_44059_) <I extends RecipeInput,
T extends Recipe<I>>
NonNullList<ItemStack> getRemainingItemsFor
(RecipeType<T> p_44070_, I p_345480_, Level p_44072_) boolean
void
replaceRecipes
(Iterable<RecipeHolder<?>> p_44025_) Methods inherited from class net.minecraft.server.packs.resources.SimpleJsonResourceReloadListener
getPreparedPath, prepare, scanDirectory
Methods inherited from class net.minecraft.server.packs.resources.SimplePreparableReloadListener
reload
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.minecraft.server.packs.resources.PreparableReloadListener
getName
-
Field Details
-
GSON
private static final com.google.gson.Gson GSON -
LOGGER
private static final org.slf4j.Logger LOGGER -
registries
-
byType
-
byName
-
hasErrors
private boolean hasErrors -
context
-
-
Constructor Details
-
RecipeManager
Deprecated.Forge: useinvalid reference
constructor with context
-
RecipeManager
-
-
Method Details
-
apply
protected void apply(Map<ResourceLocation, com.google.gson.JsonElement> p_44037_, ResourceManager p_44038_, ProfilerFiller p_44039_) - Specified by:
apply
in classSimplePreparableReloadListener<Map<ResourceLocation,
com.google.gson.JsonElement>>
-
hadErrorsLoading
public boolean hadErrorsLoading() -
getRecipeFor
public <I extends RecipeInput,T extends Recipe<I>> Optional<RecipeHolder<T>> getRecipeFor(RecipeType<T> p_44016_, I p_344358_, Level p_44018_) -
getRecipeFor
public <I extends RecipeInput,T extends Recipe<I>> Optional<RecipeHolder<T>> getRecipeFor(RecipeType<T> p_220249_, I p_344518_, Level p_220251_, @Nullable ResourceLocation p_220252_) -
getRecipeFor
public <I extends RecipeInput,T extends Recipe<I>> Optional<RecipeHolder<T>> getRecipeFor(RecipeType<T> p_343647_, I p_342793_, Level p_344483_, @Nullable RecipeHolder<T> p_345187_) -
getAllRecipesFor
public <I extends RecipeInput,T extends Recipe<I>> List<RecipeHolder<T>> getAllRecipesFor(RecipeType<T> p_44014_) -
getRecipesFor
public <I extends RecipeInput,T extends Recipe<I>> List<RecipeHolder<T>> getRecipesFor(RecipeType<T> p_44057_, I p_345126_, Level p_44059_) -
byType
private <I extends RecipeInput,T extends Recipe<I>> Collection<RecipeHolder<T>> byType(RecipeType<T> p_44055_) -
getRemainingItemsFor
public <I extends RecipeInput,T extends Recipe<I>> NonNullList<ItemStack> getRemainingItemsFor(RecipeType<T> p_44070_, I p_345480_, Level p_44072_) -
byKey
-
byKeyTyped
@Nullable private <T extends Recipe<?>> RecipeHolder<T> byKeyTyped(RecipeType<T> p_332930_, ResourceLocation p_335282_) -
getOrderedRecipes
-
getRecipes
-
getRecipeIds
-
fromJson
protected static RecipeHolder<?> fromJson(ResourceLocation p_44046_, com.google.gson.JsonObject p_44047_, HolderLookup.Provider p_328308_) -
replaceRecipes
-
createCheck
public static <I extends RecipeInput,T extends Recipe<I>> RecipeManager.CachedCheck<I,T> createCheck(RecipeType<T> p_220268_)
-
invalid reference