Fix CraterLib events registration order. Some Events fire before they are registered

This commit is contained in:
2022-08-06 23:38:01 +02:00
parent e4415edf46
commit 8fd979e38a
3 changed files with 12 additions and 5 deletions

View File

@@ -16,10 +16,12 @@ import net.minecraft.client.renderer.ItemBlockRenderTypes;
public class ClientRegistration {
public void registerAll() {
Services.CLIENT_HELPER.registerCustomRenderTypes(HLBlocks.BLOCKS.getEntries(), HLItems.ITEMS.getEntries());
}
public void registerEvents() {
CraterEventBus.register(ColorRegistrationEvent.BLOCKS.class, this::registerBlockColors);
CraterEventBus.register(ColorRegistrationEvent.ITEMS.class, this::registerItemColors);
Services.CLIENT_HELPER.registerCustomRenderTypes(HLBlocks.BLOCKS.getEntries(), HLItems.ITEMS.getEntries());
}
public void registerBlockColors(ColorRegistrationEvent.BLOCKS event) {