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

My armor is not rendering does anybody know how ot render it.

 

armor class

package minecraftmod;

import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.entity.Entity;
import net.minecraft.item.EnumArmorMaterial;
import net.minecraft.item.ItemArmor;
import net.minecraft.item.ItemStack;
import net.minecraft.util.Icon;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;

public class TitanArmor extends ItemArmor{
    public final int armorType;
    private final EnumArmorMaterial material;


//public static final String[] ArmourArray = new String[]{"titanHelmet", "titanLeggings", "titanBoots", "titanlChest"};
    
    //@SideOnly(Side.CLIENT)
    //private Icon[] iconArray;

public TitanArmor(int itemId, EnumArmorMaterial EnumArmorMaterial,
		int par3, int par4) {
	super(itemId, EnumArmorMaterial, par3, par4);
        this.material = getArmorMaterial();
        this.armorType = par4;
}

    public EnumArmorMaterial getArmorMaterial()
    {
        return this.material;
    } public void updateIcons(IconRegister iconRegister) {
        
    }

   @Override
public String getArmorTexture(ItemStack par1, Entity entity, int slot, int layer) {
            
            if(itemID == TitaniumMod.TitanHelmet.itemID || par1.itemID == TitaniumMod.TitanLegs.itemID ||
                            par1.itemID == TitaniumMod.TitanPlate.itemID)
            {
                    return "titaniummod:textures/armor/blue_1";
            }
            
            if(itemID == TitaniumMod.TitanBoots.itemID)
            {
                    return "titaniummod:textures/armor/blue_2";}
		return field_111218_cA;



            }
           
    public void registerIcons(IconRegister IconRegister)
    {
    //itemIcon = par1IconRegister.registerIcon("minecraftmod:titanhelmet");
    //}

//public void registerIcons(IconRegister iconRegister)
//{
	switch (armorType){
	case 0:
        itemIcon = IconRegister.registerIcon("titaniummod:titaniumhelmet");
        break;
	case 1:
		itemIcon = IconRegister.registerIcon("titaniummod:titaniumchest");
        break;
	case 2:
		itemIcon = IconRegister.registerIcon("titaniummod:titaniumlegs");
        break;
	case 3:
		itemIcon = IconRegister.registerIcon("titaniummod:titaniumboots");
        break;
	}
}

}






























 

 

 

 

Main mod class

 

 

//armor

EnumArmorMaterial TitanArmor = EnumHelper.addArmorMaterial("TITANIUM", 12, new int[] {2, 5, 4, 2}, 9);

TitanHelmet = new TitanArmor(2293, TitanArmor, 6, 0).setUnlocalizedName("titaniumhelmet");
TitanPlate = new TitanArmor(2294, TitanArmor, 6, 1).setUnlocalizedName("titaniumchest");
TitanLegs = new TitanArmor(2295, TitanArmor, 6, 2).setUnlocalizedName("titaniumlegs");
TitanBoots = new TitanArmor(2296, TitanArmor, 6, 3).setUnlocalizedName("titaniumboots");

 

 

clientproxy(not sure if needed)

 

package minecraftmod;

import cpw.mods.fml.common.registry.EntityRegistry;
import net.minecraftforge.client.MinecraftForgeClient;
import minecraftmod.CommonProxy;
import minecraftmod.RenderShuriken;
import minecraftmod.EntityShuriken;
import minecraftmod.Shuriken;
import cpw.mods.fml.client.registry.RenderingRegistry;
import net.minecraft.client.renderer.entity.Render;
import net.minecraft.item.Item;
import net.minecraft.src.ModLoader;
import cpw.mods.fml.common.registry.EntityRegistry;

public class ClientProxy extends CommonProxy {


public int addArmor(String armor){
	return RenderingRegistry.addNewArmourRendererPrefix(armor);
}

// this is an render registry don't put stuff under this unless you want to render items.
        @Override
        public void registerRenderers() {
                // This is for rendering entities and so forth later on
        EntityRegistry.registerModEntity(EntityShuriken.class, "Shuriken", 49, this, 80, 3, false);
             	super.registerRenderers();	
            EntityRegistry.registerGlobalEntityID(EntityShuriken.class, "Shuriken", ModLoader.getUniqueEntityId());
           

            
}}

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.