Jump to content

[1.7.10] Armor have all the same texture [SOLVED]


Recommended Posts

Posted

I have a lot of armor to add to my mod and trying to have one class handle it all but all of the armor I add all have the the same texture.

Any help would be appreciated. Thanks..

 

public static void initArmor()
{
	armorAluminiumHelmet    = new ooArmor (ooMaterials.armorAluminium, "aluminium", "helmetAluminium",     0, 0);
	armorAluminiumChestplate= new ooArmor (ooMaterials.armorAluminium, "aluminium", "chestplateAluminium", 0, 1);
	armorAluminiumLeggings  = new ooArmor (ooMaterials.armorAluminium, "aluminium", "leggingsAluminium",   0, 2);
	armorAluminiumBoots     = new ooArmor (ooMaterials.armorAluminium, "aluminium",  "bootsAluminium",     0, 3);
	armorAntimonyHelmet     = new ooArmor (ooMaterials.armorAntimony,  "antimony",  "helmetAntimony",      0, 0);
	armorAntimonyChestplate = new ooArmor (ooMaterials.armorAntimony,  "antimony", "chestplateAntimony",   0, 1);
	armorAntimonyLeggings   = new ooArmor (ooMaterials.armorAntimony,  "antimony",  "leggingsAntimony",    0, 2);
	armorAntimonyBoots      = new ooArmor (ooMaterials.armorAntimony,  "antimony",  "bootsAntimony",       0, 3);
	armorBerylliumHelmet    = new ooArmor (ooMaterials.armorBeryllium, "beryllium", "helmetBeryllium",     0, 0);
	armorBerylliumChestplate= new ooArmor (ooMaterials.armorBeryllium, "beryllium", "chestplateBeryllium", 0, 1);
	armorBerylliumLeggings  = new ooArmor (ooMaterials.armorBeryllium, "beryllium", "leggingsBeryllium",   0, 2);
	armorBerylliumBoots     = new ooArmor (ooMaterials.armorBeryllium, "beryllium", "bootsBeryllium",      0, 3);

 

public class ooArmor extends ItemArmor 
{
public static String texture;

public ooArmor(ArmorMaterial mat, String texture, String name, int index, int type) {
	super(mat, index, type);
	this.setUnlocalizedName(name);
	this.texture = texture;
	this.setCreativeTab(OreOverhaul.tabOreOverhaul);

	GameRegistry.registerItem(this, this.getUnlocalizedName().substring(5));
}

@SideOnly(Side.CLIENT)
public void registerIcons(IIconRegister iconRegister)
{
	this.itemIcon = iconRegister.registerIcon(OreOverhaul.modid + ":" + this.getUnlocalizedName().substring(5));
}

@Override
public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type)
{
	if(this.armorType == 2)
	{
		return "oreoverhaul:textures/models/armor/" + this.texture + "2.png";
	}

	return "oreoverhaul:textures/models/armor/" + this.texture + "1.png";

}

}

Posted

Working title so far is OreOverhaul. I'll most likely stick with that unless I think of something better.

It is not released yet. Just started on it about a week ago.

General idea is to eliminate all the frustration of all the ores from different mods generating and conflicting.

It will disable all ore generation from all mods and vanilla and replace the ores with mine.

Also adding a lot of new ores based off of real world metals and minerals along with their

ingots, nuggets, dusts, armor and tools. Will be fully configurable with overworld, nether & end generation

with textures to match.

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.