Package net.minecraftforge.common.data
Class GlobalLootModifierProvider
java.lang.Object
net.minecraftforge.common.data.GlobalLootModifierProvider
- All Implemented Interfaces:
- DataProvider
Provider for forge's GlobalLootModifier system. See 
LootModifier
 This provider only requires implementing start() and calling add(java.lang.String, T) from it.- 
Nested Class SummaryNested classes/interfaces inherited from interface net.minecraft.data.DataProviderDataProvider.Factory<T extends DataProvider>
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate static final com.google.gson.Gsonprivate final Stringprivate final PackOutputprivate booleanFields inherited from interface net.minecraft.data.DataProviderFIXED_ORDER_FIELDS, KEY_COMPARATOR, LOGGER
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescription<T extends IGlobalLootModifier>
 voidPasses in the data needed to create the file without any extra objects.getName()protected voidSets the "replace" key in global_loot_modifiers to true.run(CachedOutput cache) protected abstract voidstart()Calladd(java.lang.String, T)here, which will pass in the necessary information to write the jsons.
- 
Field Details- 
GSONprivate static final com.google.gson.Gson GSON
- 
output
- 
modid
- 
toSerialize
- 
replaceprivate boolean replace
 
- 
- 
Constructor Details- 
GlobalLootModifierProvider
 
- 
- 
Method Details- 
replacingprotected void replacing()Sets the "replace" key in global_loot_modifiers to true.
- 
startprotected abstract void start()Calladd(java.lang.String, T)here, which will pass in the necessary information to write the jsons.
- 
run- Specified by:
- runin interface- DataProvider
 
- 
addPasses in the data needed to create the file without any extra objects.- Parameters:
- modifier- The name of the modifier, which will be the file name.
- instance- The instance to serialize
 
- 
getName- Specified by:
- getNamein interface- DataProvider
 
 
-