类 GlobalLootModifierProvider
java.lang.Object
net.neoforged.neoforge.common.data.GlobalLootModifierProvider
- 所有已实现的接口:
DataProvider
Provider for forge's GlobalLootModifier system. See
LootModifier
This provider only requires implementing start()
and calling add(java.lang.String, T, java.util.List<net.neoforged.neoforge.common.conditions.ICondition>)
from it.-
嵌套类概要
从接口继承的嵌套类/接口 net.minecraft.data.DataProvider
DataProvider.Factory<T extends DataProvider>
-
字段概要
字段修饰符和类型字段说明private static final com.google.gson.Gson
private final String
private final PackOutput
protected HolderLookup.Provider
private final CompletableFuture
<HolderLookup.Provider> private boolean
private final Map
<String, WithConditions<IGlobalLootModifier>> 从接口继承的字段 net.minecraft.data.DataProvider
FIXED_ORDER_FIELDS, INDENT_WIDTH, KEY_COMPARATOR, LOGGER
-
构造器概要
构造器构造器说明GlobalLootModifierProvider
(PackOutput output, CompletableFuture<HolderLookup.Provider> registries, String modid) -
方法概要
修饰符和类型方法说明<T extends IGlobalLootModifier>
voidadd
(String modifier, T instance, List<ICondition> conditions) Passes in the data needed to create the file without any extra objects.<T extends IGlobalLootModifier>
voidadd
(String modifier, T instance, ICondition... conditions) Passes in the data needed to create the file without any extra objects.getName()
protected void
Sets the "replace" key in global_loot_modifiers to true.final CompletableFuture
<?> run
(CachedOutput cache) protected CompletableFuture
<?> run
(CachedOutput cache, HolderLookup.Provider registries) protected abstract void
start()
Calladd(java.lang.String, T, java.util.List<net.neoforged.neoforge.common.conditions.ICondition>)
here, which will pass in the necessary information to write the jsons.
-
字段详细资料
-
GSON
private static final com.google.gson.Gson GSON -
output
-
registriesLookup
-
registries
-
modid
-
toSerialize
-
replace
private boolean replace
-
-
构造器详细资料
-
GlobalLootModifierProvider
public GlobalLootModifierProvider(PackOutput output, CompletableFuture<HolderLookup.Provider> registries, String modid)
-
-
方法详细资料
-
replacing
protected void replacing()Sets the "replace" key in global_loot_modifiers to true. -
start
protected abstract void start()Calladd(java.lang.String, T, java.util.List<net.neoforged.neoforge.common.conditions.ICondition>)
here, which will pass in the necessary information to write the jsons. -
run
- 指定者:
run
在接口中DataProvider
-
run
-
add
public <T extends IGlobalLootModifier> void add(String modifier, T instance, List<ICondition> conditions) Passes in the data needed to create the file without any extra objects.- 参数:
modifier
- the name of the modifier, which will be the file nameinstance
- the instance to serializeconditions
- a list of conditions to add to the GLM file
-
add
public <T extends IGlobalLootModifier> void add(String modifier, T instance, ICondition... conditions) Passes in the data needed to create the file without any extra objects.- 参数:
modifier
- the name of the modifier, which will be the file nameinstance
- the instance to serializeconditions
- a list of conditions to add to the GLM file
-
getName
- 指定者:
getName
在接口中DataProvider
-