mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2025-07-03 08:25:31 +00:00
fix unhandled exception
This commit is contained in:
parent
e6931a53d6
commit
f756ebef44
@ -7,5 +7,4 @@ import com.dfsek.terra.config.pack.ConfigPack;
|
||||
@FunctionalInterface
|
||||
public interface ConfigType<T extends ConfigTemplate> {
|
||||
T getTemplate(ConfigPack pack, TerraPlugin main);
|
||||
|
||||
}
|
||||
|
@ -34,8 +34,12 @@ public class ConfigTypeRegistry extends OpenRegistry<ConfigType<?>> {
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
private <T extends AbstractableTemplate, O> T load(CheckedRegistry<O> registry, T object, ConfigFactory<T, O> factory, TerraPlugin main) throws LoadException {
|
||||
registry.addUnchecked(object.getID(), factory.build(object, main));
|
||||
private <T extends AbstractableTemplate, O> T load(CheckedRegistry<O> registry, T object, ConfigFactory<T, O> factory, TerraPlugin main) {
|
||||
try {
|
||||
registry.addUnchecked(object.getID(), factory.build(object, main));
|
||||
} catch(LoadException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
return object;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user