Jump to content

[1.12.1][SOLVED] Dynamic/dyeable custom item models


Recommended Posts

Posted (edited)

At moment I have both halves of the puzzle solved, however cannot seem to bridge them. 

1. I have a working item colorizer that will apply custom colors to an item via crafting with dyes like vanilla leather armor.

2. I have a a working custom model for my item however the dyes are not applying without using builtin/generated.

 

The problem is that when using the custom model, I have it working perfectly so long as I dont set the parent to builtin/generated. However builtin/generated is the only way to get the custom colored item to show up on the icon. 

So essentially if I dont use the custom model, everything works fine and it just uses an item as the model that gets tinted, but if I use a custom model for the item, I cannot find a way to make the dyes apply to it without breaking the custom model. 

Any suggestions would be appreciated. The item is a shield and everything works with it except for the custom colored model.

 

Essentially whats happening is that if i set the parent to builtin/entity it completely ignores the model part of the file, but i need the builtin/entity in order to get the dyed textures

Edited by daruskiy
Posted

You haven't specified a tint index for any of the quad faces of your models, so they're not recoloured at render time.

 

builtin/generated automatically specifies a tint index equal to N in the quads it generates for each layerN texture. 

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Posted

so ive tried doing:

"south": { "texture": "#layer0","tintindex": 0, "uv": [ 0.0, 0.0, 6.0, 11.0 ]  },
                

However it does not seem to be doing anything. Did you mean to do something else for it ?

Posted

Ive looked at the minecraft code for item colorization for blocks and things such as spawn eggs and they all seem to use the same tintindex methodology where its generated and then applied at tintindex: 0, so I still have no idea how to get this to work with teh custom model 

Posted
On 20/12/2017 at 0:37 PM, daruskiy said:

so ive tried doing:

"south": { "texture": "#layer0","tintindex": 0, "uv": [ 0.0, 0.0, 6.0, 11.0 ]  },
                

However it does not seem to be doing anything. Did you mean to do something else for it ?

 

That should work. Could you post your entire model and IItemColor implementation?

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Posted (edited)
43 minutes ago, daruskiy said:

I actually just figured it out an hour ago! Implemented IItemColor in my itemShield class then return the items tintindex and it made it work

 

The main point of IItemColor is to separate the colour methods from the Item class (where they used to be in older versions), so you shouldn't implement it on your Item.

 

You should implement IItemColor with a lambda or anonymous class instead. You can see how I implement and register my mod's IBlockColors and IItemColors hereColorHandlerEvent was added in a recent 1.12.2 build, before that you needed to register them in init.

Edited by Choonster

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

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.