Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

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

  • 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.

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...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.