Closed Gegy closed 1 year ago
We can now use Fabric API 0.86.1+ for registering dynamic registries:
import net.fabricmc.fabric.api.event.registry.DynamicRegistries;
import net.minecraft.registry.Registry;
import net.minecraft.registry.RegistryKey;
public class MyRegistryKeys {
public static final RegistryKey<Registry<Bar>> BAR = RegistryKey.ofRegistry(new Identifier("foo", "bar"));
public static void register() {
DynamicRegistries.register(BAR, Bar.CODEC);
}
}
This PR can now target staging/0.6
and be merged maybe?
Why are game portals still managed by their own class rather than a dynamic registry?
No specific reason here - definitely something that can and should be done, just needs a bit more work than configs 🙂
Okay then let's leave that to another PR I think But we might want to get it in 0.6 too
Also as a side note: using FAPI dynamic resistry will have to make us move all data/games
folders to data/plasmid/games
Draft for now, to be integrated with a future breaking release.