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

Hello all!

Its me again, but this time, I have something new. In picking up making my mod again, I had decided that I would like to make armor. I got it done (mostly, and that's why I'm here), but I cant get the texture to load. I was following a wuppy29 tutorial and came up with this main armor file.

package ryansmod.common.armor;

import ryansmod.RyansMod;
import net.minecraft.item.ItemArmor;
import net.minecraft.entity.Entity;
import net.minecraft.item.ItemStack;

public class RefinedDiamondArmor extends ItemArmor {
public RefinedDiamondArmor(ArmorMaterial material, int armortype, String name, String textureName)
{
	super(material, 0, armortype);
	setUnlocalizedName(name);
	setCreativeTab(RyansMod.RyansTab);
	setTextureName("ryansmod:"+textureName);
}

@Override
public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type)
{
	if(stack.getItem() == RyansMod.RefinedDiamondHelmet || stack.getItem() == RyansMod.RefinedDiamondChest || stack.getItem() == RyansMod.RefinedDiamondBoots)
	{
		return "ryansmod:models/armor/refined_diamond1.png";
	}
	else if(stack.getItem() == RyansMod.RefinedDiamondLeggings)
	{
		return "ryansmod:models/armor/refined_diamond2.png";

	}
	else
	{
		System.out.println("GG fool, you screwed it up!");
		return null;
	}
}
}

The problem though, is upon looking at myself in F5 the console screams about not being able to find "ryansmod:models/armor/refined_diamond1.png" and I get the purple and black squares of death. I am baffled, but perhapes someone can help me.

Thanks!

  • Author

So.

I spotted my stoopid. should've had 'return "ryansmod:texturs/models/armor/..." where I had 'return "ryansmod:/models/armor/...".

Thanks though to anyone who spotted it and was going to tell me.

yeah was about to reply. ^^ I use for my texture and it works all good.

 

.setBlockTextureName(modid + ":" + "testblock");

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.