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
Nested classes/interfaces inherited from interface net.minecraft.server.packs.resources.PreparableReloadListener
PreparableReloadListener.PreparationBarrier
-
Field Summary
Modifier and TypeFieldDescriptionprivate static com.google.gson.Gson
private boolean
private static org.apache.logging.log4j.Logger
private Map<RecipeType<?>,Map<ResourceLocation,Recipe<?>>>
-
Constructor Summary
-
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,Recipe<C>>byType(RecipeType<T> p_44055_)
static Recipe<?>
fromJson(ResourceLocation p_44046_, com.google.gson.JsonObject p_44047_)
getAllRecipesFor(RecipeType<T> p_44014_)
getRecipeFor(RecipeType<T> p_44016_, C p_44017_, Level p_44018_)
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
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.apache.logging.log4j.Logger LOGGER -
recipes
-
hasErrors
private boolean hasErrors
-
-
Constructor Details
-
RecipeManager
public 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_) -
getAllRecipesFor
public <C extends Container, T extends Recipe<C>> List<T> getAllRecipesFor(RecipeType<T> p_44014_) -
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,Recipe<C>> 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
-
replaceRecipes
-