类 RecipePrioritiesProvider
java.lang.Object
net.neoforged.neoforge.common.data.RecipePrioritiesProvider
- 所有已实现的接口:
DataProvider
Data Provider class for generating the recipe_priorities.json file and adding recipe priority overrides to it.
These overrides allow a specified recipe to be given a certain load priority relative to another recipe, by providing the recipe ID and the integer representing the priority.
All recipes are treated with a priority of 0 by default. Recipes assigned with higher priority values will take precedent over lower priority values when choosing what recipe result to provide in a crafting block.
E.g. A recipe given the priority of 1 that has matching ingredients to a recipe with a priority of 0 will output its result instead of the result of the recipe with priority 0.
-
嵌套类概要
从接口继承的嵌套类/接口 net.minecraft.data.DataProvider
DataProvider.Factory<T extends DataProvider>
-
字段概要
字段修饰符和类型字段说明private final String
private final PackOutput
protected HolderLookup.Provider
private final CompletableFuture
<HolderLookup.Provider> private boolean
private final Map
<ResourceLocation, Integer> 从接口继承的字段 net.minecraft.data.DataProvider
FIXED_ORDER_FIELDS, INDENT_WIDTH, KEY_COMPARATOR, LOGGER
-
构造器概要
构造器构造器说明RecipePrioritiesProvider
(PackOutput output, CompletableFuture<HolderLookup.Provider> registries, String modid) -
方法概要
修饰符和类型方法说明void
void
add
(ResourceKey<Recipe> recipe, int priority) void
add
(ResourceLocation recipe, int priority) getName()
protected void
Sets the "replace" key in recipe_priorities to true.final CompletableFuture
<?> run
(CachedOutput cache) protected CompletableFuture
<?> run
(CachedOutput cache, HolderLookup.Provider registries) protected abstract void
start()
Calladd(net.minecraft.resources.ResourceLocation, int)
here, which will pass in the necessary information to write the jsons.
-
字段详细资料
-
output
-
registriesLookup
-
registries
-
modid
-
toSerialize
-
replace
private boolean replace
-
-
构造器详细资料
-
RecipePrioritiesProvider
public RecipePrioritiesProvider(PackOutput output, CompletableFuture<HolderLookup.Provider> registries, String modid)
-
-
方法详细资料
-
replacing
protected void replacing()Sets the "replace" key in recipe_priorities to true. -
start
protected abstract void start()Calladd(net.minecraft.resources.ResourceLocation, int)
here, which will pass in the necessary information to write the jsons. -
run
- 指定者:
run
在接口中DataProvider
-
run
-
add
-
add
-
add
-
getName
- 指定者:
getName
在接口中DataProvider
-