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
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 <C extends Container,
T extends Recipe<C>>
Collection<RecipeHolder<T>> byType
(RecipeType<T> p_44055_) static <C extends Container,
T extends Recipe<C>>
RecipeManager.CachedCheck<C, T> createCheck
(RecipeType<T> p_220268_) protected static RecipeHolder
<?> fromJson
(ResourceLocation p_44046_, com.google.gson.JsonObject p_44047_, HolderLookup.Provider p_328308_) <C extends Container,
T extends Recipe<C>>
List<RecipeHolder<T>> getAllRecipesFor
(RecipeType<T> p_44014_) <C extends Container,
T extends Recipe<C>>
Optional<RecipeHolder<T>> getRecipeFor
(RecipeType<T> p_44016_, C p_44017_, Level p_44018_) <C extends Container,
T extends Recipe<C>>
Optional<RecipeHolder<T>> getRecipeFor
(RecipeType<T> p_220249_, C p_220250_, Level p_220251_, ResourceLocation p_220252_) <C extends Container,
T extends Recipe<C>>
List<RecipeHolder<T>> getRecipesFor
(RecipeType<T> p_44057_, C p_44058_, Level p_44059_) <C extends Container,
T extends Recipe<C>>
NonNullList<ItemStack> getRemainingItemsFor
(RecipeType<T> p_44070_, C p_44071_, 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 <C extends Container,T extends Recipe<C>> Optional<RecipeHolder<T>> getRecipeFor(RecipeType<T> p_44016_, C p_44017_, Level p_44018_) -
getRecipeFor
public <C extends Container,T extends Recipe<C>> Optional<RecipeHolder<T>> getRecipeFor(RecipeType<T> p_220249_, C p_220250_, Level p_220251_, @Nullable ResourceLocation p_220252_) -
getAllRecipesFor
public <C extends Container,T extends Recipe<C>> List<RecipeHolder<T>> getAllRecipesFor(RecipeType<T> p_44014_) -
getRecipesFor
public <C extends Container,T extends Recipe<C>> List<RecipeHolder<T>> getRecipesFor(RecipeType<T> p_44057_, C p_44058_, Level p_44059_) -
byType
private <C extends Container,T extends Recipe<C>> Collection<RecipeHolder<T>> byType(RecipeType<T> p_44055_) -
getRemainingItemsFor
public <C extends Container,T extends Recipe<C>> NonNullList<ItemStack> getRemainingItemsFor(RecipeType<T> p_44070_, C p_44071_, 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 <C extends Container,T extends Recipe<C>> RecipeManager.CachedCheck<C,T> createCheck(RecipeType<T> p_220268_)
-
invalid reference