mirror of
https://github.com/TeamMidnightDust/MidnightLib.git
synced 2025-12-15 17:05:09 +01:00
Run command registration after main method
- Fixes commands being missing for certain mods - Possibly fix #67
This commit is contained in:
@@ -24,7 +24,7 @@ public class MidnightLibNeoForge {
|
||||
|
||||
public MidnightLibNeoForge() {
|
||||
if (FMLEnvironment.dist == Dist.CLIENT) MidnightLib.onInitializeClient();
|
||||
MidnightLib.onInitialize();
|
||||
MidnightLib.registerAutoCommand();
|
||||
}
|
||||
|
||||
@EventBusSubscriber(modid = "midnightlib", bus = EventBusSubscriber.Bus.MOD, value = Dist.CLIENT)
|
||||
@@ -39,8 +39,8 @@ public class MidnightLibNeoForge {
|
||||
}
|
||||
}
|
||||
|
||||
@EventBusSubscriber(modid = "midnightlib", value = Dist.DEDICATED_SERVER)
|
||||
public static class MidnightLibServerEvents {
|
||||
@EventBusSubscriber(modid = "midnightlib")
|
||||
public static class MidnightLibEvents {
|
||||
@SubscribeEvent
|
||||
public static void registerCommands(RegisterCommandsEvent event) {
|
||||
commands.forEach(command -> event.getDispatcher().register(command));
|
||||
|
||||
Reference in New Issue
Block a user