[Forge Modding] 2 Questions reladet to IC2 support for my mod

  • I want to add some Blocks from IC2 to my Condensed Blocks Mod (Like Rubber, Rubber Wood Sticky Resin, Copper, Tin, Cables etc)
    But when i add the IC2 Api, then i can't use my mod without ic2 or?


    When my opinion correct is then i need to resolve the Block from the ID (like: getBlockByID(CopperBlockID)).
    Anyone now how i can realize that?


    And


    Can i use something like layers for textures?
    Example:
    Layer 1: Original Copper Block Texture
    Layer 2: My Condensed Block Grid


    And Create with them a new Texture?


    Im gradeful for any help :)

  • for question one, you can detect if ic2 is loaded by

    Code
    boolean loaded = false;
    try
    {
    Class.forName("ic2.common.IC2"); //will throw exception if not loaded
    loaded = true;
    }catch(Exception ex)
    {
    }


    as for the second question, not sure, never had to do something like that before

  • It may be possible to layer the textures but that would require two image files (the original & the grid) and some rather esoteric code to "merge" the textures. Unfortunately, the code escapes me, you might be able ask one of the other major modders for help (cpw for instance, that guy's amazing) though.