Textures not displaying (1.7.10)

13 views
Skip to first unread message

Matthew Keran

unread,
Aug 9, 2015, 1:55:45 PM8/9/15
to Sams Teach Yourself Minecraft Mod Development in 24 Hours
This is my code for my item:
public OreSword(SWORDTYPES sword)
   
{
       
super(sword.getMaterial());
        setUnlocalizedName
(RefStrings.MODID + "_" + sword.getName());
        setTextureName
(RefStrings.MODID + ":" + sword.getName());
        setCreativeTab
(CreativeTabs.tabCombat);
        sword
.setSword(this);
   
}



This is my folder structure:
main/resources/assets/oreswords/textures/items/redstonesword.png

main
/java/oreswords/items/OreSword.java


The image name is the same as sword.getName()

I have also tried replacing the ":" with "_" and making the file name "oreswords_redstonesword"


Also of note, I am defining multiple swords in this class, but they all have the correct display name from the lang file,

so I am pretty sure I have the declaration setup correctly.


Any idea as to why my textures might not be showing?


Matthew Keran

unread,
Aug 9, 2015, 2:06:02 PM8/9/15
to Sams Teach Yourself Minecraft Mod Development in 24 Hours
I suppose this would also probably relevant:
public static enum SWORDTYPES
   
{
        COAL
("coalsword", 1, 131, 4.0F, 1.0F, 5),//oreswords_coalsword
        DIAMOND
("diamondsword", 3, 1200, 8.0F, 3.0F, 30),//oreswords_diamondsword
        EMERALD
("emeraldsword", 3, 2300, 8.0F, 4.0F, 10),//oreswords_emeraldsword
        GOLD
("goldsword", 0, 25, 10.0F, 1.0F, 12),//oreswords_goldsword
        IRON
("ironsword", 2, 131, 6.0F, 2.0F, 14),//oreswords_ironsword
        LAPIS
("lapissword", 1, 131, 4.0F, 1.0F, 44),//oreswords_lapissword
        QUARTZ
("quartzsword", 3, 131, 8.0F, 3.0F, 10),//oreswords_quartzsword
        REDSTONE
("redstonesword", 2, 131, 6.0F, 2.0F, 14);//oreswords_redstonesword        
       
       
private String name;
       
/*private int hLevel;
        private int mUse;
        private float effic;
        private float damage;
        private int ench;*/

       
private ToolMaterial mat;
       
private OreSword sword;
       
private SWORDTYPES(String name, int hLevel, int mUse, float effic, float damage, int ench)
       
{
           
this.name = name;
           
this.mat = EnumHelper.addToolMaterial(name, hLevel, mUse, effic, damage, ench);
       
}
       
public String getName(){return name;}
       
public ToolMaterial getMaterial(){return mat;}
       
public void setSword(OreSword sword){this.sword = sword;}
       
public OreSword getSword(){return sword;}
   
}

Oh and the swords do the correct amount of damage.
Reply all
Reply to author
Forward
0 new messages