Make Forge ConfigValues implement Supplier. (#8776)

This commit is contained in:
King Lemming authored and GitHub committed 2022-06-20 23:07:48 +01:00
1 parent d5860d7cfa
commit 05240fecf7
1 file changed
+2 -1
@@ -809,7 +809,7 @@ public class ForgeConfigSpec extends UnmodifiableConfigWrapper<UnmodifiableConfi
}
}
public static class ConfigValue<T>
public static class ConfigValue<T> implements Supplier<T>
{
private static boolean USE_CACHES = true;
@@ -842,6 +842,7 @@ public class ForgeConfigSpec extends UnmodifiableConfigWrapper<UnmodifiableConfi
* not yet been built
* @throws IllegalStateException if the associated config has not yet been loaded
*/
@Override
public T get()
{
Preconditions.checkNotNull(spec, "Cannot get config value before spec is built");