Jump to content

What do i fill in here [...]


Quizer9O8

Recommended Posts

I'm adding in armor for my mod and I came across this: public static ArmorMaterial tin_helmet = EnumHelper.addArmorMaterial("tin_helmet", "mineralz", 125, 1, 30, soundOnEquip);

 

What am I supposed to do with soundOnEquip?

Has this something to do with the new sound whenever you equip yourself with gear?

If so where can I find the original sound of it?

Link to comment
Share on other sites

soundOnEquip

is the

SoundEvent

to play when the armour is equipped, yes. Look at the

ArmorMaterial

enum itself to see which

SoundEvent

s are used by vanilla armour.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Link to comment
Share on other sites

Use your IDE. In IntelliJ IDEA you can press Ctrl-N to bring up the Find Class window, this allows you to search for classes by name. Eclipse probably has a similar feature.

 

You can also browse the forgeSrc library in your IDE to find the

ItemArmor

class and the

ArmorMaterial

enum inside of it.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Link to comment
Share on other sites

Look for the

net.minecraft.item.ItemArmor

class inside the forgeSrc library.

 

If it doesn't have sources attached, you haven't set up your workspace properly. This page explains how to properly set up a ForgeGradle workspace.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Link to comment
Share on other sites

Ok i found it but now there's a new problem. I've been following a modding tutorial for 1.8.9 how to make your custom armor and this text keeps lighting up red.

 

public static ArmorMaterial tin_helmet = EnumHelper.addArmorMaterial("tin_helmet", "mineralz", 125, 3, 30, SoundEvents.item_armor_equip_iron);

 

now what?

Link to comment
Share on other sites

If you mouseover the line with the error, Eclipse should tell you exactly what's wrong with it.

 

In this case, the arguments you're passing to

EnumHelper.addArmorMaterial

don't match its signature. Look at the

EnumHelper

class in your IDE to see the signature of the method.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Link to comment
Share on other sites

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.