Package commoble.bagofyurting.util

# Class ConfigHelper

java.lang.Object
commoble.bagofyurting.util.ConfigHelper

public class ConfigHelper extends Object

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`static class`
`ConfigHelper.ConfigValueListener<T>`
`static class`
`ConfigHelper.Subscriber`

## Constructor Summary

Constructors
Constructor
Description
`ConfigHelper()`

## Method Summary

Modifier and Type
Method
Description
`static <T> T`
`register​(net.minecraftforge.fml.config.ModConfig.Type configType, BiFunction<net.minecraftforge.common.ForgeConfigSpec.Builder,​ConfigHelper.Subscriber,​T> configBuilder)`
as with the other register method, but the contexts are assumed
`static <T> T`
`register​(net.minecraftforge.fml.ModLoadingContext modContext, net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext fmlContext, net.minecraftforge.fml.config.ModConfig.Type configType, BiFunction<net.minecraftforge.common.ForgeConfigSpec.Builder,​ConfigHelper.Subscriber,​T> configBuilder)`
call this in either your @Mod class constructor or in FMLCommonSetupEvent or in FMLClientSetupEvent

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### ConfigHelper

public ConfigHelper()

## Method Details

### register

public static <T> T register​(net.minecraftforge.fml.config.ModConfig.Type configType, BiFunction<net.minecraftforge.common.ForgeConfigSpec.Builder,​ConfigHelper.Subscriber,​T> configBuilder)
as with the other register method, but the contexts are assumed

Type Parameters:
  `T` - the type of the config object
Parameters:
  `configType` - the forge config type (client, common, server)
  `configBuilder` - constructor to create the config object
Returns:
  the config object

### register

public static <T> T register​(net.minecraftforge.fml.ModLoadingContext modContext, net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext fmlContext, net.minecraftforge.fml.config.ModConfig.Type configType, BiFunction<net.minecraftforge.common.ForgeConfigSpec.Builder,​ConfigHelper.Subscriber,​T> configBuilder)
call this in either your @Mod class constructor or in FMLCommonSetupEvent or in FMLClientSetupEvent

Type Parameters:
  `T` - the type of the config object
Parameters:
  `modContext` - ModLoadingContext
  `fmlContext` - FMLJavaModLoadingContext
  `configType` - the forge config type (client, common, server)
  `configBuilder` - constructor for the config object
Returns:
  the config object