more addonification progress

This commit is contained in:
dfsek
2021-06-30 21:29:19 -07:00
parent 8a000137a2
commit 215a1e0e86
4 changed files with 21 additions and 10 deletions

View File

@@ -292,6 +292,11 @@ public class ConfigPackImpl implements ConfigPack {
return (CheckedRegistry<T>) registryMap.getOrDefault(clazz, ImmutablePair.ofNull()).getRight();
}
@Override
public <T> CheckedRegistry<T> getCheckedRegistry(Class<T> clazz) throws IllegalStateException {
return null;
}
@SuppressWarnings("unchecked")
protected <T> OpenRegistry<T> getOpenRegistry(Class<T> clazz) {
return (OpenRegistry<T>) registryMap.getOrDefault(clazz, ImmutablePair.ofNull()).getLeft();
@@ -323,14 +328,8 @@ public class ConfigPackImpl implements ConfigPack {
}
@Override
public CheckedRegistry<ConfigType<?, ?>> getConfigTypeRegistry() {
return new CheckedRegistryImpl<>(configTypeRegistry) {
@Override
@SuppressWarnings("deprecation")
public void addUnchecked(String identifier, ConfigType<?, ?> value) {
if(contains(identifier)) throw new UnsupportedOperationException("Cannot override values in ConfigTypeRegistry!");
}
};
public void registerConfigType(ConfigType<?, ?> type, int priority) {
}
@Override