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,
Recipe<?>> private final ICondition.IContext
private static final com.google.gson.Gson
private boolean
private static final org.slf4j.Logger
private Map<RecipeType<?>,
Map<ResourceLocation, Recipe<?>>> -
Constructor Summary
ConstructorDescriptionDeprecated.Forge: use constructor with context.RecipeManager
(ICondition.IContext context) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
apply
(Map<ResourceLocation, com.google.gson.JsonElement> p_44037_, ResourceManager p_44038_, ProfilerFiller p_44039_) byKey
(ResourceLocation p_44044_) private <C extends Container,
T extends Recipe<C>>
Map<ResourceLocation,T> byType
(RecipeType<T> p_44055_) static <C extends Container,
T extends Recipe<C>>
RecipeManager.CachedCheck<C,T> createCheck
(RecipeType<T> p_220268_) static Recipe<?>
fromJson
(ResourceLocation p_44046_, com.google.gson.JsonObject p_44047_) Deprecated.Forge: use overload with context.static Recipe<?>
fromJson
(ResourceLocation p_44046_, com.google.gson.JsonObject p_44047_, ICondition.IContext context) getAllRecipesFor
(RecipeType<T> p_44014_) getRecipeFor
(RecipeType<T> p_44016_, C p_44017_, Level p_44018_) <C extends Container,
T extends Recipe<C>>
Optional<com.mojang.datafixers.util.Pair<ResourceLocation,T>> getRecipeFor
(RecipeType<T> p_220249_, C p_220250_, Level p_220251_, ResourceLocation p_220252_) Collection<Recipe<?>>
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<Recipe<?>> 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 -
recipes
-
byName
-
hasErrors
private boolean hasErrors -
context
-
-
Constructor Details
-
RecipeManager
Deprecated.Forge: use 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<T> getRecipeFor(RecipeType<T> p_44016_, C p_44017_, Level p_44018_) -
getRecipeFor
public <C extends Container,T extends Recipe<C>> Optional<com.mojang.datafixers.util.Pair<ResourceLocation,T>> getRecipeFor(RecipeType<T> p_220249_, C p_220250_, Level p_220251_, @Nullable ResourceLocation p_220252_) -
getAllRecipesFor
-
getRecipesFor
public <C extends Container,T extends Recipe<C>> List<T> getRecipesFor(RecipeType<T> p_44057_, C p_44058_, Level p_44059_) -
byType
private <C extends Container,T extends Recipe<C>> Map<ResourceLocation,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
-
getRecipes
-
getRecipeIds
-
fromJson
@Deprecated public static Recipe<?> fromJson(ResourceLocation p_44046_, com.google.gson.JsonObject p_44047_) Deprecated.Forge: use overload with context. -
fromJson
public static Recipe<?> fromJson(ResourceLocation p_44046_, com.google.gson.JsonObject p_44047_, ICondition.IContext context) -
replaceRecipes
-
createCheck
public static <C extends Container,T extends Recipe<C>> RecipeManager.CachedCheck<C,T> createCheck(RecipeType<T> p_220268_)
-