Posted July 5, 201312 yr Hey all, I having some trouble with some lines of code: My Classes: [spoiler=Package: beelzaboss.aerialcraft, Class: AerialCraftMain] package beelzaboss.aerialcraft; import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod.EventHandler; import cpw.mods.fml.common.Mod.Init; import cpw.mods.fml.common.Mod.Instance; import cpw.mods.fml.common.Mod.Item; 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.LanguageRegistry; @Mod(modid="AerialCraft", name="Aerial Craft", version="1.0.0") @NetworkMod(clientSideRequired=true, serverSideRequired=false) public class AerialCraftMain { // The instance of AerialCraft. @Instance("AerialCraft") public static AerialCraftMain instance; //ADD ITEMS //********* public static final Item ItemDutarFragment = new ItemDutarFragment(5001); // Server 'proxy' code being loaded. @SidedProxy(clientSide="tutorial.generic.client.ClientProxy", serverSide="tutorial.generic.CommonProxy") public static CommonProxy proxy; @EventHandler public void preInit(FMLPreInitializationEvent event) { // Stub Method } @EventHandler public void load(FMLInitializationEvent event) { proxy.registerRenderers(); //Language Registery LanguageRegistry.addName(ItemDutarFragment, "Dutar Fragment"); } @EventHandler public void postInit(FMLPostInitializationEvent event) { // Stub Method } } [spoiler=Package: beelzaboss.aerialcraft, Class: CommandProxy] package beelzaboss.aerialcraft; public class CommonProxy { // Client stuff public void registerRenderers() { // Nothing here as the server doesn't render graphics or entities! } } [spoiler=Package: beelzaboss.aerialcraft, Class: ItemDutarFragment] package beelzaboss.aerialcraft; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.Item; public class ItemDutarFragment extends Item { public ItemDutarFragment(int id) { super(id); //Config maxStackSize = 64; setCreativeTab(CreativeTabs.tabMaterials); setUnlocalizedName("ItemDutarFragment"); } @Override @SideOnly(Side.CLIENT) public void registerIcons(IconRegister iconRegister) { this.itemIcon = iconRegister.registerIcon("ItemDutarFragment:" + (this.getUnlocalizedName().substring(5))); } } [spoiler=Package: beelzaboss.aerialcraft.client, Class: ClientProxy] package beelzaboss.aerialcraft.client; import beelzaboss.aerialcraft.CommonProxy; public class ClientProxy extends CommonProxy { @Override public void registerRenderers() { // This is for rendering entities and so forth later on } } I am having trouble at Package: beelzaboss.aerialcraft Class: AerialCraftMain... public static final Item ItemDutarFragment =[glow=red,2,300] new ItemDutarFragment(5001);[/glow] Can anyone help me to fix this and make my client startup with no errors, Please. Any help will greatly be appreciated! Regards, Beelzaboss Trinity Gaming - South African Server, Custom Modpack (TrinityCraft/Launcher) 118 mods @ trinitygaming.co.za
July 5, 201312 yr can we have logs ? as we have NO idea what is the issue how to debug 101:http://www.minecraftforge.net/wiki/Debug_101 -hydroflame, author of the forge revolution-
July 5, 201312 yr Author Here you go ---- Minecraft Crash Report ---- // I feel sad now Time: 7/4/13 4:53 PM Description: Initializing game java.lang.ExceptionInInitializerError at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at cpw.mods.fml.common.FMLModContainer.constructMod(FMLModContainer.java:457) 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:193) at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:173) 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:104) at cpw.mods.fml.common.Loader.loadMods(Loader.java:510) at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:172) at net.minecraft.client.Minecraft.startGame(Minecraft.java:468) at net.minecraft.client.Minecraft.run(Minecraft.java:792) at net.minecraft.client.main.Main.main(Main.java:93) 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.ClassCastException: beelzaboss.aerialcraft.ItemDutarFragment cannot be cast to cpw.mods.fml.common.Mod$Item at beelzaboss.aerialcraft.AerialCraftMain.<clinit>(AerialCraftMain.java:28) ... 35 more A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Stacktrace: at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at cpw.mods.fml.common.FMLModContainer.constructMod(FMLModContainer.java:457) 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:193) at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:173) 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:104) at cpw.mods.fml.common.Loader.loadMods(Loader.java:510) at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:172) at net.minecraft.client.Minecraft.startGame(Minecraft.java:468) -- Initialization -- Details: Stacktrace: at net.minecraft.client.Minecraft.run(Minecraft.java:792) at net.minecraft.client.main.Main.main(Main.java:93) 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) -- System Details -- Details: Minecraft Version: 1.6.1 Operating System: Windows 7 (amd64) version 6.1 Java Version: 1.7.0_25, Oracle Corporation Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 980063760 bytes (934 MB) / 1056309248 bytes (1007 MB) up to 1056309248 bytes (1007 MB) JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M 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.03 FML v6.1.34.771 Minecraft Forge 8.9.0.771 4 mods loaded, 4 mods active mcp{7.51} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed FML{6.1.34.771} [Forge Mod Loader] (coremods) Unloaded->Constructed Forge{8.9.0.771} [Minecraft Forge] (coremods) Unloaded->Constructed AerialCraft{1.0.0} [Aerial Craft] (bin) Unloaded Launched Version: 1.6 LWJGL: 2.9.0 OpenGL: GeForce GTS 450/PCI/SSE2 GL version 4.1.0, NVIDIA Corporation Is Modded: Definitely; Client brand changed to 'fml,forge' Type: Client (map_client.txt) Resource Pack: Default Profiler Position: N/A (disabled) Vec3 Pool Size: ~~ERROR~~ NullPointerException: null Trinity Gaming - South African Server, Custom Modpack (TrinityCraft/Launcher) 118 mods @ trinitygaming.co.za
July 5, 201312 yr @diesieben07 well that and hes not constructing his Item in the preInit: //ADD ITEMS //********* public static final Item ItemDutarFragment = new ItemDutarFragment(5001); // Server 'proxy' code being loaded. @SidedProxy(clientSide="tutorial.generic.client.ClientProxy", serverSide="tutorial.generic.CommonProxy") public static CommonProxy proxy; @EventHandler public void preInit(FMLPreInitializationEvent event) { // Stub Method } change to import net.minecraft.item.Item; public class classname{ //ADD ITEMS //********* public static Item ItemDutarFragment; // Server 'proxy' code being loaded. @SidedProxy(clientSide="tutorial.generic.client.ClientProxy", serverSide="tutorial.generic.CommonProxy") public static CommonProxy proxy; @EventHandler public void preInit(FMLPreInitializationEvent event) { ItemDutarFragment = new ItemDutarFragment(5001); } how to debug 101:http://www.minecraftforge.net/wiki/Debug_101 -hydroflame, author of the forge revolution-
July 5, 201312 yr Author Change my main class to: package beelzaboss.aerialcraft; import net.minecraft.item.Item; import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod.EventHandler; 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.LanguageRegistry; @Mod(modid="AerialCraft", name="Aerial Craft", version="1.0.0") @NetworkMod(clientSideRequired=true, serverSideRequired=false) public class AerialCraftMain { // The instance of AerialCraft. @Instance("AerialCraft") public static AerialCraftMain instance; //Define Item //*********** public static Item ItemDutarFragment; // Server 'proxy' code being loaded. @SidedProxy(clientSide="tutorial.generic.client.ClientProxy", serverSide="tutorial.generic.CommonProxy") public static CommonProxy proxy; @EventHandler public void preInit(FMLPreInitializationEvent event) { //Add Item //******** ItemDutarFragment = new ItemDutarFragment(5001); } @EventHandler public void load(FMLInitializationEvent event) { proxy.registerRenderers(); //Language Registery //****************** LanguageRegistry.addName(ItemDutarFragment, "Dutar Fragment"); } @EventHandler public void postInit(FMLPostInitializationEvent event) { // Stub Method } } But now I am getting this Error: ---- Minecraft Crash Report ---- // Ooh. Shiny. Time: 7/4/13 5:39 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: tutorial.generic.client.ClientProxy at cpw.mods.fml.common.ProxyInjector.inject(ProxyInjector.java:75) at cpw.mods.fml.common.FMLModContainer.constructMod(FMLModContainer.java:519) 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:193) at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:173) 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:104) at cpw.mods.fml.common.Loader.loadMods(Loader.java:510) at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:172) at net.minecraft.client.Minecraft.startGame(Minecraft.java:468) at net.minecraft.client.Minecraft.run(Minecraft.java:792) at net.minecraft.client.main.Main.main(Main.java:93) 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: tutorial.generic.client.ClientProxy 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.ProxyInjector.inject(ProxyInjector.java:58) ... 33 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.1 Operating System: Windows 7 (amd64) version 6.1 Java Version: 1.7.0_25, Oracle Corporation Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 968234688 bytes (923 MB) / 1056309248 bytes (1007 MB) up to 1056309248 bytes (1007 MB) JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M 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.03 FML v6.1.34.771 Minecraft Forge 8.9.0.771 4 mods loaded, 4 mods active mcp{7.51} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed FML{6.1.34.771} [Forge Mod Loader] (coremods) Unloaded->Constructed Forge{8.9.0.771} [Minecraft Forge] (coremods) Unloaded->Constructed AerialCraft{1.0.0} [Aerial Craft] (bin) Unloaded->Errored Trinity Gaming - South African Server, Custom Modpack (TrinityCraft/Launcher) 118 mods @ trinitygaming.co.za
July 5, 201312 yr yeah ... change this @SidedProxy(clientSide="tutorial.generic.client.ClientProxy", serverSide="tutorial.generic.CommonProxy") to thsi @SidedProxy(clientSide="beelzaboss.aerialcraft.client.ClientProxy", serverSide="beelzaboss.aerialcraft.CommonProxy") how to debug 101:http://www.minecraftforge.net/wiki/Debug_101 -hydroflame, author of the forge revolution-
July 5, 201312 yr Author Lol, I'm a noob haha. I am using Forge tutorials Trinity Gaming - South African Server, Custom Modpack (TrinityCraft/Launcher) 118 mods @ trinitygaming.co.za
July 5, 201312 yr I am using Forge tutorials yes yes we know how to debug 101:http://www.minecraftforge.net/wiki/Debug_101 -hydroflame, author of the forge revolution-
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.