How to decompile IC2? I need to look at the code
I've tried to look at GregoriusT tutorial, but it's strange and it didn't work?
Thanks.
How to decompile IC2?
-
-
Use the API, not many things would need full blown access to everything.
-
with you skills you definely dont need source.
-
with you skills you definely dont need source.
Implying that you know me.
BTW, i want to make an electric pickaxe (like mining drill) but in game it's like a normal pickaxe (gets damage by using and after that it gets destroyed)
That's why i need to decompile IC2, becuase i need to take a look at the mining drill code.
Or if "i'm too noob" to decompile (*facepalm*) please tell me what's wrong in the code:Base mod class
package MultiTech;import java.util.AbstractMap;
import net.minecraft.block.Block;
import net.minecraft.item.EnumToolMaterial;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraftforge.common.DungeonHooks;
import net.minecraftforge.common.EnumHelper;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.SidedProxy;
import cpw.mods.fml.common.Mod.Init;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.network.NetworkMod;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.LanguageRegistry;@Mod(modid = "MattyXz_MultiTech", name = "MultiTech", version = "1.0a")
@NetworkMod(clientSideRequired = true, serverSideRequired = false)
public class MultiTech
{
//blocks//items
public static Item MetatronDrillE;
public static Block ElerionOre;
public static Block ElerionOreB;
public static Block ElerionOreG;
public static Item EleIn;
public static Item EleInB;
public static Item EleInG;
public Item ItemToolDigitalThermometer;
//proxy
@SidedProxy(clientSide = "MultiTech.ClientProxy", serverSide = "MultiTech.CommonProxy")
public static CommonProxy proxy;//enums
static EnumToolMaterial AdvDiamond = EnumHelper.addToolMaterial("yourmaterial", 3, 500, 20F, 4, 14);@Init
public void load(FMLInitializationEvent event)
{
//proxy
proxy.registerRenderers();//blocks
ElerionOre = new BlockEleOre(810, 0).setStepSound(Block.soundStoneFootstep).setHardness(3F).setResistance(1.0F).setBlockName("ElerionOre");
ElerionOreB = new BlockEleOreB(811, 1).setStepSound(Block.soundStoneFootstep).setHardness(3F).setResistance(1.0F).setBlockName("ElerionOreB");
ElerionOreG = new BlockEleOreG(812, 2).setStepSound(Block.soundStoneFootstep).setHardness(3F).setResistance(1.0F).setBlockName("ElerionOreG");//items
MetatronDrillE = new ItemMetaDrillE(816, AdvDiamond).setItemName("ItemMetaDrillE");
EleIn = new ItemEleIn(813).setIconIndex(0).setItemName("EleIn");
EleInB = new ItemEleInB(814).setIconIndex(1).setItemName("EleInB");
EleInG = new ItemEleInG(815).setIconIndex(2).setItemName("EleInG");//item names
//dungeon
//game registry
LanguageRegistry.addName(MetatronDrillE, "Metatron Drill");
LanguageRegistry.addName(ElerionOre, "Red Elerion Ore");
LanguageRegistry.addName(ElerionOreG, "Green Elerion Ore");
LanguageRegistry.addName(ElerionOreB, "Blue Elerion ore");
LanguageRegistry.addName(EleIn, "Red Elerion Ingot");
LanguageRegistry.addName(EleInB, "Blue Elerion Ingot");
LanguageRegistry.addName(EleInG, "Green Elerion Ingot");
GameRegistry.registerBlock(ElerionOre, "ElerionOre");
GameRegistry.registerBlock(ElerionOreB, "ElerionOreB");
GameRegistry.registerBlock(ElerionOreG, "ElerionOreG");
GameRegistry.registerWorldGenerator(new WorldGenMultiT());
GameRegistry.addSmelting(MultiTech.ElerionOre.blockID, new ItemStack(MultiTech.EleIn), 0.1f);
GameRegistry.addSmelting(MultiTech.ElerionOreB.blockID, new ItemStack(MultiTech.EleInB), 0.1f);
GameRegistry.addSmelting(MultiTech.ElerionOreG.blockID, new ItemStack(MultiTech.EleInG), 0.1f);//recipes
}
}ItemMetaDrillE (the electric pickaxe)
package MultiTech;
import ic2.api.IElectricItem;
import net.minecraft.item.EnumToolMaterial;
import net.minecraft.item.ItemPickaxe;public class ItemMetaDrillE extends ItemPickaxe implements IElectricItem
{public ItemMetaDrillE(int par1, EnumToolMaterial par2EnumToolMaterial)
{
super(par1, par2EnumToolMaterial);
}public String getTextureFile()
{
return "/TutTextures.png";
}@Override
public boolean canProvideEnergy() {
return false;
}@Override
public int getChargedItemId() {
return 0;
}@Override
public int getEmptyItemId() {
return 0;
}@Override
public int getMaxCharge() {
return 30000;
}@Override
public int getTier() {
return 2;
}@Override
public int getTransferLimit() {
return 64;
}
}I also don't know what to put in getChargedItemId and getEmptyItemId if it's now metadata
What should i put here, and if i did something wrong, what should i fix?
Thanks. -
He did not imply that you were noobish, he said that "with [your] skills", you don't need to decompile-aka if you don't know how to decompile, then you don't need to. Like DZCreeper said, use the API.
-
Quote
if you don't know how to decompile, then you don't need to
exactly.your code totaly wrong, if you edit drill you dont need to reimplement it, just extend drill class from IC2 and call super everywhere.