IC2 A way to change MassFabs consume?

  • Hey guys,


    I've been searching for a solution for hours now.
    What I need to know is, if there's a way to change the Mass Fabricator's EU-consume to produce 1 UU-Matter...?
    Because of this value is on 1.000.000 per UU-Matter, players can produce it much to fast.
    I'm not new into programming, so if you know a solution via API etc. pls let me know it in some pseudo-code.


    Thanks in advance!

    • Official Post

    In experiment IC2, UU now costs 10,000,000 EU for one bucket.

    145 Mods isn't too many. 9 types of copper and 8 types of tin aren't too many. 3 types of coffee though?

    I know that you believe that you understood what you think I said, but I am not sure you realise that what you read was not what I meant.


    ---- Minecraft Crash Report ----
    // I just don't know what went wrong :(


    I see this too much.

  • You could theoretically decompile IC2, look for the part of the code with the recipe, change it, recompile it, and use it yourself. That would not work for a server (unless every player has done the exact same change/has the exact same jar), only for your singleplayer, and a lot could go wrong, but that would be an emergency solution if you need it so bad. Maybe minor errors in decompiling IC2 could also make it not work anymore, never tried it that way.
    Also, I don't know if the developers would want you to mess with the code in that way and then recompile it..Otherwise, look through the API although I am quite sure there isn't something implemented to change the Mass Fabricator's Recipes. A config option would be very nice to change EU needed for UUM.


    Otherwise, if you want a challenge, install GregTech ;)

  • There's no way..
    because all the functions get another name like "func_b8923" for example..
    Seems like it's not getting 100% decompiled.

  • sorry, but actual lines that effect generation cost located inside attemptGeneration() method and embedded (inlined) into code and cannot be changed without ASM, UNSAFE or recompilation, that line indicate capacity of emachine instance.


    also you can try http://set.ee/jbe/ or something similar to edit class directly, also you shoud ignore unnamed fields and methods they are OK.


    most effective method to hack such changes is:


    extend tilematter, override attemptGeneration() (you dont need full decompilation\recompilation for this)
    override classreference of initial tilematter with your custom one, this may require reflection and in some cases ASM or UNSAFE
    this will work as forgemod and wont change initial JAR.

  • You could take a page out of GregTech, and just build a small mod that hooks into the IC2 API to add one single machine that produces UU-matter in exactly the same way as the native mass fab, except that yours comes with a config file.

  • The problem is, that I need it in a modpack (FTB). So new Items/Machines aren't a solution for me, as I can't force all the players to add the mod manually to their modpack.


    If someone makes this for me, I'll pay him!
    Please add me in skype (ahmet.acikel2).


    Thanks in advance!

  • If you recompile IC2 then you need to redistribute IC2 to all players too. There's no difference, except that IC2's filesize is larger, and you're breaking rules about not modifying and distributing closed source mods.

  • Why should I've to redistribute it to all players? :O
    Only the serverside amount of needed EU for producing 1 UU-Matter would have changed?^^

  • Depends on whether the recompiled server version gets along with the normal client versions. You're not just modifying a value at runtime, you're hardcoding something different. Potentially it may work, but at bare minimum you're going to run into the issue that the client still thinks the cost hasn't changed. Therefore, it will tick up to 100% in the mass fab without outputting a piece of UU-matter, and then either resetting to 0 and counting up again, or counting up past 100% until your server-side value has been reached.

  • Yeeah, I know.
    I wouldn't care about the optical issues. But there's also a method to adjust the visual bar, so..


    Please add me in Skype (ahmet.acikel2) if you're able to make this little change for me!
    I'll pay you!

  • Hey, thanks for your tips! :)


    I could change the vaulue in the class.
    I found it fast, as it was the first variable and changed it to 1000 for testing purposes. Saved it and put it back into the jar with WinRar in zip mode and normal compression.


    But when the server starts up, this error shows up :/
    http://paste.hawkfalcon.com/celorupile.avrasm


    Thanks in advance, if you can help me! :)