Jump to content

Recommended Posts

Posted

Is there a way, with Forge, to detect which mods are installed? I'd like to try to make a mod that detects if the client has Optifine installed and decide based on that whether to use HD textures or not.

 

Something along the lines of:

//psuedocode
public String getTextureFile() {
   if (client has Optifine) {
      return "hdterrain.png";
   } else {
      return "terrain.png";
   }
}

Posted

Well, first, Lex is gonna flip at the mention of optifine.

Second, I think there's a method like <MainFMLClassthing>.isModLoaded(...) or something.

 

So, what would happen if I did push that shiny red button over there? ... Really? ... Can I try it? ... Damn.

Posted
  On 9/14/2012 at 8:46 PM, atrain99 said:
Well, first, Lex is gonna flip at the mention of optifine.

Why would I do that? Optifine is the good one, MCPatcher is the shit one.

But yes, FML detects optifine and sticks a fake mod container in there so people can detect it as a mod.

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

Posted

So, am I looking in the wrong class/method?

 

I have this in my block class:

 

  Reveal hidden contents

 

 

And I am getting this stack trace:

 

  Reveal hidden contents

 

 

But I know I have Optifine installed (and working), as shown here:

 

  Reveal hidden contents

 

 

And yes, I know I'm a few builds behind on Forge :P

 

What am I doing wrong?

Posted
  On 9/14/2012 at 10:46 PM, LexManos said:

  Quote
Well, first, Lex is gonna flip at the mention of optifine.

Why would I do that? Optifine is the good one, MCPatcher is the shit one.

But yes, FML detects optifine and sticks a fake mod container in there so people can detect it as a mod.

Oh.

I get the two mixed up sometimes, and I wans't really awake...

Anyway, that's a pretty easy way to detect mods.

So, what would happen if I did push that shiny red button over there? ... Really? ... Can I try it? ... Damn.

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...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

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