tryGet -> getFromID

This commit is contained in:
dfsek
2021-12-25 01:04:50 -07:00
parent 2b92e2e73b
commit e1a6cdb484
11 changed files with 23 additions and 33 deletions
@@ -4,8 +4,6 @@ import com.dfsek.tectonic.api.exception.LoadException;
import com.dfsek.tectonic.api.loader.ConfigLoader;
import com.dfsek.tectonic.api.loader.type.TypeLoader;
import com.dfsek.terra.api.registry.key.RegistryKey;
import org.jetbrains.annotations.NotNull;
import java.lang.reflect.AnnotatedType;
@@ -26,7 +24,7 @@ public class BiomeDelegateLoader implements TypeLoader<BiomeDelegate> {
public BiomeDelegate load(@NotNull AnnotatedType t, @NotNull Object c, @NotNull ConfigLoader loader) throws LoadException {
if(c.equals("SELF")) return BiomeDelegate.self();
return biomeRegistry
.tryGet((String) c)
.getFromID((String) c)
.map(BiomeDelegate::from)
.orElseGet(() -> BiomeDelegate.ephemeral((String) c));
}