File tree Expand file tree Collapse file tree 3 files changed +11
-0
lines changed
common/src/main/java/com/github/litermc/vschunkloader
fabric/src/main/java/com/github/litermc/vschunkloader
forge/src/main/java/com/github/litermc/vschunkloader Expand file tree Collapse file tree 3 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,9 @@ private VSCListeners() {}
2525
2626 public static void onModInit () {
2727 VSCRegistry .register ();
28+ }
29+
30+ public static void onModSetup () {
2831 registerAttachments ();
2932 }
3033
Original file line number Diff line number Diff line change @@ -44,5 +44,7 @@ public void onInitialize() {
4444 ServerTickEvents .END_SERVER_TICK .register (VSCListeners ::postServerTick );
4545 ServerChunkEvents .CHUNK_LOAD .register (VSCListeners ::onServerChunkLoad );
4646 ServerChunkEvents .CHUNK_UNLOAD .register (VSCListeners ::onServerChunkUnload );
47+
48+ VSCListeners .onModSetup ();
4749 }
4850}
Original file line number Diff line number Diff line change 1818import net .minecraftforge .fml .common .Mod ;
1919import net .minecraftforge .fml .config .ModConfig ;
2020import net .minecraftforge .fml .event .config .ModConfigEvent ;
21+ import net .minecraftforge .fml .event .lifecycle .FMLCommonSetupEvent ;
2122import net .minecraftforge .fml .javafmlmod .FMLJavaModLoadingContext ;
2223
2324@ Mod (Constants .MOD_ID )
@@ -31,10 +32,15 @@ public VSChunkLoaderMod() {
3132 BlockCapabilityProviders .register ();
3233
3334 context .registerConfig (ModConfig .Type .SERVER , ((ForgeConfigFile )(ConfigSpec .serverSpec )).spec ());
35+ modBus .addListener (this ::onCommonSetup );
3436 modBus .addListener (this ::onConfigLoad );
3537 modBus .addListener (this ::onConfigReload );
3638 }
3739
40+ private void onCommonSetup (final FMLCommonSetupEvent event ) {
41+ event .enqueueWork (VSCListeners ::onModSetup );
42+ }
43+
3844 @ SubscribeEvent
3945 public static void onRegisterCommands (final RegisterCommandsEvent event ) {
4046 VSCCommands .register (event .getDispatcher ());
You can’t perform that action at this time.
0 commit comments