Class DefaultFactoryProvider
java.lang.Object
net.glasslauncher.mods.api.gcapi.impl.config.factory.DefaultFactoryProvider
- All Implemented Interfaces:
ConfigFactoryProvider
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidprovideLoadFactories(com.google.common.collect.ImmutableMap.Builder<Type, NonFunction<String, String, String, Field, Object, Boolean, Object, Object, MaxLength, ConfigEntry<?>>> immutableBuilder) Return custom factories for certain config class types.voidprovideSaveFactories(com.google.common.collect.ImmutableMap.Builder<Type, Function<Object, blue.endless.jankson.JsonElement>> immutableBuilder) Return custom factories for certain config class types.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.glasslauncher.mods.api.gcapi.api.ConfigFactoryProvider
provideLoadTypeAdapterFactories
-
Constructor Details
-
DefaultFactoryProvider
public DefaultFactoryProvider()
-
-
Method Details
-
provideLoadFactories
public void provideLoadFactories(com.google.common.collect.ImmutableMap.Builder<Type, NonFunction<String, String, String, Field, Object, Boolean, Object, Object, MaxLength, ConfigEntry<?>>> immutableBuilder) Description copied from interface:ConfigFactoryProviderReturn custom factories for certain config class types.- Specified by:
provideLoadFactoriesin interfaceConfigFactoryProvider- Parameters:
immutableBuilder- Arguments for the OctFunction are: id, name, description, field, parentObject, value, multiplayerSynced, maxLength. Should return a class returning a config entry for your custom config type.
-
provideSaveFactories
public void provideSaveFactories(com.google.common.collect.ImmutableMap.Builder<Type, Function<Object, blue.endless.jankson.JsonElement>> immutableBuilder) Description copied from interface:ConfigFactoryProviderReturn custom factories for certain config class types.- Specified by:
provideSaveFactoriesin interfaceConfigFactoryProvider- Parameters:
immutableBuilder- Arguments for the Function are: value. Should return a JsonElement containing the serialized value for your custom config type.
-