arcadian-dream
arcadian-dream copied to clipboard
Replace Registries.BLOCK iteration with RegistryEntryAddedCallback usage
This cuts down world loading time by nearly two minutes in my very large Fabric 1.20.1 modpack.
LEAVES_LOOT_TABLES
has to be in a separate class as to not accidentally classload everything. It also includes Minecraft's leaves by default, since the RegistryEntryAddedCallback
listener wouldn't pick those up for some reason.
A silly mixin is used in order to make sure the RegistryEntryAddedCallback
listener is registered before all other mods are initialized and start registering their blocks. Blame Fabric for not having a reliable mod loading order.
Tested and working.