• I am trying to make a new addon for IC2. I am currently using the API (which i have been told is the correct way to do this) However, i am extending classes that are not the API (ItemArmorJetpackElectric). Therefore MCP cannot recompile because it doesn't know where those claseses are. Do I decompile the source?

    Here is my code:

    Main Class

    Display Spoiler

    package hunterboerner.Jappack;

    import net.minecraft.client.Minecraft;
    import net.minecraft.client.gui.Gui;
    import net.minecraft.client.multiplayer.NetClientHandler;
    import net.minecraft.item.Item;
    import net.minecraft.network.packet.Packet250CustomPayload;
    import cpw.mods.fml.common.Mod;
    import cpw.mods.fml.common.Mod.Init;
    import cpw.mods.fml.common.Mod.Instance;
    import cpw.mods.fml.common.Mod.PostInit;
    import cpw.mods.fml.common.Mod.PreInit;
    import cpw.mods.fml.common.SidedProxy;
    import cpw.mods.fml.common.event.FMLInitializationEvent;
    import cpw.mods.fml.common.event.FMLPostInitializationEvent;
    import cpw.mods.fml.common.event.FMLPreInitializationEvent;
    import cpw.mods.fml.common.network.NetworkMod;
    import cpw.mods.fml.common.registry.GameRegistry;
    import cpw.mods.fml.common.registry.LanguageRegistry;
    import cpw.mods.fml.common.registry.TickRegistry;
    import cpw.mods.fml.relauncher.Side;

    @Mod(modid = "Jappack", name = "Jappack", version = "1.0.0")
    @NetworkMod(clientSideRequired = true, serverSideRequired = false)
    public class Jappack {
    // The instance of your mod that Forge uses.
    @Instance("Jappack")
    public static Jappack instance;

    public static JappackItem japPackItem;


    // Says where the client and server 'proxy' code is loaded.
    @SidedProxy(clientSide = "hunterboerner.Jappack.client.ClientProxy", serverSide = "hunterboerner.Jappack.CommonProxy")
    public static CommonProxy proxy;

    @PreInit
    public void preInit(FMLPreInitializationEvent event) {
    // Stub Method

    }

    @Init
    public void load(FMLInitializationEvent event) {
    proxy.registerRenderers();
    //ID, Index of sprite, ArmorRendering
    japPackItem = new JappackItem(92, 0, CommonProxy.addArmor("Jappack"));

    LanguageRegistry.addName(japPackItem, "JapPack");

    }

    @PostInit
    public void postInit(FMLPostInitializationEvent event) {
    // Stub Method
    }
    }


    Item Class

    Display Spoiler

    package hunterboerner.Jappack;

    import ic2.core.item.armor.ItemArmorJetpackElectric;
    import net.minecraft.creativetab.CreativeTabs;

    public class JappackItem extends ItemArmorJetpackElectric {

    public JappackItem(int id, int index, int armorrendering) {
    super(id, index, armorrendering);

    }

    public boolean canProvideEnergy() {
    return true;
    }

    public int getMaxCharge() {
    return 100000;
    }


    }

  • Interesting .. i am trying the exact same thing and had to find out they give you the api but actually let you decompile the source.
    So where is the point in not putting it on sourceforge?

    The problem i find is that apparently you can only create complete new items and let them implement the required interfaces.

    Since the source code is not public (or atleast i nowhere could find them) there is only 1 way left and that one is of course not the official one: decompile.

    When i started i was full of joy and pleasure and willing to learn everything, but unfortunately they keep there secrets well hidden i guess.
    The community could be so much better if we beginners could get a good tutorial but its nowhere to find.

    Now if you search in this forum you will find this post:
    [tutorial] How to decompile IC2 with MCP


    So actually have to decompile ic2 to get started than read code and try to understand whats happening because the api descriptions are more than lacking and no help at all.

    What i really would love to see is an sourceforge repo or at least a tutorial HOW to get an item working with the ic2 api.

    Greeting from a really sad minecrafter :(

    We plan on including example code sometime soon(tm)

    2012: modding tutorial for ic2 api

  • What exactly is hard to understand about the API?

    Is the answer to this question no?

    Quote

    Hey don't take it so hard. Ignorance is part of this generation it seems. -the wise words of XFmax-o-l