use of org.blockartistry.Presets.api.ConfigurationHelper in project DynamicSurroundings by OreCruncher.
the class PresetHandler method presetLoad.
@Optional.Method(modid = "presets")
@SubscribeEvent
public static void presetLoad(@Nonnull final PresetEvent.Load event) {
final PresetData data = event.getModData(DSurround.MOD_ID);
if (data != null) {
final ConfigurationHelper helper = new ConfigurationHelper(data);
helper.load(DSurround.config(), FILTER);
DSurround.config().save();
ConfigProcessor.process(DSurround.config(), ModOptions.class);
MinecraftForge.EVENT_BUS.post(new ReloadEvent.Configuration());
}
}
use of org.blockartistry.Presets.api.ConfigurationHelper in project DynamicSurroundings by OreCruncher.
the class PresetHandler method presetSave.
@Optional.Method(modid = "presets")
@SubscribeEvent
public static void presetSave(@Nonnull final PresetEvent.Save event) {
final PresetData data = event.getModData(DSurround.MOD_ID);
final ConfigurationHelper helper = new ConfigurationHelper(data);
helper.save(DSurround.config(), FILTER);
}
Aggregations