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

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

  • Author

I believe this link

is what I used as a start to figure out how to do it.

 

Thanks but I actually want the code not the textures:D

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.

  • Author

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.

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.

  • Author

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.

  • Author

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

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.

  • Author

Still doesn't seem to work. I have it in the src\main\resources\assets\ntm\models\armor folder. Is there anything wrong here?

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.