Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

Greetings,

 

I've been helping TheBoo fix a recipe mod but the mod gets loaded too early so it can't validate item IDs from other mods.

 

Is there any event or method that will delay a mod? I've looked at the event system but couldn't see anything that deals with server loading.

 

Thanks!

 

 

Edit: Links to the original thread...

 

http://www.minecraftforum.net/topic/1504359-151-theboos-mods-craftable-spawners-custom-recipes-and-super-slopes/page__st__240#entry22087354

 

http://www.minecraftforum.net/topic/1504359-151-theboos-mods-craftable-spawners-custom-recipes-and-super-slopes/page__st__260#entry22091817

 

http://www.minecraftforum.net/topic/1504359-151-theboos-mods-craftable-spawners-custom-recipes-and-super-slopes/page__st__260#entry22093408

 

  • Author

Greetings,

 

I've been helping TheBoo fix a recipe mod but the mod gets loaded too early so it can't validate item IDs from other mods.

 

Is there any event or method that will delay a mod? I've looked at the event system but couldn't see anything that deals with server loading.

 

Thanks!

 

 

Edit: Links to the original thread...

 

http://www.minecraftforum.net/topic/1504359-151-theboos-mods-craftable-spawners-custom-recipes-and-super-slopes/page__st__240#entry22087354

 

http://www.minecraftforum.net/topic/1504359-151-theboos-mods-craftable-spawners-custom-recipes-and-super-slopes/page__st__260#entry22091817

 

http://www.minecraftforum.net/topic/1504359-151-theboos-mods-craftable-spawners-custom-recipes-and-super-slopes/page__st__260#entry22093408

 

  • Author

Check out the mcmod.info file. You can specify dependencies so your mod is loaded afterwards

https://github.com/MinecraftForge/FML/wiki/FML-mod-information-file

 

The dependencies file unfortunately won't work because there's no way to tell which mods a user has at any given time.

 

This recipe mod really needs to be loaded absolutely last so it can check item and block IDs that are added by other, unrelated mods.

  • Author

Check out the mcmod.info file. You can specify dependencies so your mod is loaded afterwards

https://github.com/MinecraftForge/FML/wiki/FML-mod-information-file

 

The dependencies file unfortunately won't work because there's no way to tell which mods a user has at any given time.

 

This recipe mod really needs to be loaded absolutely last so it can check item and block IDs that are added by other, unrelated mods.

I assume you're working with specifics mods though...? You're not just loading random mods the user has and creating random recipes no (I know you may have creative usages but I can't think of anything atm)? :P

 

Also, if say you're adding additional recipes for something if the user has say mod X and Y installed, if you read it's not totally clear (and I haven't had to do this) but it separates required and depdendant mods. So you can have a "soft dependency" which won't break if it doesn't exist but the dependency will load first if it exists.

I assume you're working with specifics mods though...? You're not just loading random mods the user has and creating random recipes no (I know you may have creative usages but I can't think of anything atm)? :P

 

Also, if say you're adding additional recipes for something if the user has say mod X and Y installed, if you read it's not totally clear (and I haven't had to do this) but it separates required and depdendant mods. So you can have a "soft dependency" which won't break if it doesn't exist but the dependency will load first if it exists.

  • Author

I assume you're working with specifics mods though...? You're not just loading random mods the user has and creating random recipes no (I know you may have creative usages but I can't think of anything atm)? :P

 

That's exactly what the mod does.

 

It allows the user to create text files with alternative recipes, for example:

 

shaped (stick / stick / stick, coal / coal / coal, wood / wood / wood ) > (wool, 1)

 

and it works fine with default items. The issue is if the user puts an item from a mod then the recipe has a chance to error if the mod hasn't been loaded yet.

 

Since I don't have any foreknowledge of wether a user will have items: "bigBlock" or "wetLeaves", I can't use the mod dependency file. I need some way to delay loading the mod.

 

I did find FMLClientHandler.finishMinecraftLoading() but I haven't been able to hook into it.

  • Author

I assume you're working with specifics mods though...? You're not just loading random mods the user has and creating random recipes no (I know you may have creative usages but I can't think of anything atm)? :P

 

That's exactly what the mod does.

 

It allows the user to create text files with alternative recipes, for example:

 

shaped (stick / stick / stick, coal / coal / coal, wood / wood / wood ) > (wool, 1)

 

and it works fine with default items. The issue is if the user puts an item from a mod then the recipe has a chance to error if the mod hasn't been loaded yet.

 

Since I don't have any foreknowledge of wether a user will have items: "bigBlock" or "wetLeaves", I can't use the mod dependency file. I need some way to delay loading the mod.

 

I did find FMLClientHandler.finishMinecraftLoading() but I haven't been able to hook into it.

  • Author

I also found this:

 

  @Mod.ServerStarted
  public void serverStarted(FMLServerStartedEvent event)
  {
      System.out.println("@ServerStarted");
  }

 

I put a breakpoint on that println() and it never gets called. According to the comments, ServerStarted is supposed to be called after the server is running but I guess it doesn't include the integrated server.

 

  • Author

I also found this:

 

  @Mod.ServerStarted
  public void serverStarted(FMLServerStartedEvent event)
  {
      System.out.println("@ServerStarted");
  }

 

I put a breakpoint on that println() and it never gets called. According to the comments, ServerStarted is supposed to be called after the server is running but I guess it doesn't include the integrated server.

 

  • Author

Well, it looks like Mod.PostInit delays it long enough.

 

I couldn't test it in MCP because I didn't have other deobfuscated mods to add but it seems to work with a "live" version of Minecraft.

  • Author

Well, it looks like Mod.PostInit delays it long enough.

 

I couldn't test it in MCP because I didn't have other deobfuscated mods to add but it seems to work with a "live" version of Minecraft.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.