Jump to content

[Solved] In-Code mcmod.info, Loading Mod Last, and AccessModifiers


Recommended Posts

Posted

I know there is a way to do it, I've been googleing and searching for hours for the answer...

 

Also, how do i force a mod to be loaded last?

 

This is what i currently have( Of course its all fake stuff ;) ):

 

public ModContainer()
   {
      super(new ModMetadata());
      ModMetadata mcModInfo = super.getMetadata();
      mcModInfo.modId = "MyModId";
      mcModInfo.name = "RANDOM";
      mcModInfo.version = "201354.0213";
      mcModInfo.url = "lo.l.com";
      mcModInfo.authorList = Arrays.asList(new String[] { "HTRIDEP:J" });
      mcModInfo.description = "A Mod...";
   }

 

If anyone knows how, please tell me.

 

Please, Please, PLEASE, don't tell me to put it in my mods zip folder... It edits 2 base classes that are never used and there is no way around it... (Unless forge makes the Timer in Minecraft.java public, and the debugCamera in EntityRenderer as well... Which i doubt...)

 

FIXED:

 

For anyone else having these problems:

 

Fixed the modInfo my using the modMeta in Forge's PreInitializationEvent.

 

Fixed Loading My Mod Last by putting dependencies="after:*" in my @Mod annotation

 

Fixed my ASM by using this in my MANIFEST.MF

Manifest-Version: 1.0
FMLCorePlugin: path.to.LoadingPlugin
-Dfml.coreMods.load=path.to.LoadingPlugin

Posted

Ok, thanks for that!

 

Hmm, it worked, but it doesn't show in-game... Help? What's wrong with my code?

 


      ModMetadata data = event.getModMetadata();
      data.modId = MyModId";
      data.name = "RANDOM";
      data.version = "0.8.649";
      data.url = "url url url url";
      data.authorList = Arrays.asList(new String[] { "Person" });
      data.description = "DESCRIPTION.";
      data.dependants = "*";

 

Also, I have another issue... at data.dependants, I need to set that to * to make it load last every time...

(Please don't tell me to rename my mod with a Z at the beginning...)

 

But I don't know what to put instead of "*" (Which always gives me errors)

 

And you don't think I tried Access Transformers? I rebuilt the same Transformer from the ground up 6 or 7 times (Because I thought i screwed it up...), put it into a jar and dropped it into my coremods folder. I used the tutorial on the forge wiki. And I could never get it to work... If you have any suggestions for me on making the transformer, then please, enlighten me... And yes, i converted the variable I wanted changed into mcp then into forge and changed the /'s to .'s...

 

Does and An Access Transformer allow changing the variable at any given moment?

Posted

You need to tell us the errors you get.

I would, but it doesn't throw any... except that the variable is not public....

 

at data.dependants, I need to set that to * to make it load last every time...

(Please don't tell me to rename my mod with a Z at the beginning...)

 

But I don't know what to put instead of "*" (Which always gives me errors)

Posted

I still need help.... anyone?

 

If you want to have your mod load after EVERY other mod, there is an attribute in the @Mod annotation called dependencies. Simply set the attribute equal to the String "afterAll", or specify the mod via "after:Mod".

Posted

I would, but it doesn't throw any... except that the variable is not public....

As long as you are in MCP you have to edit the base class itself to make it public. Once you distribute your coremod that is done by the Accesstransformer on the fly.

 

I tested it outside of eclipse and recompiled inside my minecraft.jar already...

That is when it threw the error...

Posted

Well, have you made sure that your coremod is actually loaded?

Have you made sure that the obfuscated names are right?

Have you made sure your AT is actually transforming classes?

 

Ok,  i ran it again through eclipse and it said it doesn't have a corrent MANIFEST

 

Manifest-Version: 1.0
FMLCorePlugin: codingforcookies.asm.CFC_LoadingPlugin

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.