mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2025-07-04 00:45:57 +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
|
@FunctionalInterface
|
||||||
public interface ConfigType<T extends ConfigTemplate> {
|
public interface ConfigType<T extends ConfigTemplate> {
|
||||||
T getTemplate(ConfigPack pack, TerraPlugin main);
|
T getTemplate(ConfigPack pack, TerraPlugin main);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -34,8 +34,12 @@ public class ConfigTypeRegistry extends OpenRegistry<ConfigType<?>> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("deprecation")
|
@SuppressWarnings("deprecation")
|
||||||
private <T extends AbstractableTemplate, O> T load(CheckedRegistry<O> registry, T object, ConfigFactory<T, O> factory, TerraPlugin main) throws LoadException {
|
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));
|
registry.addUnchecked(object.getID(), factory.build(object, main));
|
||||||
|
} catch(LoadException e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
return object;
|
return object;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user