Jump to content

Recommended Posts

Posted

I install minecraft with forge that I used to edit, also It works within the editing program but doesn't work for the client minecraft, whys that?

 

I will put out coding of the file if you need it?

 

 

---- Minecraft Crash Report ----
// My bad.

Time: 15/08/13 8:36 PM
Description: There was a severe problem during mod loading that has caused the game to fail

cpw.mods.fml.common.LoaderException: java.lang.ClassNotFoundException: net.PowerfulInventory.Mod.mod_PowerfulInventory
at cpw.mods.fml.common.LoadController.transition(LoadController.java:149)
at cpw.mods.fml.common.Loader.loadMods(Loader.java:520)
at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:181)
at net.minecraft.client.Minecraft.func_71384_a(Minecraft.java:470)
at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:796)
at net.minecraft.client.main.Main.main(SourceFile:101)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at net.minecraft.launchwrapper.Launch.launch(Launch.java:57)
at net.minecraft.launchwrapper.Launch.main(Launch.java:18)
Caused by: java.lang.ClassNotFoundException: net.PowerfulInventory.Mod.mod_PowerfulInventory
at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:179)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at cpw.mods.fml.common.ModClassLoader.loadClass(ModClassLoader.java:58)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at cpw.mods.fml.common.ModClassLoader.loadBaseModClass(ModClassLoader.java:101)
at cpw.mods.fml.common.modloader.ModLoaderModContainer.constructMod(ModLoaderModContainer.java:483)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:313)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
at com.google.common.eventbus.EventBus.post(EventBus.java:267)
at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:194)
at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:174)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:313)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
at com.google.common.eventbus.EventBus.post(EventBus.java:267)
at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:105)
at cpw.mods.fml.common.Loader.loadMods(Loader.java:510)
... 10 more
Caused by: java.lang.NullPointerException
at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:171)
... 39 more


A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------

-- System Details --
Details:
Minecraft Version: 1.6.2
Operating System: Windows XP (x86) version 5.1
Java Version: 1.7.0_25, Oracle Corporation
Java VM Version: Java HotSpot(TM) Client VM (mixed mode, sharing), Oracle Corporation
Memory: 5735336 bytes (5 MB) / 81092608 bytes (77 MB) up to 518979584 bytes (494 MB)
JVM Flags: 2 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xmx512M
AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
Suspicious classes: FML and Forge are installed
IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
FML: MCP v8.04 FML v6.2.43.829 Minecraft Forge 9.10.0.829 4 mods loaded, 4 mods active
mcp{8.04} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed
FML{6.2.43.829} [Forge Mod Loader] (coremods) Unloaded->Constructed
Forge{9.10.0.829} [Minecraft Forge] (coremods) Unloaded->Constructed
mod_PowerfulInventory{Not available} [mod_PowerfulInventory] (net) Unloaded->Errored

 

Posted

Is the class mod_PowerfulInventory in the package net.PowerfulInventory.Mod???

 

If it isn't, there is your problem :)

I am Mew. The Legendary Psychic. I behave oddly and am always playing practical jokes.

 

I have also found that I really love making extremely long and extremely but sometimes not so descriptive variables. Sort of like what I just did there xD

Posted

Is the class mod_PowerfulInventory in the package net.PowerfulInventory.Mod???

 

If it isn't, there is your problem :)

 

It in there and have no idea whats wrong here the base mod file.

 

Base mod:

package net.PowerfulInventory.Mod;

import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.Random;

import cpw.mods.fml.client.registry.RenderingRegistry;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.EventHandler;
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.IPacketHandler;
import cpw.mods.fml.common.network.NetworkMod;
import cpw.mods.fml.common.network.Player;
import cpw.mods.fml.common.registry.EntityRegistry;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.LanguageRegistry;

import net.PowerfulInventory.Mod.EnumToolMod;
import net.PowerfulInventory.Mod.Ore.ModEnumTool;
import net.PowerfulInventory.Mod.Ore.ModOre;
import net.PowerfulInventory.Mod.Ore.WorldGen;
import net.PowerfulInventory.Mod.Tools.ModAxe;
import net.PowerfulInventory.Mod.Tools.ModHS;
import net.PowerfulInventory.Mod.Tools.ModHammer;
import net.PowerfulInventory.Mod.Tools.ModHoe;
import net.PowerfulInventory.Mod.Tools.ModPickaxe;
import net.PowerfulInventory.Mod.Tools.ModShovel;
import net.PowerfulInventory.Mod.Tools.ModSword;
import net.PowerfulInventory.Mod.Tools.ModSynthesis;
import net.minecraft.block.Block;
import net.minecraft.block.BlockStone;
import net.minecraft.block.BlockWorkbench;
import net.minecraft.block.StepSound;
import net.minecraft.block.material.Material;
import net.minecraft.client.Minecraft;
import net.minecraft.client.model.ModelBiped;
import net.minecraft.client.renderer.entity.RenderBiped;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EnumCreatureType;
import net.minecraft.item.EnumToolMaterial;
import net.minecraft.item.Item;
import net.minecraft.item.ItemBow;
import net.minecraft.item.ItemCoal;
import net.minecraft.item.ItemStack;
import net.minecraft.item.ItemSword;
import net.minecraft.network.INetworkManager;
import net.minecraft.network.packet.Packet250CustomPayload;
import net.minecraft.src.BaseMod;
import net.minecraft.src.ModLoader;
import net.minecraft.util.Icon;
import net.minecraft.world.World;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.world.gen.feature.WorldGenMinable;
import net.minecraftforge.common.ForgeHooks;
import net.minecraftforge.common.MinecraftForge;


public class mod_PowerfulInventory extends BaseMod
{
public static final String version = "Powerful Inventory Version 1.00";

//Starting Tools
public static Item Stick_Left_Half = new ModItem(901, "Stick_Left_Half").setUnlocalizedName("Stick Left Half");
public static Item Stick_Right_Half = new ModItem(902, "Stick_Right_Half").setUnlocalizedName("Stick Right Half");

public static Item Iron_Hammer_Left_Gunpowder_Half = new ModItem(903, "Iron_Hammer_Left_Gunpowder_Half").setUnlocalizedName("Iron Hammer Left Gunpowder Half");
public static Item Iron_Hammer_Right_Lighter_Half = new ModItem(904, "Iron_Hammer_Right_Lighter_Half").setUnlocalizedName("Iron Hammer Right Lighter Half");

public static Item Gold_Hammer_Left_Gunpowder_Half = new ModItem(905, "Gold_Hammer_Left_Gunpowder_Half").setUnlocalizedName("Gold Hammer Left Gunpowder Half");
public static Item Gold_Hammer_Right_Lighter_Half = new ModItem(906, "Gold_Hammer_Right_Lighter_Half").setUnlocalizedName("Gold Hammer Right Lighter Half");

public static Item Diamond_Hammer_Left_Gunpowder_Half = new ModItem(907, "Diamond_Hammer_Left_Gunpowder_Half").setUnlocalizedName("Diamond Hammer Left Gunpowder Half");
public static Item Diamond_Hammer_Right_Lighter_Half = new ModItem(908, "Diamond_Hammer_Right_Lighter_Half").setUnlocalizedName("Diamond Hammer Right Lighter Half");

public static Item Iron_Synthesis = new ModSynthesis(909, "Iron_Synthesis", EnumToolMod.Synthesis_IRON, 0).setUnlocalizedName("Iron Synthesis");
public static Item Gold_Synthesis = new ModSynthesis(910, "Gold_Synthesis", EnumToolMod.Synthesis_GOLD, 0).setUnlocalizedName("Gold Synthesis");
public static Item Diamond_Synthesis = new ModSynthesis(911, "Diamond_Synthesis", EnumToolMod.Synthesis_EMERALD, 0).setUnlocalizedName("Diamond Synthesis");

public static Item Iron_Hammer = new ModHammer(912, "Iron_Hammer", EnumToolMod.Hammer_IRON, 0).setUnlocalizedName("Iron Hammer");
public static Item Gold_Hammer = new ModHammer(913, "Gold_Hammer", EnumToolMod.Hammer_GOLD, 0).setUnlocalizedName("Gold Hammer");
public static Item Diamond_Hammer = new ModHammer(914, "Diamond_Hammer", EnumToolMod.Hammer_EMERALD, 0).setUnlocalizedName("Diamond Hammer");

public static Item Iron_HS = new ModHS(915, "Iron_HS", EnumToolMod.HS_IRON, 0).setUnlocalizedName("Iron HS");
public static Item Gold_HS = new ModHS(916, "Gold_HS", EnumToolMod.HS_GOLD, 0).setUnlocalizedName("Gold HS");
public static Item Diamond_HS = new ModHS(917, "Diamond_HS", EnumToolMod.HS_EMERALD, 0).setUnlocalizedName("Diamond HS");

//Magic 1.0
public static Block Magic_Coal_Ore = new ModOre(918, "Magic_Coal_Ore").setHardness(3.0F).setResistance(5.0F).setUnlocalizedName("Magic Coal Ore").setLightValue(1.0F).func_111022_d("Magic_Coal_Ore");
public static Block Magic_Iron_Ore = new ModOre(919, "Magic_Iron_Ore").setHardness(3.0F).setResistance(5.0F).setUnlocalizedName("Magic Iron Ore").setLightValue(1.0F).func_111022_d("Magic_Iron_Ore");
public static Block Magic_Gold_Ore = new ModOre(920, "Magic_Gold_Ore").setHardness(3.0F).setResistance(5.0F).setUnlocalizedName("Magic Gold Ore").setLightValue(1.0F).func_111022_d("Magic_Gold_Ore");
public static Block Magic_Diamond_Ore = new ModOre(921, "Magic_Diamond_Ore").setHardness(3.0F).setResistance(5.0F).setUnlocalizedName("Magic Diamond Ore").setLightValue(1.0F).func_111022_d("Magic_Diamond_Ore");

public static Item Magic_Coal_Powder = new ModItem(922, "Magic_Coal_Powder").setUnlocalizedName("Magic Coal Powder");
public static Item Magic_Iron_Powder = new ModItem(923, "Magic_Iron_Powder").setUnlocalizedName("Magic Iron Powder");
public static Item Magic_Gold_Powder = new ModItem(924, "Magic_Gold_Powder").setUnlocalizedName("Magic Gold Powder");
public static Item Magic_Diamond_Powder = new ModItem(925, "Magic_Diamond_Powder").setUnlocalizedName("Magic Diamond Powder");

//Power Death 1.0
public static Item Killer_Shine = new ModItem(926, "Killer_Shine").setUnlocalizedName("Killer Shine").func_111206_d("Killer_Shine");
public static Item Killer_Sword = new ModSword(927, ModEnumTool.Killer_Shine).setUnlocalizedName("Killer Sword").func_111206_d("Killer_Sword");
public static Item Killer_Hoe = new ModHoe(930, ModEnumTool.Killer_Shine).setUnlocalizedName("Killer Hoe").func_111206_d("Killer_Hoe");
public static Item Killer_Pickaxe = new ModPickaxe(928, ModEnumTool.Killer_Shine).setUnlocalizedName("Killer Pickaxe").func_111206_d("Killer_Pickaxe");
public static Item Killer_Shovel = new ModShovel(931, ModEnumTool.Killer_Shine).setUnlocalizedName("Killer Shovel").func_111206_d("Killer_Shovel");
public static Item Killer_Axe = new ModAxe(929, ModEnumTool.Killer_Shine).setUnlocalizedName("Killer Axe").func_111206_d("Killer_Axe");

//Power Life 1.0
public static Item Revive_Bleed = new ModItem(932, "Revive_Bleed").setUnlocalizedName("Revive Bleed").func_111206_d("Revive_Bleed");
public static Item Revive_Sword = new ModSword(933, ModEnumTool.Revive_Bleed).setUnlocalizedName("Revive Sword").func_111206_d("Revive_Sword");
public static Item Revive_Hoe = new ModHoe(936, ModEnumTool.Revive_Bleed).setUnlocalizedName("Revive Hoe").func_111206_d("Revive_Hoe");
public static Item Revive_Pickaxe = new ModPickaxe(934, ModEnumTool.Revive_Bleed).setUnlocalizedName("Revive Pickaxe").func_111206_d("Revive_Pickaxe");
public static Item Revive_Shovel = new ModShovel(937, ModEnumTool.Revive_Bleed).setUnlocalizedName("Revive Shovel").func_111206_d("Revive_Shovel");
public static Item Revive_Axe = new ModAxe(935, ModEnumTool.Revive_Bleed).setUnlocalizedName("Revive Axe").func_111206_d("Revive_Axe");

//Tab
public static CreativeTabs PIBlock = new PowerTab(CreativeTabs.getNextID(), mod_PowerfulInventory.Magic_Iron_Ore.blockID, "P I Blocks", "P I Blocks");
public static CreativeTabs PIMaterials = new PowerTab(CreativeTabs.getNextID(), Item.gunpowder.itemID, "P I Materials", "P I Materials");
public static CreativeTabs PITools = new PowerTab(CreativeTabs.getNextID(), Diamond_Hammer.itemID, "P I Tools", "P I Tools");
public static CreativeTabs PICombat = new PowerTab(CreativeTabs.getNextID(), Diamond_Synthesis.itemID, "P I Combat", "P I Combat");

@EventHandler
    public void preInit(FMLPreInitializationEvent event)
    {
    }

@EventHandler
    public void load()
    {
	GameRegistry.registerWorldGenerator(new WorldGen());

	MinecraftForge.setBlockHarvestLevel(Magic_Coal_Ore, "pickaxe", 0);
	MinecraftForge.setBlockHarvestLevel(Magic_Iron_Ore, "pickaxe", 1);
	MinecraftForge.setBlockHarvestLevel(Magic_Gold_Ore, "pickaxe", 2);
	MinecraftForge.setBlockHarvestLevel(Magic_Diamond_Ore, "pickaxe", 2);

	//Tabs
	//Magic
	Magic_Coal_Ore.setCreativeTab(PIBlock);
	Magic_Iron_Ore.setCreativeTab(PIBlock);
	Magic_Gold_Ore.setCreativeTab(PIBlock);
	Magic_Diamond_Ore.setCreativeTab(PIBlock);


	//Starting Tools
	Stick_Left_Half.setCreativeTab(PIMaterials);
	Stick_Right_Half.setCreativeTab(PIMaterials);
	Iron_Hammer_Left_Gunpowder_Half.setCreativeTab(PIMaterials);
	Iron_Hammer_Right_Lighter_Half.setCreativeTab(PIMaterials);
	Gold_Hammer_Left_Gunpowder_Half.setCreativeTab(PIMaterials);
	Gold_Hammer_Right_Lighter_Half.setCreativeTab(PIMaterials);
	Diamond_Hammer_Left_Gunpowder_Half.setCreativeTab(PIMaterials);
	Diamond_Hammer_Right_Lighter_Half.setCreativeTab(PIMaterials);

	//Magic
	Magic_Coal_Powder.setCreativeTab(PIMaterials);
	Magic_Iron_Powder.setCreativeTab(PIMaterials);
	Magic_Gold_Powder.setCreativeTab(PIMaterials);
	Magic_Diamond_Powder.setCreativeTab(PIMaterials);

	//Power
	Killer_Shine.setCreativeTab(PIMaterials);
	Revive_Bleed.setCreativeTab(PIMaterials);

	//Starting Tools
	Iron_Hammer.setCreativeTab(PITools);
	Gold_Hammer.setCreativeTab(PITools);
	Diamond_Hammer.setCreativeTab(PITools);

	//Power
	Killer_Pickaxe.setCreativeTab(PITools);
	Killer_Axe.setCreativeTab(PITools);
	Killer_Shovel.setCreativeTab(PITools);
	Killer_Hoe.setCreativeTab(PITools);
	Revive_Pickaxe.setCreativeTab(PITools);
	Revive_Axe.setCreativeTab(PITools);
	Revive_Shovel.setCreativeTab(PITools);
	Revive_Hoe.setCreativeTab(PITools);

	//Starting Tools
	Iron_Synthesis.setCreativeTab(PICombat);
	Iron_HS.setCreativeTab(PICombat);
	Gold_Synthesis.setCreativeTab(PICombat);
	Gold_HS.setCreativeTab(PICombat);
	Diamond_Synthesis.setCreativeTab(PICombat);
	Diamond_HS.setCreativeTab(PICombat);

	//Power
	Killer_Sword.setCreativeTab(PICombat);
	Revive_Sword.setCreativeTab(PICombat);



	//Smelting
	//Magic
	GameRegistry.addSmelting(mod_PowerfulInventory.Magic_Coal_Powder.itemID, new ItemStack(Item.coal, 4), 16);
	GameRegistry.addSmelting(mod_PowerfulInventory.Magic_Iron_Powder.itemID, new ItemStack(Item.ingotIron, 2), ;
	GameRegistry.addSmelting(mod_PowerfulInventory.Magic_Gold_Powder.itemID, new ItemStack(Item.ingotGold, 2), ;
	GameRegistry.addSmelting(mod_PowerfulInventory.Magic_Diamond_Powder.itemID, new ItemStack(Item.diamond, 2), ;

	//Crafting
	//Starting Tools
	GameRegistry.addRecipe(new ItemStack(Iron_Synthesis), new Object[]{"zxx", "xbl", "  l", 'x', Item.ingotIron, 'l', Item.stick, 'z', Item.flintAndSteel, 'b', Item.gunpowder});
	GameRegistry.addRecipe(new ItemStack(Gold_Synthesis), new Object[]{"zxx", "xbl", "  l", 'x', Item.ingotGold, 'l', Item.stick, 'z', Item.flintAndSteel, 'b', Item.gunpowder});
	GameRegistry.addRecipe(new ItemStack(Diamond_Synthesis), new Object[]{"zxx", "xbl", "  l", 'x', Item.diamond, 'l', Item.stick, 'z', Item.flintAndSteel, 'b', Item.gunpowder});

	GameRegistry.addRecipe(new ItemStack(Stick_Left_Half, 2), new Object[]{"  x", " xc", "xcv", 'x', Item.stick, 'c', Block.planks, 'v', Block.wood});
	GameRegistry.addRecipe(new ItemStack(Stick_Right_Half, 2), new Object[]{ "x ", "cx", 'x', Item.stick, 'c', Block.planks});
	GameRegistry.addRecipe(new ItemStack(Iron_Hammer_Left_Gunpowder_Half), new Object[]{"xxx", "xcc", "xxx", 'x', Item.ingotIron, 'c', Item.gunpowder});
	GameRegistry.addRecipe(new ItemStack(Iron_Hammer_Right_Lighter_Half), new Object[]{" xx", " cx", " xx", 'x', Item.ingotIron, 'c', Item.flintAndSteel});
	GameRegistry.addRecipe(new ItemStack(Gold_Hammer_Left_Gunpowder_Half), new Object[]{"xxx", "xcc", "xxx", 'x', Item.ingotGold, 'c', Item.gunpowder});
	GameRegistry.addRecipe(new ItemStack(Gold_Hammer_Right_Lighter_Half), new Object[]{" xx", " cx", " xx", 'x', Item.ingotGold, 'c', Item.flintAndSteel});
	GameRegistry.addRecipe(new ItemStack(Diamond_Hammer_Left_Gunpowder_Half), new Object[]{"xxx", "xcc", "xxx", 'x', Item.diamond, 'c', Item.gunpowder});
	GameRegistry.addRecipe(new ItemStack(Diamond_Hammer_Right_Lighter_Half), new Object[]{" xx", " cx", " xx", 'x', Item.diamond, 'c', Item.flintAndSteel});

	GameRegistry.addRecipe(new ItemStack(Iron_Hammer), new Object[]{"xc ", "vb ", 'c', mod_PowerfulInventory.Iron_Hammer_Left_Gunpowder_Half, 'x', mod_PowerfulInventory.Iron_Hammer_Right_Lighter_Half, 'b', mod_PowerfulInventory.Stick_Left_Half, 'v', mod_PowerfulInventory.Stick_Right_Half});
	GameRegistry.addRecipe(new ItemStack(Gold_Hammer), new Object[]{"xc ", "vb ", 'c', mod_PowerfulInventory.Gold_Hammer_Left_Gunpowder_Half, 'x', mod_PowerfulInventory.Gold_Hammer_Right_Lighter_Half, 'b', mod_PowerfulInventory.Stick_Left_Half, 'v', mod_PowerfulInventory.Stick_Right_Half});
	GameRegistry.addRecipe(new ItemStack(Diamond_Hammer), new Object[]{"xc ", "vb ", 'c', mod_PowerfulInventory.Diamond_Hammer_Left_Gunpowder_Half, 'x', mod_PowerfulInventory.Diamond_Hammer_Right_Lighter_Half, 'b', mod_PowerfulInventory.Stick_Left_Half, 'v', mod_PowerfulInventory.Stick_Right_Half});

	GameRegistry.addRecipe(new ItemStack(Iron_HS), new Object[]{"xc", 'x', mod_PowerfulInventory.Iron_Synthesis, 'c', mod_PowerfulInventory.Iron_Hammer});
	GameRegistry.addRecipe(new ItemStack(Gold_HS), new Object[]{"xc", 'x', mod_PowerfulInventory.Gold_Synthesis, 'c', mod_PowerfulInventory.Gold_Hammer});
	GameRegistry.addRecipe(new ItemStack(Diamond_HS), new Object[]{"xc", 'x', mod_PowerfulInventory.Diamond_Synthesis, 'c', mod_PowerfulInventory.Diamond_Hammer});

	//Magic
	GameRegistry.addRecipe(new ItemStack(Magic_Coal_Powder, 4), new Object[]{"x  x", "x  x", 'x', mod_PowerfulInventory.Magic_Coal_Powder});
	GameRegistry.addRecipe(new ItemStack(Magic_Iron_Powder, 2), new Object[]{"x  ", "   ", "  x", 'x', mod_PowerfulInventory.Magic_Iron_Powder});
	GameRegistry.addRecipe(new ItemStack(Magic_Gold_Powder, 2), new Object[]{"x  ", "   ", "  x", 'x', mod_PowerfulInventory.Magic_Gold_Powder});
	GameRegistry.addRecipe(new ItemStack(Magic_Diamond_Powder, 2), new Object[]{"x  ", "   ", "  x", 'x', mod_PowerfulInventory.Magic_Diamond_Powder});

	GameRegistry.addRecipe(new ItemStack(Block.torchWood), new Object[]{"x", "l", 'x', mod_PowerfulInventory.Magic_Coal_Powder, 'l', Item.stick});

	GameRegistry.addRecipe(new ItemStack(Item.swordIron), new Object[]{"x", "x", "l", 'x', mod_PowerfulInventory.Magic_Iron_Powder, 'l', Item.stick});
	GameRegistry.addRecipe(new ItemStack(Item.pickaxeIron), new Object[]{"xxx", " l ", " l ",  'x', mod_PowerfulInventory.Magic_Iron_Powder, 'l', Item.stick});
	GameRegistry.addRecipe(new ItemStack(Item.axeIron), new Object[]{"xx", "xl", " l", 'x', mod_PowerfulInventory.Magic_Iron_Powder, 'l', Item.stick});
	GameRegistry.addRecipe(new ItemStack(Item.hoeIron), new Object[]{"xx", " l", " l", 'x', mod_PowerfulInventory.Magic_Iron_Powder, 'l', Item.stick});
	GameRegistry.addRecipe(new ItemStack(Item.shovelIron), new Object[]{"x", "l", "l", 'x', mod_PowerfulInventory.Magic_Iron_Powder, 'l', Item.stick});

	GameRegistry.addRecipe(new ItemStack(Item.swordGold), new Object[]{"x", "x", "l", 'x', mod_PowerfulInventory.Magic_Gold_Powder, 'l', Item.stick});
	GameRegistry.addRecipe(new ItemStack(Item.pickaxeGold), new Object[]{"xxx", " l ", " l ",  'x', mod_PowerfulInventory.Magic_Gold_Powder, 'l', Item.stick});
	GameRegistry.addRecipe(new ItemStack(Item.axeGold), new Object[]{"xx", "xl", " l", 'x', mod_PowerfulInventory.Magic_Gold_Powder, 'l', Item.stick});
	GameRegistry.addRecipe(new ItemStack(Item.hoeGold), new Object[]{"xx", " l", " l", 'x', mod_PowerfulInventory.Magic_Gold_Powder, 'l', Item.stick});
	GameRegistry.addRecipe(new ItemStack(Item.shovelGold), new Object[]{"x", "l", "l", 'x', mod_PowerfulInventory.Magic_Gold_Powder, 'l', Item.stick});

	GameRegistry.addRecipe(new ItemStack(Item.swordDiamond), new Object[]{"x", "x", "l", 'x', mod_PowerfulInventory.Magic_Diamond_Powder, 'l', Item.stick});
	GameRegistry.addRecipe(new ItemStack(Item.pickaxeDiamond), new Object[]{"xxx", " l ", " l ",  'x', mod_PowerfulInventory.Magic_Diamond_Powder, 'l', Item.stick});
	GameRegistry.addRecipe(new ItemStack(Item.axeDiamond), new Object[]{"xx", "xl", " l", 'x', mod_PowerfulInventory.Magic_Diamond_Powder, 'l', Item.stick});
	GameRegistry.addRecipe(new ItemStack(Item.hoeDiamond), new Object[]{"xx", " l", " l", 'x', mod_PowerfulInventory.Magic_Diamond_Powder, 'l', Item.stick});
	GameRegistry.addRecipe(new ItemStack(Item.shovelDiamond), new Object[]{"x", "l", "l", 'x', mod_PowerfulInventory.Magic_Diamond_Powder, 'l', Item.stick});

	//Power
	GameRegistry.addRecipe(new ItemStack(Killer_Shine, 4), new Object[]{"bwb", "wsw", "bwb", 'b', mod_PowerfulInventory.Magic_Coal_Powder, 'w', mod_PowerfulInventory.Magic_Iron_Powder, 's', Block.stone});
	GameRegistry.addRecipe(new ItemStack(Killer_Sword), new Object[]{"x", "x", "l", 'x', mod_PowerfulInventory.Killer_Shine, 'l', Item.stick});
	GameRegistry.addRecipe(new ItemStack(Killer_Pickaxe), new Object[]{"xxx", " l ", " l ",  'x', mod_PowerfulInventory.Killer_Shine, 'l', Item.stick});
	GameRegistry.addRecipe(new ItemStack(Killer_Axe), new Object[]{"xx", "xl", " l", 'x', mod_PowerfulInventory.Killer_Shine, 'l', Item.stick});
	GameRegistry.addRecipe(new ItemStack(Killer_Hoe), new Object[]{"xx", " l", " l", 'x', mod_PowerfulInventory.Killer_Shine, 'l', Item.stick});
	GameRegistry.addRecipe(new ItemStack(Killer_Shovel), new Object[]{"x", "l", "l", 'x', mod_PowerfulInventory.Killer_Shine, 'l', Item.stick});

	GameRegistry.addRecipe(new ItemStack(Revive_Bleed, 4), new Object[]{"wbw", "bsb", "wbw", 'b', mod_PowerfulInventory.Magic_Coal_Powder, 'w', mod_PowerfulInventory.Magic_Iron_Powder, 's', Block.stone});
	GameRegistry.addRecipe(new ItemStack(Revive_Sword), new Object[]{"x", "x", "l", 'x', mod_PowerfulInventory.Revive_Bleed, 'l', Item.stick});
	GameRegistry.addRecipe(new ItemStack(Revive_Pickaxe), new Object[]{"xxx", " l ", " l ",  'x', mod_PowerfulInventory.Revive_Bleed, 'l', Item.stick});
	GameRegistry.addRecipe(new ItemStack(Revive_Axe), new Object[]{"xx", "xl", " l", 'x', mod_PowerfulInventory.Revive_Bleed, 'l', Item.stick});
	GameRegistry.addRecipe(new ItemStack(Revive_Hoe), new Object[]{"xx", " l", " l", 'x', mod_PowerfulInventory.Revive_Bleed, 'l', Item.stick});
	GameRegistry.addRecipe(new ItemStack(Revive_Shovel), new Object[]{"x", "l", "l", 'x', mod_PowerfulInventory.Revive_Bleed, 'l', Item.stick});

	//Register
	//Starting Tools
	GameRegistry.registerItem(Stick_Left_Half, "Stick_Left_Half");
	GameRegistry.registerItem(Stick_Right_Half, "Stick Right Half");
	GameRegistry.registerItem(Iron_Hammer_Left_Gunpowder_Half, "Iron_Hammer_Left Gunpowder_Half");
	GameRegistry.registerItem(Iron_Hammer_Right_Lighter_Half, "Iron Hammer Right Lighter Half");
	GameRegistry.registerItem(Gold_Hammer_Left_Gunpowder_Half, "Gold Hammer Left Gunpowder Half");
	GameRegistry.registerItem(Gold_Hammer_Right_Lighter_Half, "Gold Hammer Right Lighter Half");
	GameRegistry.registerItem(Diamond_Hammer_Left_Gunpowder_Half, "Diamond Hammer Left Gunpowder Half");
	GameRegistry.registerItem(Diamond_Hammer_Right_Lighter_Half, "Diamond Hammer Right Lighter Half");

	GameRegistry.registerItem(Iron_Synthesis, "Iron Synthesis");
	GameRegistry.registerItem(Gold_Synthesis, "Gold Synthesis");
	GameRegistry.registerItem(Diamond_Synthesis, "Diamond Synthesis");

	GameRegistry.registerItem(Iron_Hammer, "Iron Hammer");
	GameRegistry.registerItem(Gold_Hammer, "Gold Hammer");
	GameRegistry.registerItem(Diamond_Hammer, "Diamond Hammer");

	GameRegistry.registerItem(Iron_HS, "Iron HS");
	GameRegistry.registerItem(Gold_HS, "Gold HS");
	GameRegistry.registerItem(Diamond_HS, "Diamond HS");

	//Magic
	GameRegistry.registerBlock(Magic_Coal_Ore, "Magic Coal Ore");
	GameRegistry.registerBlock(Magic_Iron_Ore, "Magic Iron Ore");
	GameRegistry.registerBlock(Magic_Gold_Ore, "Magic Gold Ore");
	GameRegistry.registerBlock(Magic_Diamond_Ore, "Magic Diamond Ore");

	GameRegistry.registerItem(Magic_Coal_Powder, "Magic Coal Powder");
	GameRegistry.registerItem(Magic_Iron_Powder, "Magic Iron Powder");
	GameRegistry.registerItem(Magic_Gold_Powder, "Magic Gold Powder");
	GameRegistry.registerItem(Magic_Diamond_Powder, "Magic Diamond Powder");

	//Power
	GameRegistry.registerItem(Killer_Shine, "Killer Shine");
	GameRegistry.registerItem(Killer_Sword, "Killer Sword");
	GameRegistry.registerItem(Killer_Pickaxe, "Killer Pickaxe");
	GameRegistry.registerItem(Killer_Axe, "Killer Axe");
	GameRegistry.registerItem(Killer_Hoe, "Killer Hoe");
	GameRegistry.registerItem(Killer_Shovel, "Killer Shovel");
	GameRegistry.registerItem(Revive_Bleed, "Revive Dark");
	GameRegistry.registerItem(Revive_Sword, "Revive Sword");
	GameRegistry.registerItem(Revive_Pickaxe, "Revive Pickaxe");
	GameRegistry.registerItem(Revive_Axe, "Revive Axe");
	GameRegistry.registerItem(Revive_Hoe, "Revive Hoe");
	GameRegistry.registerItem(Revive_Shovel, "Revive Shovel");


	//Name
	//Starting Tools
	LanguageRegistry.addName(Stick_Left_Half, "Stick Left Half");
	LanguageRegistry.addName(Stick_Right_Half, "Stick Right Half");

	LanguageRegistry.addName(Iron_Hammer_Left_Gunpowder_Half, "Iron Hammer Left Gunpowder Half");
	LanguageRegistry.addName(Iron_Hammer_Right_Lighter_Half, "Iron Hammer Right Lighter Half");
	LanguageRegistry.addName(Gold_Hammer_Left_Gunpowder_Half, "Gold Hammer Left Gunpowder Half");
	LanguageRegistry.addName(Gold_Hammer_Right_Lighter_Half, "Gold Hammer Right Lighter Half");
	LanguageRegistry.addName(Diamond_Hammer_Left_Gunpowder_Half, "Diamond Hammer Left Gunpowder Half");
	LanguageRegistry.addName(Diamond_Hammer_Right_Lighter_Half, "Diamond Hammer Right Lighter Half");

	LanguageRegistry.addName(Iron_Synthesis, "Iron Synthesis");
	LanguageRegistry.addName(Gold_Synthesis, "Gold Synthesis");
	LanguageRegistry.addName(Diamond_Synthesis, "Diamond Synthesis");

	LanguageRegistry.addName(Iron_Hammer, "Iron Hammer");
	LanguageRegistry.addName(Gold_Hammer, "Gold Hammer");
	LanguageRegistry.addName(Diamond_Hammer, "Diamond Hammer");

	LanguageRegistry.addName(Iron_HS, "Iron HS");
	LanguageRegistry.addName(Gold_HS, "Gold HS");
	LanguageRegistry.addName(Diamond_HS, "Diamond HS");

	//Magic
	LanguageRegistry.addName(Magic_Coal_Ore, "Magic Coal Ore");
	LanguageRegistry.addName(Magic_Iron_Ore, "Magic Iron Ore");
	LanguageRegistry.addName(Magic_Gold_Ore, "Magic Gold Ore");
	LanguageRegistry.addName(Magic_Diamond_Ore, "Magic Diamond Ore");

	LanguageRegistry.addName(Magic_Coal_Powder, "Magic Coal Powder");
	LanguageRegistry.addName(Magic_Iron_Powder, "Magic Iron Powder");
	LanguageRegistry.addName(Magic_Gold_Powder, "Magic Gold Powder");
	LanguageRegistry.addName(Magic_Diamond_Powder, "Magic Diamond Powder");

	//Power
	LanguageRegistry.addName(Killer_Shine, "Killer Shine");
	LanguageRegistry.addName(Killer_Sword, "Killer Sword");
	LanguageRegistry.addName(Killer_Pickaxe, "Killer Pickaxe");
	LanguageRegistry.addName(Killer_Axe, "Killer Axe");
	LanguageRegistry.addName(Killer_Hoe, "Killer Hoe");
	LanguageRegistry.addName(Killer_Shovel, "Killer Shovel");
	LanguageRegistry.addName(Revive_Bleed, "Revive Dark");
	LanguageRegistry.addName(Revive_Sword, "Revive Sword");
	LanguageRegistry.addName(Revive_Pickaxe, "Revive Pickaxe");
	LanguageRegistry.addName(Revive_Axe, "Revive Axe");
	LanguageRegistry.addName(Revive_Hoe, "Revive Hoe");
	LanguageRegistry.addName(Revive_Shovel, "Revive Shovel");

	}

@Override
public String getVersion()
{
	return null;
}

}

Posted

package net.PowerfulInventory.Mod;

public class mod_PowerfulInventory extends BaseMod
{

@EventHandler
    public void preInit(FMLPreInitializationEvent event)
    {
    }

@EventHandler
    public void load()
    {
}

At least, follow the tutorials to make a working mod class, please.  :'(

Posted

package net.PowerfulInventory.Mod;

public class mod_PowerfulInventory extends BaseMod
{

@EventHandler
    public void preInit(FMLPreInitializationEvent event)
    {
    }

@EventHandler
    public void load()
    {
}

At least, follow the tutorials to make a working mod class, please.  :'(

 

I have this in my mod class

Posted

Oh wait I find this that has errors

 

it's in cpw.mods.fml.common.asm.transformers called AccessTransformer

 

Coding of AccessTransformer

 

/*
* Forge Mod Loader
* Copyright (c) 2012-2013 cpw.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the GNU Lesser Public License v2.1
* which accompanies this distribution, and is available at
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
*
* Contributors:
*     cpw - implementation
*/

package cpw.mods.fml.common.asm.transformers;

import static org.objectweb.asm.Opcodes.ACC_FINAL;
import static org.objectweb.asm.Opcodes.ACC_PRIVATE;
import static org.objectweb.asm.Opcodes.ACC_PROTECTED;
import static org.objectweb.asm.Opcodes.ACC_PUBLIC;

import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.net.URL;
import java.util.Collection;
import java.util.List;
import java.util.zip.ZipEntry;
import java.util.zip.ZipInputStream;
import java.util.zip.ZipOutputStream;

import net.minecraft.launchwrapper.IClassTransformer;

import org.objectweb.asm.ClassReader;
import org.objectweb.asm.ClassWriter;
import org.objectweb.asm.tree.ClassNode;
import org.objectweb.asm.tree.FieldNode;
import org.objectweb.asm.tree.MethodNode;

import com.google.common.base.Charsets;
import com.google.common.base.Splitter;
import com.google.common.collect.ArrayListMultimap;
import com.google.common.collect.Iterables;
import com.google.common.collect.Lists;
import com.google.common.collect.Multimap;
import com.google.common.io.LineProcessor;
import com.google.common.io.Resources;

import cpw.mods.fml.common.asm.transformers.deobf.FMLDeobfuscatingRemapper;
import cpw.mods.fml.relauncher.FMLRelaunchLog;

public class AccessTransformer implements IClassTransformer
{
    private static final boolean DEBUG = false;
    private class Modifier
    {
        public String name = "";
        public String desc = "";
        public int oldAccess = 0;
        public int newAccess = 0;
        public int targetAccess = 0;
        public boolean changeFinal = false;
        public boolean markFinal = false;
        protected boolean modifyClassVisibility;

        private void setTargetAccess(String name)
        {
            if (name.startsWith("public")) targetAccess = ACC_PUBLIC;
            else if (name.startsWith("private")) targetAccess = ACC_PRIVATE;
            else if (name.startsWith("protected")) targetAccess = ACC_PROTECTED;

            if (name.endsWith("-f"))
            {
                changeFinal = true;
                markFinal = false;
            }
            else if (name.endsWith("+f"))
            {
                changeFinal = true;
                markFinal = true;
            }
        }
    }

    private Multimap<String, Modifier> modifiers = ArrayListMultimap.create();

    public AccessTransformer() throws IOException
    {
        this("fml_at.cfg");
    }
    protected AccessTransformer(String rulesFile) throws IOException
    {
        readMapFile(rulesFile);
    }

    private void readMapFile(String rulesFile) throws IOException
    {
        File file = new File(rulesFile);
        URL rulesResource;
        if (file.exists())
        {
            rulesResource = file.toURI().toURL();
        }
        else
        {
            rulesResource = Resources.getResource(rulesFile);
        }
        Resources.readLines(rulesResource, Charsets.UTF_8, new LineProcessor<Void>()
        {
            @Override
            public Void getResult()
            {
                return null;
            }

            @Override
            public boolean processLine(String input) throws IOException
            {
                String line = Iterables.getFirst(Splitter.on('#').limit(2).split(input), "").trim();
                if (line.length()==0)
                {
                    return true;
                }
                List<String> parts = Lists.newArrayList(Splitter.on(" ").trimResults().split(line));
                if (parts.size()>2)
                {
                    throw new RuntimeException("Invalid config file line "+ input);
                }
                Modifier m = new Modifier();
                m.setTargetAccess(parts.get(0));
                List<String> descriptor = Lists.newArrayList(Splitter.on(".").trimResults().split(parts.get(1)));
                if (descriptor.size() == 1)
                {
                    m.modifyClassVisibility = true;
                }
                else
                {
                    String nameReference = descriptor.get(1);
                    int parenIdx = nameReference.indexOf('(');
                    if (parenIdx>0)
                    {
                        m.desc = nameReference.substring(parenIdx);
                        m.name = nameReference.substring(0,parenIdx);
                    }
                    else
                    {
                        m.name = nameReference;
                    }
                }
                modifiers.put(descriptor.get(0).replace('/', '.'), m);
                return true;
            }
        });
        System.out.printf("Loaded %d rules from AccessTransformer config file %s\n", modifiers.size(), rulesFile);
    }

    @Override
    public byte[] transform(String name, String transformedName, byte[] bytes)
    {
        if (bytes == null) { return null; }
        boolean makeAllPublic = FMLDeobfuscatingRemapper.INSTANCE.isRemappedClass(name);

        if (DEBUG)
        {
            FMLRelaunchLog.fine("Considering all methods and fields on %s (%s): %b\n", name, transformedName, makeAllPublic);
        }
        if (!makeAllPublic && !modifiers.containsKey(name)) { return bytes; }

        ClassNode classNode = new ClassNode();
        ClassReader classReader = new ClassReader(bytes);
        classReader.accept(classNode, 0);

        if (makeAllPublic)
        {
            // class
            Modifier m = new Modifier();
            m.targetAccess = ACC_PUBLIC;
            m.modifyClassVisibility = true;
            modifiers.put(name,m);
            // fields
            m = new Modifier();
            m.targetAccess = ACC_PUBLIC;
            m.name = "*";
            modifiers.put(name,m);
            // methods
            m = new Modifier();
            m.targetAccess = ACC_PUBLIC;
            m.name = "*";
            m.desc = "<dummy>";
            modifiers.put(name,m);
            if (DEBUG)
            {
                System.out.printf("Injected all public modifiers for %s (%s)\n", name, transformedName);
            }
        }

        Collection<Modifier> mods = modifiers.get(name);
        for (Modifier m : mods)
        {
            if (m.modifyClassVisibility)
            {
                classNode.access = getFixedAccess(classNode.access, m);
                if (DEBUG)
                {
                    System.out.println(String.format("Class: %s %s -> %s", name, toBinary(m.oldAccess), toBinary(m.newAccess)));
                }
                continue;
            }
            if (m.desc.isEmpty())
            {
                for (FieldNode n : classNode.fields)
                {
                    if (n.name.equals(m.name) || m.name.equals("*"))
                    {
                        n.access = getFixedAccess(n.access, m);
                        if (DEBUG)
                        {
                            System.out.println(String.format("Field: %s.%s %s -> %s", name, n.name, toBinary(m.oldAccess), toBinary(m.newAccess)));
                        }

                        if (!m.name.equals("*"))
                        {
                            break;
                        }
                    }
                }
            }
            else
            {
                for (MethodNode n : classNode.methods)
                {
                    if ((n.name.equals(m.name) && n.desc.equals(m.desc)) || m.name.equals("*"))
                    {
                        n.access = getFixedAccess(n.access, m);
                        if (DEBUG)
                        {
                            System.out.println(String.format("Method: %s.%s%s %s -> %s", name, n.name, n.desc, toBinary(m.oldAccess), toBinary(m.newAccess)));
                        }

                        if (!m.name.equals("*"))
                        {
                            break;
                        }
                    }
                }
            }
        }

        ClassWriter writer = new ClassWriter(ClassWriter.COMPUTE_MAXS);
        classNode.accept(writer);
        return writer.toByteArray();
    }

    private String toBinary(int num)
    {
        return String.format("%16s", Integer.toBinaryString(num)).replace(' ', '0');
    }

    private int getFixedAccess(int access, Modifier target)
    {
        target.oldAccess = access;
        int t = target.targetAccess;
        int ret = (access & ~7);

        switch (access & 7)
        {
        case ACC_PRIVATE:
            ret |= t;
            break;
        case 0: // default
            ret |= (t != ACC_PRIVATE ? t : 0 /* default */);
            break;
        case ACC_PROTECTED:
            ret |= (t != ACC_PRIVATE && t != 0 /* default */? t : ACC_PROTECTED);
            break;
        case ACC_PUBLIC:
            ret |= (t != ACC_PRIVATE && t != 0 /* default */&& t != ACC_PROTECTED ? t : ACC_PUBLIC);
            break;
        default:
            throw new RuntimeException("The fuck?");
        }

        // Clear the "final" marker on fields only if specified in control field
        if (target.changeFinal && target.desc == "")
        {
            if (target.markFinal)
            {
                ret |= ACC_FINAL;
            }
            else
            {
                ret &= ~ACC_FINAL;
            }
        }
        target.newAccess = ret;
        return ret;
    }

    public static void main(String[] args)
    {
        if (args.length < 2)
        {
            System.out.println("Usage: AccessTransformer <JarPath> <MapFile> [MapFile2]... ");
            System.exit(1);
        }

        boolean hasTransformer = false;
        AccessTransformer[] trans = new AccessTransformer[args.length - 1];
        for (int x = 1; x < args.length; x++)
        {
            try
            {
                trans[x - 1] = new AccessTransformer(args[x]);
                hasTransformer = true;
            }
            catch (IOException e)
            {
                System.out.println("Could not read Transformer Map: " + args[x]);
                e.printStackTrace();
            }
        }

        if (!hasTransformer)
        {
            System.out.println("Culd not find a valid transformer to perform");
            System.exit(1);
        }

        File orig = new File(args[0]);
        File temp = new File(args[0] + ".ATBack");
        if (!orig.exists() && !temp.exists())
        {
            System.out.println("Could not find target jar: " + orig);
            System.exit(1);
        }

        if (!orig.renameTo(temp))
        {
            System.out.println("Could not rename file: " + orig + " -> " + temp);
            System.exit(1);
        }

        try
        {
            processJar(temp, orig, trans);
        }
        catch (IOException e)
        {
            e.printStackTrace();
            System.exit(1);
        }

        if (!temp.delete())
        {
            System.out.println("Could not delete temp file: " + temp);
        }
    }

    private static void processJar(File inFile, File outFile, AccessTransformer[] transformers) throws IOException
    {
        ZipInputStream inJar = null;
        ZipOutputStream outJar = null;

        try
        {
            try
            {
                inJar = new ZipInputStream(new BufferedInputStream(new FileInputStream(inFile)));
            }
            catch (FileNotFoundException e)
            {
                throw new FileNotFoundException("Could not open input file: " + e.getMessage());
            }

            try
            {
                outJar = new ZipOutputStream(new BufferedOutputStream(new FileOutputStream(outFile)));
            }
            catch (FileNotFoundException e)
            {
                throw new FileNotFoundException("Could not open output file: " + e.getMessage());
            }

            ZipEntry entry;
            while ((entry = inJar.getNextEntry()) != null)
            {
                if (entry.isDirectory())
                {
                    outJar.putNextEntry(entry);
                    continue;
                }

                byte[] data = new byte[4096];
                ByteArrayOutputStream entryBuffer = new ByteArrayOutputStream();

                int len;
                do
                {
                    len = inJar.read(data);
                    if (len > 0)
                    {
                        entryBuffer.write(data, 0, len);
                    }
                }
                while (len != -1);

                byte[] entryData = entryBuffer.toByteArray();

                String entryName = entry.getName();

                if (entryName.endsWith(".class") && !entryName.startsWith("."))
                {
                    ClassNode cls = new ClassNode();
                    ClassReader rdr = new ClassReader(entryData);
                    rdr.accept(cls, 0);
                    String name = cls.name.replace('/', '.').replace('\\', '.');

                    for (AccessTransformer trans : transformers)
                    {
                        entryData = trans.transform(name, name, entryData);
                    }
                }

                ZipEntry newEntry = new ZipEntry(entryName);
                outJar.putNextEntry(newEntry);
                outJar.write(entryData);
            }
        }
        finally
        {
            if (outJar != null)
            {
                try
                {
                    outJar.close();
                }
                catch (IOException e)
                {
                }
            }

            if (inJar != null)
            {
                try
                {
                    inJar.close();
                }
                catch (IOException e)
                {
                }
            }
        }
    }
    public void ensurePublicAccessFor(String modClazzName)
    {
        Modifier m = new Modifier();
        m.setTargetAccess("public");
        m.modifyClassVisibility = true;
        modifiers.put(modClazzName, m);
    }
}

 

this two have errors

 

                for (FieldNode n : classNode.fields)

                for (MethodNode n : classNode.methods)

 

it's the classNode.fields

 

it's say for error "Type mismatch: cannot convert from element type Object to FieldNode" on both

Posted

Your package names have uppercase letters, that does work in eclipse, but not in recompiled minecraft.

Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support.

 

1.12 -> 1.13 primer by williewillus.

 

1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support.

 

http://www.howoldisminecraft1710.today/

Posted

The tutorial works. Read it again.  :-\

 

Maybe that isn't the problem

 

you didnt reobfuscate your mod  run the reobfuscate.bat/.sh program

 

I did but I'll do it again

try reobfuscate_srg.bat/.sh

 

That didn't work, I don't know what is wrong I may have to wait for a update. Also I tried removing the forge src and reinstall it and I get the same problem.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.