Posted November 14, 201212 yr Hi, I need to replace the contents of the method public void updateWeatherBody() in World, without editing the base class. From what I've read, it seems like I need to use ASM to do this at runtime. Can anyone help?
November 17, 201212 yr I don't know how to help you, but it seems you have the same sort of question I do(http://www.minecraftforge.net/forum/index.php/topic,3465.0.html). If you figure it out, there'd be cookies in it for you ;p
November 17, 201212 yr I don't know if his mod setup is still up-to-date on how to do things, but this might get you started: https://github.com/dries007/SimpleCore2/tree/master/src/common/dries007/SimpleCore/asm Edit: I'm however not sure how to deal with legal issues if I want to replace a base-class and upload it to github... anybody knows how to do that properly?
November 18, 201212 yr You might want to look at how NEI does it, or look at LuaForge Protip: try and find answers yourself before asking on the forum. It's pretty likely that there is an answer. Was I helpful? Give me a thank you! http://bit.ly/HZ03zy[/img] Tired of waiting for mods to port to bukkit? use BukkitForge! (now with a working version of WorldEdit!)
November 19, 201212 yr The only way I've seen it done is to modify the class and package it with your coremod. Override the class with a Transformer like how NEI does. Here is an example of a class overrider in the same vein as NEI. Link. Here is it being used in a Transformer. Link. You set the location in your FMLLoadingPlugin in injectData with a line like: location = (File) data.get("coremodLocation");
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.