Fabric API

Fabric API

106M Downloads

replace `FabricRegistryBuilder` by a registry factory

nnym opened this issue ยท 1 comments

commented

The registry built by FabricRegistryBuilder has to be cast when the required type of its entries is parameterized. A simple fix for #846 leaves T always inferred as Object , so the builder's type arguments are Object and MutableRegistry<Object>. Manually supplying the type arguments works; however, I think that such a solution is inelegant. Since the builder has a single part (registry attributes) a better solution is possible with registry factories with varargs RegistryAttribute parameters and that return SimpleRegistry<T> or DefaultedRegistry<T> for a generic type T. This would mean deprecating the registry builder.

commented

Why close?