Posted March 20, 201510 yr I am working on my first mod and have added 2 items and 3 swords but I cant see if it works because the test run will not launch minecraft it says [net.minecraft.client.Minecraft:displayCrashReport:398] but it says no errors... Please Help Full Report: ---- Minecraft Crash Report ---- // Hey, that tickles! Hehehe! Time: 20/03/15 8:37 PM Description: Initializing game java.lang.NullPointerException: Initializing game at we.are.the.warriors.WeAreTheWarriorsMod.preInit(WeAreTheWarriorsMod.java:40) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:513) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) at com.google.common.eventbus.EventBus.post(EventBus.java:275) at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:208) at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:187) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) at com.google.common.eventbus.EventBus.post(EventBus.java:275) at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:118) at cpw.mods.fml.common.Loader.preinitializeMods(Loader.java:513) at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:239) at net.minecraft.client.Minecraft.startGame(Minecraft.java:522) at net.minecraft.client.Minecraft.run(Minecraft.java:931) at net.minecraft.client.main.Main.main(Main.java:164) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source) at GradleStart.main(Unknown Source) A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Stacktrace: at we.are.the.warriors.WeAreTheWarriorsMod.preInit(WeAreTheWarriorsMod.java:40) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:513) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) at com.google.common.eventbus.EventBus.post(EventBus.java:275) at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:208) at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:187) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) at com.google.common.eventbus.EventBus.post(EventBus.java:275) at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:118) at cpw.mods.fml.common.Loader.preinitializeMods(Loader.java:513) at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:239) at net.minecraft.client.Minecraft.startGame(Minecraft.java:522) -- Initialization -- Details: Stacktrace: at net.minecraft.client.Minecraft.run(Minecraft.java:931) at net.minecraft.client.main.Main.main(Main.java:164) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source) at GradleStart.main(Unknown Source) -- System Details -- Details: Minecraft Version: 1.7.10 Operating System: Windows 7 (x86) version 6.1 Java Version: 1.8.0_25, Oracle Corporation Java VM Version: Java HotSpot Client VM (mixed mode), Oracle Corporation Memory: 769331720 bytes (733 MB) / 1046937600 bytes (998 MB) up to 1046937600 bytes (998 MB) JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0 FML: MCP v9.05 FML v7.10.85.1291 Minecraft Forge 10.13.2.1291 4 mods loaded, 4 mods active mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized FML{7.10.85.1291} [Forge Mod Loader] (forgeSrc-1.7.10-10.13.2.1291.jar) Unloaded->Constructed->Pre-initialized Forge{10.13.2.1291} [Minecraft Forge] (forgeSrc-1.7.10-10.13.2.1291.jar) Unloaded->Constructed->Pre-initialized watwm{1.0} [We Are The Warriors Mod] (bin) Unloaded->Constructed->Errored Launched Version: 1.7.10 LWJGL: 2.9.1 OpenGL: ATI Radeon 3000 Graphics GL version 3.3.10750 Compatibility Profile Context, ATI Technologies Inc. GL Caps: Using GL 1.3 multitexturing. Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported. Anisotropic filtering is supported and maximum anisotropy is 16. Shaders are available because OpenGL 2.1 is supported. Is Modded: Definitely; Client brand changed to 'fml,forge' Type: Client (map_client.txt) Resource Packs: [] Current Language: English (US) Profiler Position: N/A (disabled) Vec3 Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used Anisotropic Filtering: Off (1) The Creator of the We Are The Warriors Mod https://scontent-sjc.xx.fbcdn.net/hphotos-xpf1/v/t1.0-9/10985858_1068047526542843_8233581795453767454_n.png?oh=aad9679e5ae8470bbd9a58236c0e391b&oe=55AAFDC7[/img]
March 20, 201510 yr You have a null pointer in your main mod file Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
March 20, 201510 yr Author Code: package we.are.the.warriors; import we.are.the.warriors.item.Dragonsword; import we.are.the.warriors.item.ancientsword; import we.are.the.warriors.item.swordofcorruptedsouls; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.init.Items; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraftforge.common.util.EnumHelper; 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.registry.GameRegistry; @Mod(modid = "watwm", name = "We Are The Warriors Mod", version = "1.0") public class WeAreTheWarriorsMod { //Items public static Item itemsoulshard; public static Item itemcorruptsoulgem; public static Item itemdragonrod; //Swords public static Item swordofcorruptedsouls; public static Item dragonsword; public static Item ancientsword; public static final Item.ToolMaterial corruptedsoulsToolMaterial = EnumHelper.addToolMaterial("corruptedsoulsToolMaterial", 0, 20000, 1.0F, 16.0F, 2); public static final Item.ToolMaterial dragonToolMaterial = EnumHelper.addToolMaterial("dragonToolMaterial", 0, 2200, 1.0F, 8.0F, 7); public static final Item.ToolMaterial ancientToolMaterial = EnumHelper.addToolMaterial("ancientToolMaterial", 0, 200, 1.0F, 0.0F, 20); @EventHandler public void preInit(FMLPreInitializationEvent evnt) { //Item/Block init and registering //Config handling //Items itemdragonrod = new itemdragonrod().setUnlocalizedName("itemdragonrod").setTextureName("dragon_rod").setCreativeTab(tabWeAreTheWarriors); itemcorruptsoulgem = new itemcorruptsoulgem().setUnlocalizedName("itemcorruptsoulgem").setTextureName("corrupt_soul_gem").setCreativeTab(tabWeAreTheWarriors); itemsoulshard = new itemsoulshard().setUnlocalizedName("itemsoulshard").setTextureName("soul_shard").setCreativeTab(tabWeAreTheWarriors); //Items GameRegistry.registerItem(itemsoulshard, itemsoulshard.getUnlocalizedName().substring(5)); GameRegistry.registerItem(itemcorruptsoulgem, itemcorruptsoulgem.getUnlocalizedName().substring(5)); GameRegistry.registerItem(itemdragonrod, itemdragonrod.getUnlocalizedName().substring(5)); //Swords swordofcorruptedsouls = new swordofcorruptedsouls(corruptedsoulsToolMaterial).setUnlocalizedName("swordofcorruptedsouls").setTextureName("sword_of_corrupted_souls").setCreativeTab(tabWeAreTheWarriors); dragonsword = new dragonsword(dragonToolMaterial).setUnlocalizedName("dragonsword").setTextureName("watwm:dragon_sword").setCreativeTab(tabWeAreTheWarriors); ancientsword = new ancientsword(ancientToolMaterial).setUnlocalizedName("ancientsword").setTextureName("watwm:ancient_sword").setCreativeTab(tabWeAreTheWarriors); //Swords GameRegistry.registerItem(dragonsword, dragonsword.getUnlocalizedName().substring(5)); GameRegistry.registerItem(ancientsword, ancientsword.getUnlocalizedName().substring(5)); GameRegistry.registerItem(swordofcorruptedsouls, swordofcorruptedsouls.getUnlocalizedName().substring(5)); } @EventHandler public void init(FMLInitializationEvent event) { //Proxy, TileENtity, entity GUI and Packet Registering GameRegistry.addRecipe(new ItemStack(swordofcorruptedsouls), new Object[]{" a "," a "," b ", "a", itemcorruptsoulgem,"b", Items.stick}); } @EventHandler public void postInit(FMLPostInitializationEvent event) { } public static CreativeTabs tabWeAreTheWarriors = new CreativeTabs("tabWeAreTheWarriors"){ @Override public Item getTabIconItem(){ return new ItemStack(dragonsword).getItem(); } }; } DragonSword: package we.are.the.warriors; import net.minecraft.item.Item; import net.minecraft.item.Item.ToolMaterial; public class dragonsword extends Item { public dragonsword() { this.setFull3D(); } public dragonsword(ToolMaterial dragontoolmaterial) { // TODO Auto-generated constructor stub } } AncientSword: package we.are.the.warriors; import net.minecraft.item.Item; public class ancientsword extends Item { public ancientsword() { this.setFull3D(); this.setNoRepair(); }} Swordofcorruptedsouls: package we.are.the.warriors.item; import net.minecraft.item.Item; import net.minecraft.item.Item.ToolMaterial; public class swordofcorruptedsouls extends Item { public swordofcorruptedsouls() { this.setFull3D(); } public swordofcorruptedsouls(ToolMaterial corruptedsoulstoolmaterial) { // TODO Auto-generated constructor stub } } Itemsoulshard: package we.are.the.warriors; import net.minecraft.item.Item; public class itemsoulshard { public Item setUnlocalizedName(String string) { // TODO Auto-generated method stub return null; } } itemdragonrod: package we.are.the.warriors; import net.minecraft.item.Item; public class itemdragonrod { public Item setUnlocalizedName(String string) { // TODO Auto-generated method stub return null; } } itemcorruptedsoulgem: package we.are.the.warriors; import net.minecraft.item.Item; public class itemcorruptsoulgem { public Item setUnlocalizedName(String string) { // TODO Auto-generated method stub return null; } } The Creator of the We Are The Warriors Mod https://scontent-sjc.xx.fbcdn.net/hphotos-xpf1/v/t1.0-9/10985858_1068047526542843_8233581795453767454_n.png?oh=aad9679e5ae8470bbd9a58236c0e391b&oe=55AAFDC7[/img]
March 20, 201510 yr Dude, do you even know what you are doing? 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/
March 21, 201510 yr It's clear you don't know what you are doing currently, I REALLY encourage you to look at these tutorials, and possibly some basic java tutorials on things such as: Methods, classes and objects ETC. Heres some good tutorials on minecraft modding: http://bedrockminer.jimdo.com/modding-tutorials/
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.