Jump to content
  • Home
  • Files
  • Docs
Topics
  • All Content

  • This Topic
  • This Forum

  • Advanced Search
  • Existing user? Sign In  

    Sign In



    • Not recommended on shared computers


    • Forgot your password?

  • Sign Up
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • [1.10.2] Texture/model not working properly?
Currently Supported: 1.16.X (Latest) and 1.15.X (LTS)
Sign in to follow this  
Followers 1
AnZaNaMa

[1.10.2] Texture/model not working properly?

By AnZaNaMa, August 9, 2016 in Modder Support

  • Reply to this topic
  • Start new topic

Recommended Posts

AnZaNaMa    3

AnZaNaMa

AnZaNaMa    3

  • Creeper Killer
  • AnZaNaMa
  • Forge Modder
  • 3
  • 161 posts
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.

Share this post


Link to post
Share on other sites

The_Fireplace    11

The_Fireplace

The_Fireplace    11

  • Creeper Killer
  • The_Fireplace
  • Forge Modder
  • 11
  • 241 posts
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

Share this post


Link to post
Share on other sites

Matryoshika    118

Matryoshika

Matryoshika    118

  • Dragon Slayer
  • Matryoshika
  • Forge Modder
  • 118
  • 523 posts
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"));

Ö.ö??

/**

    * 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.

Share this post


Link to post
Share on other sites

Draco18s    2414

Draco18s

Draco18s    2414

  • Reality Controller
  • Draco18s
  • Members
  • 2414
  • 15995 posts
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.

Share this post


Link to post
Share on other sites

Matryoshika    118

Matryoshika

Matryoshika    118

  • Dragon Slayer
  • Matryoshika
  • Forge Modder
  • 118
  • 523 posts
Posted August 9, 2016

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.

Share this post


Link to post
Share on other sites

Draco18s    2414

Draco18s

Draco18s    2414

  • Reality Controller
  • Draco18s
  • Members
  • 2414
  • 15995 posts
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.

Share this post


Link to post
Share on other sites

AnZaNaMa    3

AnZaNaMa

AnZaNaMa    3

  • Creeper Killer
  • AnZaNaMa
  • Forge Modder
  • 3
  • 161 posts
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.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

    • Insert image from URL
×
  • Desktop
  • Tablet
  • Phone
Sign in to follow this  
Followers 1
Go To Topic Listing



  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • cadbane86140
      Minecraft: Cereal UHC Season 2 Episode 5- THE FINALE!

      By cadbane86140 · Posted 2 hours ago

      Hello There! A bit of a late upload due to technical issues but ITS UP! So after a week of Cereal UHC we have finally reached the end of it! I am so thankful to be apart of this series and I can't wait for the next season! There are so many hilarious moments especially during the final battle! I hope you all enjoyed this series and if you did don't forget to like and sub for more!  
    • samjviana
      [1.16.5] How to make EnchantedBook go to Custom ItemGroup

      By samjviana · Posted 2 hours ago

      But how can i do that for an enchantment book, for normal items i was able to do that by calling the function "group" as you said, but with the enchantment seems to be different.
    • poopoodice
      [1.16.5] How to make EnchantedBook go to Custom ItemGroup

      By poopoodice · Posted 3 hours ago

      Just create an instance of ItemGroup, and set the group of the item in the item property builder.
    • poopoodice
      Trying to make a crop have an "X" shape model

      By poopoodice · Posted 3 hours ago

      Check the parent of their block model.
    • LexManos
      Forge says this file does not have an app associated with it.

      By LexManos · Posted 3 hours ago

      Some zip managers like to take control of the .jar file extension away from Java. Make sure you have Java installed and try running Jarfix once, then try the installer again.
  • Topics

    • cadbane86140
      0
      Minecraft: Cereal UHC Season 2 Episode 5- THE FINALE!

      By cadbane86140
      Started 2 hours ago

    • samjviana
      2
      [1.16.5] How to make EnchantedBook go to Custom ItemGroup

      By samjviana
      Started 5 hours ago

    • TheMajorN
      1
      Trying to make a crop have an "X" shape model

      By TheMajorN
      Started 5 hours ago

    • ESCCarp
      3
      Forge says this file does not have an app associated with it.

      By ESCCarp
      Started 7 hours ago

    • hammy3502
      0
      [1.16.4] Fluid Flowing Very Oddly

      By hammy3502
      Started 4 hours ago

  • Who's Online (See full list)

    • samvoidx
    • Rixie1213
    • Elrol_Arrowsend
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • [1.10.2] Texture/model not working properly?
  • Theme

Copyright © 2019 ForgeDevelopment LLC · Ads by Longitude Ads LLC Powered by Invision Community