Posted June 10, 201411 yr so id like to begin by saying im a complete noob at coding in java, so the most literal explanation would be the most helpful thing for me. here's the link to the youtube series im watching to help me make a basic item here's my entire item class: package com.larson377.OddBlocks.Items; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.Item; public class CopperCoin extends Item { public CopperCoin(int i) { this.setUnlocalizedName("Copper Coin"); this.setTextureName("OddBlocks:123"); this.setCreativeTab(CreativeTabs.tabMisc); } } and here's my main java class: package com.larson377.OddBlocks; import net.minecraft.item.Item; import com.larson377.OddBlocks.Items.CopperCoin; import com.larson377.OddBlocks.lib.ProxyCommon; import com.larson377.OddBlocks.lib.References; import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod.EventHandler; import cpw.mods.fml.common.SidedProxy; import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.common.registry.LanguageRegistry; @Mod(modid = References.MODID, version = References.VERSION) public class OddBlocks { @SidedProxy(clientSide = References.Client, serverSide = References.Common) public static ProxyCommon proxy; //Items public static Item CopperCoin = new CopperCoin(4999); @EventHandler public void init(FMLInitializationEvent event) { } @EventHandler public void load(FMLInitializationEvent event) { proxy.registerRenderInformation(); } public OddBlocks () { //Item Registry GameRegistry.registerItem(CopperCoin, "Copper Coin"); LanguageRegistry.addName(CopperCoin, "Copper Coin"); } } my end goal here is to get the darn coin textured. 123 is the basic name i gave my png file, its 16x16 pixels. Learning to mod, plays with mods!
June 10, 201411 yr The format for the setTextureName() should be as follows. (Probably not what you want) Using the Unlocalized name for textures ---- this.setTextureName("YourModID" + ":" + getUnlocalizedName().substring(5)); (Probably what you want) Having a separate texture name ---- this.setTextureName("YourModID" + ":" + "YourTextureName"); Assuming your modid is OddBlocks it looks like you have everything set up correctly. The path you need for your item textures is as follows ---- root/src/main/resources/textures/items(Your PNG file in here) (root being where your gradlew batch file is)
June 10, 201411 yr Author i did exactly as you said, i double checked my modID is OddBlocks, put it in the correct folder as you stated, but it still doesnt work. any ideas on why that is? heres my new item class: package com.larson377.OddBlocks.Items; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.Item; public class CopperCoin extends Item { public CopperCoin(int i) { this.setUnlocalizedName("Copper Coin"); this.setTextureName("OddBlocks" + ":" + "123"); this.setCreativeTab(CreativeTabs.tabMisc); } } and yes, my coin is actually called 123.png. Learning to mod, plays with mods!
June 11, 201411 yr OddBlocks <-- not lowercase!!! -S- (if I helped, please click Thank and applaud) http://6upnqa.dm2301.livefilestore.com/y2mtf-vG7Tqq1TiiVpIm53KWj7294NDPoHfSHHb4PzZiMAUfRCfK0UY0MwOu7Q3zTBNVTKqWjr2-xgBfFRpQT5p-QivtvknPpoABMNUw9br9WuZcBFkjePhnAbW500gVm-P/sequiturian.png[/img]
June 11, 201411 yr Author tried putting oddblocks in all lowercase, didnt work. this is kinda getting depressing :'( Learning to mod, plays with mods!
June 11, 201411 yr {ECLIPSE_BASE}/src/main/resources/assets/oddblocks/textures/items/123.png -S- (if I helped, please click Thank and applaud) http://6upnqa.dm2301.livefilestore.com/y2mtf-vG7Tqq1TiiVpIm53KWj7294NDPoHfSHHb4PzZiMAUfRCfK0UY0MwOu7Q3zTBNVTKqWjr2-xgBfFRpQT5p-QivtvknPpoABMNUw9br9WuZcBFkjePhnAbW500gVm-P/sequiturian.png[/img]
June 12, 201411 yr Hi What error message are you getting? These links might help (although they're basically just the same as what sequitiri is already saying) http://www.minecraftforge.net/forum/index.php/topic,18371.msg92948.html#msg92948 http://greyminecraftcoder.blogspot.com.au/2013/12/overview-of-forge-and-what-it-can-do.html -TGG
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.