mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2025-07-04 00:45:57 +00:00
fix/suppress warnings
This commit is contained in:
parent
bc96006c4b
commit
a2dac6dfca
@ -19,6 +19,7 @@ public class FeatureGenerationStage implements TerraGenerationStage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@SuppressWarnings("try")
|
||||||
public void populate(World world, Chunk chunk) {
|
public void populate(World world, Chunk chunk) {
|
||||||
TerraWorld terraWorld = main.getWorld(world);
|
TerraWorld terraWorld = main.getWorld(world);
|
||||||
try(ProfileFrame ignore = main.getProfiler().profile("feature")) {
|
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.
|
toWorldConfig(new TerraWorldImpl(new DummyWorld(), this, main)); // Build now to catch any errors immediately.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
private ConfigTypeRegistry createRegistry() {
|
private ConfigTypeRegistry createRegistry() {
|
||||||
return new ConfigTypeRegistry(main, (id, configType) -> {
|
return new ConfigTypeRegistry(main, (id, configType) -> {
|
||||||
OpenRegistry<?> openRegistry = configType.registrySupplier().get();
|
OpenRegistry<?> openRegistry = configType.registrySupplier().get();
|
||||||
if(registryMap.containsKey(configType.getTypeClass())) { // Someone already registered something; we need to copy things to the new registry.
|
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);
|
registryMap.get(configType.getTypeClass()).getLeft().forEach(((OpenRegistry<Object>) openRegistry)::register);
|
||||||
}
|
}
|
||||||
selfLoader.registerLoader(configType.getTypeClass(), openRegistry);
|
selfLoader.registerLoader(configType.getTypeClass(), openRegistry);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user