Remove hack to force enum configs to strings
This commit is contained in:
parent
f30d7bc845
commit
cb3ff19801
1 changed files with 1 additions and 6 deletions
|
@ -362,12 +362,7 @@ public class ForgeConfigSpec extends UnmodifiableConfigWrapper<Config>
|
|||
}
|
||||
public <V extends Enum<V>> EnumValue<V> defineEnum(List<String> path, Supplier<V> defaultSupplier, EnumGetMethod converter, Predicate<Object> validator, Class<V> clazz) {
|
||||
context.setClazz(clazz);
|
||||
return new EnumValue<V>(this, define(path, new ValueSpec(defaultSupplier, validator, context) {
|
||||
@Override
|
||||
public Object correct(Object value) {
|
||||
return ((Enum<?>)super.correct(value)).name();
|
||||
}
|
||||
}, defaultSupplier).getPath(), defaultSupplier, converter, clazz);
|
||||
return new EnumValue<V>(this, define(path, new ValueSpec(defaultSupplier, validator, context), defaultSupplier).getPath(), defaultSupplier, converter, clazz);
|
||||
}
|
||||
|
||||
//boolean
|
||||
|
|
Loading…
Reference in a new issue