Posted July 24, 201312 yr I went through the tutorial on using access transformers, but I'm still unsure on some things. Basically I want to make the field inGround in EntityArrow protected instead of private, so that subclasses can access it. The config file and all that makes enough sense, but what about the mod container? Do I need to move everything in my mod class (that sets the modID, declares all the new items, etc.) to that class? If so, where exactly do I put my code currently in postInit? The tutorial says to use @subscribe in place of @Postinit, and says to "make sure you use the right event", but what is the right event? Do I even have to move anything? The class(es) that need access to inGround aren't explicitly a member of any particular mod, but I don't know what the purpose of the mod container class is. Is there some documentation somewhere that explains all that? Thanks in advance for any help.
July 25, 201312 yr I can help with the @forgesubscribe, just ensure that your postinit function has forgePostinitevent as an argument and that will work as your post init function. check this out for a more update tutorial if you haven't http://www.minecraftforum.net/topic/1854988-tutorial-162-changing-vanilla-without-editing-base-classes-coremods-and-events-very-advanced/
July 25, 201312 yr Author I didn't see that tutorial yet; I was looking at the one on the wiki. That's really helpful. Hmm.. it doesn't even mention making a mod container class for the access transformers. It only talks about it in a different section about making the mod show up in the mod list. Maybe that means I don't need to do it after all. I'll have to read that over some more and play with it. Thanks!
July 28, 201312 yr no, you don't need to move anything. you can still register your mod by using the @mod annotation and keep it separate from the ifmlloadingplugin. and i don't think you need an access transformer for that. i read somewhere that during runtime (in mc, after reobfuscating) everything's turned to public so all you need to do is change it to public in your dev env as well. i don't really know if absolutely everything is turned public (i doubt it) but i'm guessing a lot is. anyway, i used to use an access transformer for some stuff but after finding out that piece of information, i got rid of it and my mod still works fine.
July 28, 201312 yr Author Really? That would be weird. I guess I could try that and see if it works. Is there some way to test that in Eclipse, or do you just add the mod and try it? I don't think it would compile.
July 29, 201312 yr it'll compile just change inGround to protected in eclipse even without the transformer. then, yeah, you're gonna have to try it out in mc
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.