mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2025-07-03 16:35:50 +00:00
fix/suppress warnings
This commit is contained in:
parent
bc96006c4b
commit
a2dac6dfca
@ -19,6 +19,7 @@ public class FeatureGenerationStage implements TerraGenerationStage {
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("try")
|
||||
public void populate(World world, Chunk chunk) {
|
||||
TerraWorld terraWorld = main.getWorld(world);
|
||||
try(ProfileFrame ignore = main.getProfiler().profile("feature")) {
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user