fix/suppress warnings

This commit is contained in:
dfsek
2021-07-17 21:59:48 -07:00
parent bc96006c4b
commit a2dac6dfca
2 changed files with 2 additions and 1 deletions

View File

@@ -189,11 +189,11 @@ public class ConfigPackImpl implements ConfigPack {
toWorldConfig(new TerraWorldImpl(new DummyWorld(), this, main)); // Build now to catch any errors immediately.
}
@SuppressWarnings("unchecked")
private ConfigTypeRegistry createRegistry() {
return new ConfigTypeRegistry(main, (id, configType) -> {
OpenRegistry<?> openRegistry = configType.registrySupplier().get();
if(registryMap.containsKey(configType.getTypeClass())) { // Someone already registered something; we need to copy things to the new registry.
//noinspection unchecked
registryMap.get(configType.getTypeClass()).getLeft().forEach(((OpenRegistry<Object>) openRegistry)::register);
}
selfLoader.registerLoader(configType.getTypeClass(), openRegistry);