Jump to content

Item Textures [1.10]


averysumner

Recommended Posts

I made MC mods a long time ago and they took away

setTextureName

, I was trying to get textures to work now and I was having issues:

 

I am running this on PreInit:

http://hastebin.com/imutoxeqim.avrasm

 

And getting this when it crashes:

http://hastebin.com/uzohuqudih.vala

There are 10 types of people in this world. Those who know binary and those who don't.

Link to comment
Share on other sites

The new rendering system uses JSON resources to specify item model rendering.

 

You can see a basic working example here: http://modwiki.temporal-reality.com/mw/index.php/Render_Item_Basic-1.9

 

The correct registration call is

ModelLoader.setCustomModelResourceLocation(this, 0, new ModelResourceLocation("itemID", "inventory"));

 

And a JSON file located at main/resources/assets/<yourmod>/models/item/itemID.json

{
  "parent": "builtin/generated",
  "textures": {
    "layer0": "modID:items/itemtexture"
  },
  "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 ]
    }
  }
}

Link to comment
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.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  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.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.