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

Okay this may seem realy noobish but I need help with creating custom armor (put facepalm gif here)

Does anybody know whats wrong with this line of code here

 

@Override

public String getArmorTexture(ItemStack itemstack) {  (<-------------- I removed the add overide and that went away)

if(itemstack.itemID == TitaniumMod.TitanHelmet.itemID || itemstack.itemID == TitaniumMod.TitanPlate.itemID || itemstack.itemID == TitaniumMod.TitanBoots.itemID){

return <------------ this method must return a result of type string

}

 

 

this from my main mod class

//armor

 

TitanHelmet = new TitanArmor(3457, TitanHelmet, proxy.addArmor(""), 0).setUnlocalizedName("");

TitanPlate = new TitanArmor(3458, TitanPlate, proxy.addArmor(""), 1).setUnlocalizedName("");

TitanLegs = new TitanArmor(3459, TitanLegs, proxy.addArmor(""), 2).setUnlocalizedName("");

TitanBoots = new TitanArmor(3460, TitanBoots, proxy.addArmor(""), 3).setUnlocalizedName("");

 

  • Author

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

 

 

TitanBoots = new TitanArmor(2040, TitanArmor, 6, 3).setUnlocalizedName("titaniumboots");

this works for me

  • Author

okay now its just purple and black squares. I put it in my items folder but now it says this

 

 

2013-07-12 09:37:21 [iNFO] [Minecraft-Client] Reloading ResourceManager: Default, FMLFileResourcePack:titaniummod

2013-07-12 09:37:21 [sEVERE] [Minecraft-Client] Using missing texture, unable to load: minecraft:textures/items/MISSING_ICON_ITEM_2296_titaniumboots.png

2013-07-12 09:37:21 [sEVERE] [Minecraft-Client] Using missing texture, unable to load: minecraft:textures/items/MISSING_ICON_ITEM_2293_tianiumhelmet.png

2013-07-12 09:37:21 [sEVERE] [Minecraft-Client] Using missing texture, unable to load: minecraft:textures/items/MISSING_ICON_ITEM_2295_titaniumlegs.png

2013-07-12 09:37:21 [sEVERE] [Minecraft-Client] Using missing texture, unable to load: minecraft:textures/items/MISSING_ICON_ITEM_2294_titaniumplate.png

 

 

I was able ot fix the missing texture but it shows up on my body as nothing any idea how to render it?

 

whats the MISSING_ICON_ITEM_2294 from

 

armor class

 

package minecraftmod;

 

import net.minecraft.client.renderer.texture.IconRegister;

import net.minecraft.item.EnumArmorMaterial;

import net.minecraft.item.ItemArmor;

 

public class TitanArmor extends ItemArmor{

 

        public TitanArmor (int par1, EnumArmorMaterial par2EnumArmorMaterial,

                        int par3, int par4) {

                super(par1, par2EnumArmorMaterial, par3, par4);

        }

     

        public void updateIcons(IconRegister iconRegister) {

       

                        itemIcon = iconRegister.registerIcon("titaniummod:titanboots");

                     

                            itemIcon = iconRegister.registerIcon("titaniummod:titanhelm");

                       

                                itemIcon = iconRegister.registerIcon("titaniummod:titanlegs");

                         

                                    itemIcon = iconRegister.registerIcon("titaniummod:titanplate");

        }}

 

Main class

 

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

 

TitanHelmet = new TitanArmor(2037, TitanArmor, 6, 0).setUnlocalizedName("tianiumhelmet");

TitanPlate = new TitanArmor(2038, TitanArmor, 6, 1).setUnlocalizedName("titaniumplate");

TitanLegs = new TitanArmor(2039, TitanArmor, 6, 2).setUnlocalizedName("titaniumlegs");

TitanBoots = new TitanArmor(2040, TitanArmor, 6, 3).setUnlocalizedName("titaniumboots");

 

 

 

 

 

  • Author

 

package minecraftmod;

 

import net.minecraft.client.renderer.texture.IconRegister;

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 void registerIcons(IconRegister IconRegister)

    {

    //itemIcon = par1IconRegister.registerIcon("minecraftmod:titanhelmet");

    //}

 

//public void registerIcons(IconRegister iconRegister)

//{

switch (armorType){

case 0:

        itemIcon = IconRegister.registerIcon("titaniummod:titanhell");

        break;

case 1:

itemIcon = IconRegister.registerIcon("titaniummod:titanchest");

        break;

case 2:

itemIcon = IconRegister.registerIcon("titaniummod:titaniumlegs");

        break;

case 3:

itemIcon = IconRegister.registerIcon("titaniummod:titaniumboots");

        break;

}

}

 

}

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Is this better your highness      \0/

                                                  | |                                   

                                                  _||_

 

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.