AnZaNaMa Posted August 9, 2016 Posted August 9, 2016 So, i've gone and made my first item and I go in game to look at it and it's got the black and purple missing texture. There are no errors in log regarding it so I'm not sure what I've done wrong. The item is called aether_star (unlocalized and registry name), the modid is "everythinginbetween" and the texture is in "src/main/resources/assets/everythinginbetween/textures/items/aether_star.png" I've used ModelLoader#setCustomModelResourceLocation() to register the model and there is a model in "models/item/aether_star.json" Here is a link to the log: http://pastebin.com/rsk81Hzx The Item Class: https://github.com/AnZaNaMa/EverythingInBetween/blob/master/src/main/java/com/anzanama/everythinginbetween/common/item/ItemAetherStar.java The ModItems Class (with ModelLoader method): https://github.com/AnZaNaMa/EverythingInBetween/blob/master/src/main/java/com/anzanama/everythinginbetween/common/item/ItemsEIB.java The Main Class: https://github.com/AnZaNaMa/EverythingInBetween/blob/master/src/main/java/com/anzanama/everythinginbetween/EverythingInBetween.java The Client Proxy Class: https://github.com/AnZaNaMa/EverythingInBetween/blob/master/src/main/java/com/anzanama/everythinginbetween/client/EIBClientProxy.java Quote - Just because things are the way they are doesn't mean they can't be the way you want them to be. Unless they're aspen trees. You can tell they're aspens 'cause the way they are.
The_Fireplace Posted August 9, 2016 Posted August 9, 2016 You need to have it use your modid as well. For example: ModelLoader.setCustomModelResourceLocation(item, 0, new ModelResourceLocation("everythinginbetween:"+item.getRegistryName(), "inventory")); If that doesn't work, try the following code instead(this is how I register mine, so I know this method works): Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(item, 0, new ModelResourceLocation("everythinginbetween:" + item.getRegistryName(), "inventory")); Quote If I helped please press the Thank You button. Check out my mods at http://www.curse.com/users/The_Fireplace/projects
Matryoshika Posted August 9, 2016 Posted August 9, 2016 On 8/9/2016 at 3:24 AM, The_Fireplace said: You need to have it use your modid as well. For example: ModelLoader.setCustomModelResourceLocation(item, 0, new ModelResourceLocation("everythinginbetween:"+item.getRegistryName(), "inventory")); If that doesn't work, try the following code instead(this is how I register mine, so I know this method works): Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(item, 0, new ModelResourceLocation("everythinginbetween:" + item.getRegistryName(), "inventory")); Ö.ö?? Quote /** * Sets a unique name for this Item. This should be used for uniquely identify the instance of the Item. * This is the valid replacement for the atrocious 'getUnlocalizedName().substring(6)' stuff that everyone does. * Unlocalized names have NOTHING to do with unique identifiers. As demonstrated by vanilla blocks and items. * * The supplied name will be prefixed with the currently active mod's modId. * If the supplied name already has a prefix that is different, it will be used and a warning will be logged. Also, Minecraft.getMinecraft().getRenderItem().getItemModelMesher() is prone to soooooooo many issues, that stating that it "works" 100% of the time cannot ever be true. Forge had to add it's own ModelLoader, just to fix the issues getItemModelMesher have! @AnZaNaMa ModelLoader has to be called in preInit. You are calling it in init. Quote Also previously known as eAndPi. "Pi, is there a station coming up where we can board your train of thought?" -Kronnn Published Mods: Underworld Handy links: Vic_'s Forge events Own WIP Tutorials.
Draco18s Posted August 9, 2016 Posted August 9, 2016 Also there is no need to preface getRegistryName with your mod ID because getRegistryName already does that. Quote Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
Matryoshika Posted August 9, 2016 Posted August 9, 2016 On 8/9/2016 at 9:02 AM, Draco18s said: Also there is no need to preface getRegistryName with your mod ID because getRegistryName already does that. Thats... kinda what I just said. Read the highlighted part of the quote Quote Also previously known as eAndPi. "Pi, is there a station coming up where we can board your train of thought?" -Kronnn Published Mods: Underworld Handy links: Vic_'s Forge events Own WIP Tutorials.
Draco18s Posted August 9, 2016 Posted August 9, 2016 Sorry, somehow missed that Quote Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
AnZaNaMa Posted August 9, 2016 Author Posted August 9, 2016 Okay cool. Thanks everyone! I knew the itemModelMesher one was bad to use so thanks Quote - Just because things are the way they are doesn't mean they can't be the way you want them to be. Unless they're aspen trees. You can tell they're aspens 'cause the way they are.
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.