Posted October 19, 201312 yr Whenever I add this line of code: ItemStack hilt = new ItemStack(SeroeMod.hiltBlueLightsaber); Minecraft won't start. Here is the link to the error: http://pastebin.com/EgxhkeHd Here is the link to my main class: http://pastebin.com/3xbeLpQ5 Here is a link to my hiltBlueLightsaber class: http://pastebin.com/YaCwndfC Here is a link to my BlueLightsaber class, where I have the "ItemStack hilt = new ItemStack(SeroeMod.hiltBlueLightsaber);" code: http://pastebin.com/5CDC8v1B Also, in my BlueLightsaber class, why doesn't this code work: @Override public boolean onItemUse(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, World par3World, int par4, int par5, int par6, int par7, float par8, float par9, float par10) { par3World.playSoundAtEntity(par2EntityPlayer, "seroemod:swing", 500.0F, 1.0F); return true; } My intention is to play a sound every time the user left-clicks. Thanks in advance
October 19, 201312 yr Author Okay, I fixed that. I also want to add durability to my item, so I extended ItemSword. When you have 2 open lightsabers in your inventory, damage applies to both of them. How might one fix that? Also, the lightsaber now will not close when it has damage. Also follow this link to see the update of my situation: http://www.minecraftforum.net/topic/2045112-why-does-minecraft-crash-when-i-add-this-line-of-code/
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.