mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-12 16:27:47 +00:00
Make Forge ConfigValues implement Supplier. (#8776)
This commit is contained in:
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");
|
||||
|
||||
Reference in new issue
Block a user