Posted August 13, 201213 yr My mod in 1.2.5 extended the WorldType class just fine but now as I am trying to update to 1.3.1 I can't extend because WorldType is private. 1.3.1 private WorldType(int par1, String par2Str) { this(par1, par2Str, 0); } private WorldType(int par1, String par2Str, int par3) { 1.2.5 protected WorldType(int par1, String par2Str) { this(par1, par2Str, 0); } protected WorldType(int par1, String par2Str, int par3) { Am I missing something or have I made nooby mistake? I can fix this by changing WorldType 1.3 to protected but its not an ideal fix. Any help would be appreciated.
August 13, 201213 yr Author Reflection can always bypass private modifiers. Hmm i'm not too sure how to use reflection. Could you please explain how i'd use it in my situation? (Please excuse the nooby response, i'm not as nooby as I come off as.)
August 13, 201213 yr The Minecraft.java api has helpers for it, look at those. Basically you can bypass the access restriction and get a direct pointer, then manipulate it as you wish. You would need to use 'some' protected/public constructor though.
August 13, 201213 yr Author Ahh I kinda see now, thanks. Forge would help a lot if it changed it from private to protected when it patched it (hint hint).
August 13, 201213 yr Ahh I kinda see now, thanks. Forge would help a lot if it changed it from private to protected when it patched it (hint hint). Seconded. Metallurgy - http://www.minecraftforum.net/topic/744918-11ssp-smpforge-metallurgy-v13pr2/ Aquaculture - http://www.minecraftforum.net/topic/1285120-125-sspsmpbukkit-aquaculture-112-updated-742012/
August 14, 201213 yr *nod of agreement* If the method was protected, then it would be possible to add worldtypes. http://i.imgur.com/ivK3J.png[/img] I'm a little surprised that I am still ranked as a "Forge Modder," having not posted a single mod since my animals mod... I have to complete Digging Deeper!, fast!
August 15, 201213 yr https://github.com/cpw/FML/blob/6417ad0a3c7048db75d7e836bf9b9d0d678b8509/common/fml_at.cfg#L63 I do Forge for free, however the servers to run it arn't free, so anything is appreciated. Consider supporting the team on Patreon
August 15, 201213 yr Author https://github.com/cpw/FML/blob/6417ad0a3c7048db75d7e836bf9b9d0d678b8509/common/fml_at.cfg#L63 If I understood that correctly I believe I should be very happy. Thanks.
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.