Package net.minecraft.item.crafting
Class RecipeManager
- java.lang.Object
-
- net.minecraft.client.resources.ReloadListener<java.util.Map<ResourceLocation,com.google.gson.JsonElement>>
-
- net.minecraft.client.resources.JsonReloadListener
-
- net.minecraft.item.crafting.RecipeManager
-
- All Implemented Interfaces:
IFutureReloadListener
public class RecipeManager extends JsonReloadListener
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.minecraft.resources.IFutureReloadListener
IFutureReloadListener.IStage
-
-
Field Summary
Fields Modifier and Type Field Description private static com.google.gson.Gson
GSON
private boolean
hasErrors
private static org.apache.logging.log4j.Logger
LOGGER
private java.util.Map<IRecipeType<?>,java.util.Map<ResourceLocation,IRecipe<?>>>
recipes
-
Constructor Summary
Constructors Constructor Description RecipeManager()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
apply(java.util.Map<ResourceLocation,com.google.gson.JsonElement> p_212853_1_, IResourceManager p_212853_2_, IProfiler p_212853_3_)
java.util.Optional<? extends IRecipe<?>>
byKey(ResourceLocation p_215367_1_)
private <C extends IInventory,T extends IRecipe<C>>
java.util.Map<ResourceLocation,IRecipe<C>>byType(IRecipeType<T> p_215366_1_)
static IRecipe<?>
fromJson(ResourceLocation p_215377_0_, com.google.gson.JsonObject p_215377_1_)
<C extends IInventory,T extends IRecipe<C>>
java.util.List<T>getAllRecipesFor(IRecipeType<T> p_241447_1_)
<C extends IInventory,T extends IRecipe<C>>
java.util.Optional<T>getRecipeFor(IRecipeType<T> p_215371_1_, C p_215371_2_, World p_215371_3_)
java.util.stream.Stream<ResourceLocation>
getRecipeIds()
java.util.Collection<IRecipe<?>>
getRecipes()
<C extends IInventory,T extends IRecipe<C>>
java.util.List<T>getRecipesFor(IRecipeType<T> p_215370_1_, C p_215370_2_, World p_215370_3_)
<C extends IInventory,T extends IRecipe<C>>
NonNullList<ItemStack>getRemainingItemsFor(IRecipeType<T> p_215369_1_, C p_215369_2_, World p_215369_3_)
void
replaceRecipes(java.lang.Iterable<IRecipe<?>> p_223389_1_)
-
Methods inherited from class net.minecraft.client.resources.JsonReloadListener
getPreparedPath, prepare
-
Methods inherited from class net.minecraft.client.resources.ReloadListener
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.resources.IFutureReloadListener
getName
-
-
-
-
Field Detail
-
GSON
private static final com.google.gson.Gson GSON
-
LOGGER
private static final org.apache.logging.log4j.Logger LOGGER
-
recipes
private java.util.Map<IRecipeType<?>,java.util.Map<ResourceLocation,IRecipe<?>>> recipes
-
hasErrors
private boolean hasErrors
-
-
Method Detail
-
apply
protected void apply(java.util.Map<ResourceLocation,com.google.gson.JsonElement> p_212853_1_, IResourceManager p_212853_2_, IProfiler p_212853_3_)
- Specified by:
apply
in classReloadListener<java.util.Map<ResourceLocation,com.google.gson.JsonElement>>
-
getRecipeFor
public <C extends IInventory,T extends IRecipe<C>> java.util.Optional<T> getRecipeFor(IRecipeType<T> p_215371_1_, C p_215371_2_, World p_215371_3_)
-
getAllRecipesFor
public <C extends IInventory,T extends IRecipe<C>> java.util.List<T> getAllRecipesFor(IRecipeType<T> p_241447_1_)
-
getRecipesFor
public <C extends IInventory,T extends IRecipe<C>> java.util.List<T> getRecipesFor(IRecipeType<T> p_215370_1_, C p_215370_2_, World p_215370_3_)
-
byType
private <C extends IInventory,T extends IRecipe<C>> java.util.Map<ResourceLocation,IRecipe<C>> byType(IRecipeType<T> p_215366_1_)
-
getRemainingItemsFor
public <C extends IInventory,T extends IRecipe<C>> NonNullList<ItemStack> getRemainingItemsFor(IRecipeType<T> p_215369_1_, C p_215369_2_, World p_215369_3_)
-
byKey
public java.util.Optional<? extends IRecipe<?>> byKey(ResourceLocation p_215367_1_)
-
getRecipes
public java.util.Collection<IRecipe<?>> getRecipes()
-
getRecipeIds
public java.util.stream.Stream<ResourceLocation> getRecipeIds()
-
fromJson
public static IRecipe<?> fromJson(ResourceLocation p_215377_0_, com.google.gson.JsonObject p_215377_1_)
-
replaceRecipes
public void replaceRecipes(java.lang.Iterable<IRecipe<?>> p_223389_1_)
-
-