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
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
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;
}
}