Posted May 17, 201411 yr how would I add textures to an item in 1.7.2? Folder setup: \forge 1.7.2\src\main\resources\assets\futureweapons\textures\items
May 17, 201411 yr Author That didn't work code: package FutureWeapons; import Items.ItemPlasmaRifle; import net.minecraft.item.Item; import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod.EventHandler; import cpw.mods.fml.common.event.FMLPreInitializationEvent; /** * This @Mod annotation tells forge that we are creating a new mod. Without this, forge wont * find your mod. This takes 2 values, a modid, which is a "name" for your mod. This cant be the * same for ANY mod. So find a name which is new. Version is the current mod version. */ @Mod(modid = Reference.MODID, version = Reference.VERSION) public class FutureWeaponsMain { public static Item Plasma_Rifle; @EventHandler public void preInit(FMLPreInitializationEvent event) { //Block handlers, handles all blocks //Item handlers, handles all items Plasma_Rifle = new ItemPlasmaRifle(); RegisterHelper.registerItem(Plasma_Rifle); Plasma_Rifle = new ItemPlasmaRifle().setUnlocalizedName("ItemPlasmaRifle").setTextureName("Future Weapons:plasmarifle"); //Register handler, adds all the recipes } } folder setup: C:\Users\ijhpp_000\Desktop\forge 1.7.2\src\main\resources\assets\Future Weapons\textures\items
May 17, 201411 yr The folder name should be the same as your mod ID, and afaik your mod ID shouldn't be capital or have spaces. Also you should do setTextureName(Reference.MODID + ":texturename"), fetching from that one central variable makes it easy to modify your mod ID and ensures you never misspell it by accident.
May 17, 201411 yr Author still isn't working. I made the modID futureweapons changed code: package FutureWeapons; import Items.ItemPlasmaRifle; import net.minecraft.item.Item; import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod.EventHandler; import cpw.mods.fml.common.event.FMLPreInitializationEvent; /** * This @Mod annotation tells forge that we are creating a new mod. Without this, forge wont * find your mod. This takes 2 values, a modid, which is a "name" for your mod. This cant be the * same for ANY mod. So find a name which is new. Version is the current mod version. */ @Mod(modid = Reference.MODID, version = Reference.VERSION) public class FutureWeaponsMain { public static Item Plasma_Rifle; @EventHandler public void preInit(FMLPreInitializationEvent event) { //Block handlers, handles all blocks //Item handlers, handles all items Plasma_Rifle = new ItemPlasmaRifle(); RegisterHelper.registerItem(Plasma_Rifle); Plasma_Rifle = new ItemPlasmaRifle().setUnlocalizedName("ItemPlasmaRifle").setTextureName(Reference.MODID + ":plasmarifle"); //Register handler, adds all the recipes } }
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.