Jump to content

Recommended Posts

Posted

Hello Everyone, I've tried to add some custom armor to my mod. I got the armor to work but the problem is it's not rendering because it's looking in minecraft's texture folder, not my mod's. If someone can help me fix this that would be great because I've been at this for hours.

 

Emerald Armor Code

 

package com.skullcrusher.BetterThings.Armor;

 

import net.minecraft.item.ItemArmor;

import net.minecraft.item.ItemStack;

 

import com.skullcrusher.BetterThings.BetterThings;

import com.sun.xml.internal.stream.Entity;

 

public class EmeraldArmor extends ItemArmor

{

public EmeraldArmor(ArmorMaterial armormaterial, int renderID, int partID)

{

super(armormaterial, renderID, partID);

}

 

public String getArmorTexture(ItemStack itemstack, Entity entity, int slot, String layer)

{

if((itemstack.getItem() == BetterThings.EmeraldHelmet) || (itemstack.getItem() == BetterThings.EmeraldChestplate) || (itemstack.getItem() == BetterThings.EmeraldBoots))

{

return "betterthings:textures/models/armor/emerald_layer_1.png";

}

if(itemstack.getItem() == BetterThings.EmeraldLeggings)

{

return "betterthings:textures/models/armor/emerald_layer_2.png";

}

else return null;

}

}

 

 

Error in console

 

Failed to load texture: minecraft:textures/models/armor/5_layer_1.png

java.io.FileNotFoundException: minecraft:textures/models/armor/5_layer_1.png

 

[Client thread/WARN]: Failed to load texture: minecraft:textures/models/armor/5_layer_2.png

java.io.FileNotFoundException: minecraft:textures/models/armor/5_layer_2.png

 

 

The path to my texture is "betterthings:textures/models/armor/"

My mod id is "BetterThings" all the other textures work fine, it's just the armor isn't

Posted

Did that, Still get the same error it keeps looking in minecraft:textures/models/armor for some reason. If I put the texture in that directory it'll work fine. But I don't want to do that because if someone wanted to make a texture pack with my mod in it, it would be a huge hastle because i'd have to have a minecraft folder with the betterthings folder. I don't see anything else telling it to look for a texture in that directory i'm so confused :(

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.