structure configtype impl

This commit is contained in:
dfsek
2021-11-20 12:44:32 -07:00
parent 5d3afcc82c
commit c79ce49e4d
6 changed files with 8 additions and 6 deletions

View File

@@ -15,7 +15,9 @@ import com.dfsek.terra.api.util.reflection.TypeKey;
public interface ConfigType<T extends AbstractableTemplate, R> {
Supplier<OpenRegistry<R>> registrySupplier(ConfigPack pack);
default Supplier<OpenRegistry<R>> registrySupplier(ConfigPack pack) {
return pack.getRegistryFactory()::create;
}
T getTemplate(ConfigPack pack, Platform platform);