类 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
- 所有已实现的接口:
PreparableReloadListener
-
嵌套类概要
嵌套类从接口继承的嵌套类/接口 net.minecraft.server.packs.resources.PreparableReloadListener
PreparableReloadListener.PreparationBarrier
-
字段概要
字段修饰符和类型字段说明private 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<?>>> -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明protected void
apply
(Map<ResourceLocation, com.google.gson.JsonElement> pObject, ResourceManager pResourceManager, ProfilerFiller pProfiler) byKey
(ResourceLocation pRecipeId) private <C extends Container,
T extends Recipe<C>>
Map<ResourceLocation,T> byType
(RecipeType<T> pRecipeType) static <C extends Container,
T extends Recipe<C>>
RecipeManager.CachedCheck<C,T> createCheck
(RecipeType<T> pRecipeType) static Recipe<?>
fromJson
(ResourceLocation pRecipeId, com.google.gson.JsonObject pJson) 已过时。Forge: use overload with context.static Recipe<?>
fromJson
(ResourceLocation pRecipeId, com.google.gson.JsonObject pJson, ICondition.IContext context) getAllRecipesFor
(RecipeType<T> pRecipeType) getRecipeFor
(RecipeType<T> pRecipeType, C pInventory, Level pLevel) <C extends Container,
T extends Recipe<C>>
Optional<com.mojang.datafixers.util.Pair<ResourceLocation,T>> getRecipeFor
(RecipeType<T> pRecipeType, C pInventory, Level pLevel, ResourceLocation pLastRecipe) Collection<Recipe<?>>
getRecipesFor
(RecipeType<T> pRecipeType, C pInventory, Level pLevel) <C extends Container,
T extends Recipe<C>>
NonNullList<ItemStack>getRemainingItemsFor
(RecipeType<T> pRecipeType, C pInventory, Level pLevel) boolean
void
replaceRecipes
(Iterable<Recipe<?>> pRecipes) 从类继承的方法 net.minecraft.server.packs.resources.SimpleJsonResourceReloadListener
getPreparedPath, prepare, scanDirectory
从类继承的方法 net.minecraft.server.packs.resources.SimplePreparableReloadListener
reload
从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
从接口继承的方法 net.minecraft.server.packs.resources.PreparableReloadListener
getName
-
字段详细资料
-
GSON
private static final com.google.gson.Gson GSON -
LOGGER
private static final org.slf4j.Logger LOGGER -
recipes
-
byName
-
hasErrors
private boolean hasErrors -
context
-
-
构造器详细资料
-
RecipeManager
已过时。Forge: use constructor with context. -
RecipeManager
-
-
方法详细资料
-
apply
protected void apply(Map<ResourceLocation, com.google.gson.JsonElement> pObject, ResourceManager pResourceManager, ProfilerFiller pProfiler) - 指定者:
apply
在类中SimplePreparableReloadListener<Map<ResourceLocation,
com.google.gson.JsonElement>>
-
hadErrorsLoading
public boolean hadErrorsLoading() -
getRecipeFor
public <C extends Container,T extends Recipe<C>> Optional<T> getRecipeFor(RecipeType<T> pRecipeType, C pInventory, Level pLevel) -
getRecipeFor
public <C extends Container,T extends Recipe<C>> Optional<com.mojang.datafixers.util.Pair<ResourceLocation,T>> getRecipeFor(RecipeType<T> pRecipeType, C pInventory, Level pLevel, @Nullable ResourceLocation pLastRecipe) -
getAllRecipesFor
public <C extends Container,T extends Recipe<C>> List<T> getAllRecipesFor(RecipeType<T> pRecipeType) -
getRecipesFor
public <C extends Container,T extends Recipe<C>> List<T> getRecipesFor(RecipeType<T> pRecipeType, C pInventory, Level pLevel) -
byType
private <C extends Container,T extends Recipe<C>> Map<ResourceLocation,T> byType(RecipeType<T> pRecipeType) -
getRemainingItemsFor
public <C extends Container,T extends Recipe<C>> NonNullList<ItemStack> getRemainingItemsFor(RecipeType<T> pRecipeType, C pInventory, Level pLevel) -
byKey
-
getRecipes
-
getRecipeIds
-
fromJson
@Deprecated public static Recipe<?> fromJson(ResourceLocation pRecipeId, com.google.gson.JsonObject pJson) 已过时。Forge: use overload with context. -
fromJson
public static Recipe<?> fromJson(ResourceLocation pRecipeId, com.google.gson.JsonObject pJson, ICondition.IContext context) -
replaceRecipes
-
createCheck
public static <C extends Container,T extends Recipe<C>> RecipeManager.CachedCheck<C,T> createCheck(RecipeType<T> pRecipeType)
-