Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

[1.10.2] How add custom armor? (I am new to forge)


nedas60
 Share

Recommended Posts

I tried searching tutorials but most of them had the setup where you type LONG lines to register the item. I also don't understand how to add the textures (Do they have to be in the same package?). I used MrCrayfish's setup (

) and I want to know how do you add armor with his registering setup. I have the line:
public static ArmorMaterial INFUSED_ARMOR = EnumHelper.addArmorMaterial("INFUSED_ARMOR", (I also dont understand how to add the textures), 200, new int[] {4, 9, 7, 4}, 30, SoundEvents.ITEM_ARMOR_EQUIP_DIAMOND, 5.0F);

Thanks!  :)

Link to comment
Share on other sites

I believe he wants to know how to use the vanilla model, but apply his own texture if not that is how you would go about doing that. But I believe there is a method called getArmorTexture in Item.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Link to comment
Share on other sites

You create 4 items one for each piece of armor, initialize them using a class that extends ItemArmor. Register them normally. And in the class that extends ItemArmor add getArmorTexture and set the armor texture path as the return for each item you initialize to that class.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Link to comment
Share on other sites

You create 4 items one for each piece of armor, initialize them using a class that extends ItemArmor. Register them normally. And in the class that extends ItemArmor add getArmorTexture and set the armor texture path as the return for each item you initialize to that class.

Thanks but how do I add the texture to the ArmorMaterial? That is the main problem for me. It gives an error without it.

Link to comment
Share on other sites

It seems to render as a black box. Do I need to add something to the class?

package Nedas60.TestMod.items;

import net.minecraft.item.ItemArmor;
import Nedas60.TestMod.Reference;
import net.minecraft.inventory.EntityEquipmentSlot;
import net.minecraft.item.Item;

public class Infused_Helmet extends ItemArmor {

public Infused_Helmet(ArmorMaterial material) {
	super(material, 1, EntityEquipmentSlot.HEAD);
                // - Sets item texture when in hand and in inventory + some other stuff 
	setUnlocalizedName(Reference.TestItems.INFUSED_HELMET.getUnlocalizedName());
	setRegistryName(Reference.TestItems.INFUSED_HELMET.getRegistryName());
}
}

 

And the Armor material I have is:

public static ArmorMaterial INFUSED_ARMOR = EnumHelper.addArmorMaterial("INFUSED_ARMOR", "ntm:textures/models/armor/Test", 200, new int[] {4, 9, 7, 4}, 30, SoundEvents.ITEM_ARMOR_EQUIP_DIAMOND, 5.0F);

Link to comment
Share on other sites

Just put modid:Test and it will append the rest of the path for you. Assuming you have two textures named Test_layer_1.png and Test_layer_2.png

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Link to comment
Share on other sites

Should be in this path assets/modid/textures/models/armor can I see a screenshot of your package directory.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

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

 Share



×
×
  • Create New...

Important Information

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