Posted July 8, 201312 yr I want to make an interface between my mod's power system and BuildCraft's MJ system. However, I have no idea how to do this. I have dug into other mods' code, but they all seem to hardcode everything, using reflection to fetch classes, then variables, then values. To me, this seems like a stupid idea, as as soon as anything in the target mod changes, I need to rewrite my system. Is there a better way? Note: I need full control over things like conversion ratio and behavior of converting machine. Ideally with my own TileEntity that takes in my power (already done) and produces MJ. Follow my mod(s) here: http://www.minecraftforum.net/topic/1969694-
July 8, 201312 yr https://github.com/BuildCraft/BuildCraft/tree/master/common/buildcraft/api/power Maybe you should start by taking a look at the BuildCraft API. Hint: implement IPowerProvider
July 8, 201312 yr Author https://github.com/BuildCraft/BuildCraft/tree/master/common/buildcraft/api/power Maybe you should start by taking a look at the BuildCraft API. Hint: implement IPowerProvider How can I use any of its classes directly without making them required for my mod to compile (and therefore making RotaryCraft dependent on BuildCraft)? Follow my mod(s) here: http://www.minecraftforum.net/topic/1969694-
July 8, 201312 yr Import the API into your environment, then configure ant builds to exclude BuildCraft API packages and files. For a peek at ant build configuration, look at pretty much any popular mod. A good mod to look at is EE-3, Pahimar has quite wonderfully documented how to use Ant. Start here, and follow the instructions.
July 8, 201312 yr Author Import the API into your environment, then configure ant builds to exclude BuildCraft API packages and files. For a peek at ant build configuration, look at pretty much any popular mod. A good mod to look at is EE-3, Pahimar has quite wonderfully documented how to use Ant. Start here, and follow the instructions. You misunderstood. If I make a direct reference to a BuildCraft class, my mod becomes dependent on the existence of that class (users without will with crash with NoClassDefFound). Follow my mod(s) here: http://www.minecraftforum.net/topic/1969694-
July 8, 201312 yr In fact, it won't. As long as you check to confirm that BuildCraft exists before calling any of their methods, you'll have absolutely no problems. Proof: Check out my mod's (TukMC) source. I have references to classes in the ThirstMod and IC2, and not once have I ever experienced any issues.
July 10, 201312 yr Author In fact, it won't. As long as you check to confirm that BuildCraft exists before calling any of their methods, you'll have absolutely no problems. Proof: Check out my mod's (TukMC) source. I have references to classes in the ThirstMod and IC2, and not once have I ever experienced any issues. I cannot make an implements conditional. And that class needs to exist in "vanilla RotaryCraft" as well. Follow my mod(s) here: http://www.minecraftforum.net/topic/1969694-
July 14, 201312 yr Author No idea? Follow my mod(s) here: http://www.minecraftforum.net/topic/1969694-
July 15, 201312 yr I will need help in this two maybe we need to have a extra class we load later with the class loader to do this?
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.