Posted March 19, 201510 yr Hi All its me again you all told me to start running all my stuff through my main.class so im doing that now however im having a few issues with the texturing I get the item to show however the texture is not showing I have attached all the files that I currently have. Main.java package COLCTut; import net.minecraft.client.Minecraft; import net.minecraft.client.resources.model.ModelResourceLocation; import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.Mod.EventHandler; import net.minecraftforge.fml.common.event.FMLInitializationEvent; import net.minecraftforge.fml.common.event.FMLPostInitializationEvent; import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; import net.minecraftforge.fml.common.registry.GameRegistry; import COLCTut.items.testitem; @Mod(modid = Main.MODID, version = Main.VERSION) public class Main { public static final String MODID = "COLCMod"; public static final String VERSION = "1.0"; public static Item testitem = new testitem(); @EventHandler public void init(FMLInitializationEvent event) { CraftingRecipies(); GameRegistry.registerItem(testitem, "testitem"); Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(testitem, 0, new ModelResourceLocation(MODID + ":" + testitem.getUnlocalizedName().substring(5),"inventory")); } @EventHandler public void Postinit(FMLPostInitializationEvent event) { } @EventHandler public void Preinit(FMLPreInitializationEvent event) { } // ########### This Your Recipes CRAFTING And SMELTING ########### public void CraftingRecipies() { // ########### Recipe 1 - Shaped ########### GameRegistry.addRecipe(new ItemStack(Items.diamond,64),new Object[]{ "ddd", "dsd", "ddd", Character.valueOf('d'),Blocks.dirt, Character.valueOf('s'),Items.apple }); // ########### End Of Recipes - Shaped ########### // ########### Recipe 2 - UnShaped ########### GameRegistry.addShapelessRecipe(new ItemStack(Items.diamond,64 ),new ItemStack(Blocks.dirt)); // ########### End Of Recipes - UnShaped ########### // ########### Smelting Section ########### GameRegistry.addSmelting(Blocks.dirt, new ItemStack(Items.iron_ingot), 200); // ########### End of Smelting ########### } } testitem.json { "parent": "builtin/generated", "textures": { "layer0": "COLCMod:items/testitem" }, "display": { "thirdperson": { "rotation": [ -90, 0, 0 ], "translation": [ 0, 1, -3 ], "scale": [ 0.55, 0.55, 0.55 ] }, "firstperson": { "rotation": [ 0, -135, 25 ], "translation": [ 0, 4, 2 ], "scale": [ 1.7, 1.7, 1.7 ] } } } testitem.java package COLCTut.items; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.Item; public class testitem extends Item { public testitem() { this.setUnlocalizedName("testitem"); this.setCreativeTab(CreativeTabs.tabMaterials); } } Package Explorer
March 19, 201510 yr I'm pretty sure the assets/modid has to be all lowercase, as well as every reference to it. If not then I'm not sure what the issue is, could you ellaborate on "not showing I have attached all the files that I currently have" I don't understand this "attaching files" statement. Also a bit of a nitpick, method names should be camelcase so instead of Postinit and Preinit, postInit and preInit
March 19, 201510 yr Author I'm pretty sure the assets/modid has to be all lowercase, as well as every reference to it. If not then I'm not sure what the issue is, could you ellaborate on "not showing I have attached all the files that I currently have" I don't understand this "attaching files" statement. Also a bit of a nitpick, method names should be camelcase so instead of Postinit and Preinit, postInit and preInit Sorry I meant I have displayed on the forum all files that are being used for the Item.... I don't think that the uppercase is the issue here
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.