arcadian-dream icon indicating copy to clipboard operation
arcadian-dream copied to clipboard

Replace Registries.BLOCK iteration with RegistryEntryAddedCallback usage

Open unilock opened this issue 6 months ago • 0 comments

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.

unilock avatar Aug 24 '24 14:08 unilock