Jump to content

Recommended Posts

Posted

Hello everyone i need help i know this sound basic but ive stop doing java for almst a year. Anyways

im trying to make armor work on picked players only and by doing it it must be have its name to be wore

 

here is my code anyways

@Override
public String getArmorTexture(ItemStack stack, Entity entity, int slot,
		String type) {
	for(int i = 0; i < Name.dragoonHelm.length; i++)
	if(entity instanceof EntityPlayer)
	{	
		EntityPlayer player = (EntityPlayer)entity;

			if (stack.getItem() == MHFCRegItem.mhfcitemdragoonhelm
			|| stack.getItem() == MHFCRegItem.mhfcitemdragoonchest
			|| stack.getItem() == MHFCRegItem.mhfcitemdragoonboots) {
				if(player.getDisplayName() == Name.dragoonHelm[i])
					return MHFCReference.armor_dragoon_tex1;
	}else return  "mhfc:textures/armor/null.png";
			if (stack.getItem() == MHFCRegItem.mhfcitemdragoonlegs) {
				if(player.getDisplayName() == Name.dragoonHelm[i])
					return MHFCReference.armor_dragoon_tex2;
	}else return  "mhfc:textures/armor/null.png";
	}
	return null;
}



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.