Izar Posted July 26, 2014 Posted July 26, 2014 Hello I'm new to modding and I need help trying to figure out why my texture file won't work. Eclipse doesn't display any errors when I run Minecraft but all I get is the "Missing Texture" icon Here is a sample of my code: It's going to be a bedrock mod package com.minecraft.bedrockmod; import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod.EventHandler; import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.event.FMLPreInitializationEvent; import cpw.mods.fml.common.registry.GameRegistry; import net.minecraft.block.Block; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.init.Items; import net.minecraft.item.Item; @Mod(modid = BedrockPiece.modid, version = BedrockPiece.version) public class BedrockPiece { public static final String modid = "BedrockPiece"; public static final String version = "1.0"; public static Item BedrockPiece; @EventHandler public void init(FMLPreInitializationEvent event){ BedrockPiece = new Item().setUnlocalizedName("BedrockPiece").setCreativeTab(CreativeTabs.tabMaterials).setTextureName(modid + ":" + "bedrockpiece"); GameRegistry.registerItem(BedrockPiece, "BedrockPiece"); } @EventHandler public void init(FMLInitializationEvent event){ } } I would appreciate any help... Thanks Fellow Minecrafter & Modder Quote
Izar Posted July 26, 2014 Author Posted July 26, 2014 ahhhh yes I forgot The Platforms and Versions! The platform that I'm coding on is Mac OS X 10.9.4 Minecraft Version is 1.7.10 Eclipse is 4.4.0 Luna Sry about that Quote
Xcox123 Posted July 26, 2014 Posted July 26, 2014 1. Use spoiler tags for code 2. Please actually try googling before posting here.. there are plenty of tutorials on how to do this. Heres what you've done wrong(so you know) 1. Do not declare BedrockPiece as Item(). Make your own class. 2. You have not included @SideOnly(Side.CLIENT) in your code anywhere. This goes in your own class you made above 3. You have 2 public void init's, why? 4. You have not set the ItemID. Really... what do you expect. Code doesn't go "oh I guess he'll want a texture for this... lets try and find it". You need to tell it exactly what do to. Where in your code do you think you've told it to load a texture? Quote
Izar Posted July 26, 2014 Author Posted July 26, 2014 Where would I put @SideOnly? And where would I set the Item ID What do you mean make my own class? Again, I'm new to modding Also, I have followed other tutorials and am doing the exact same thing Quote
Xcox123 Posted July 26, 2014 Posted July 26, 2014 http://www.minecraftforge.net/wiki/Basic_Items My first google.... Quote
Recommended Posts
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.