Jump to content

Recommended Posts

Posted

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!  :)

Posted

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.

Posted

I want to create armor with the infused armor material. I have the textures. I don't have the code for the class and I don't see any tutorials with MrCrayfish's setup.

Posted

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.

Posted

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.

Posted

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);

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.