Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Add a layer of texture to item depending on meta


ETblaky
 Share

Recommended Posts

I'm creating a Harry Potter mod, where you can create your own wand. What I was thinking to do is you start with a base wand texture, then you add the customisation. For example:

 

9h7syK8.png <- Base Wand

oe0TxDU.png <- Customisation 1 RvYY1bp.png <- Customisation 2

WXC6KWu.png <- Final Wnad

 

So, how could i do that? I totally lost on the new models and blockstate system added. Anyone could please help? By now i just have a base mod.

Link to comment
Share on other sites

You could point each metadata to a different model and add multiple layers by doing.

 

{
     "parent": "item/generated"
     "textures": {
          "layer0": "texture1"
          "layer1": "texture2" #etc
     }
}

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Link to comment
Share on other sites

I had this working once before the "Blocks and Items and everything needs to be a JSON" I got it from looking at Tinker's Constructs code on how they handle their tools (they do alot more than just custom handle and end) at some point I might have a gander at their code again and see how they updated it to work with 1.10.2+

Link to comment
Share on other sites

I'm still working on figuring this concept out myself (though simpler application).  I believe this page, may be of some use.

https://mcforge.readthedocs.io/en/latest/blockstates/forgeBlockstates/

 

I've been reading the documentation, the problem is they don't explain you how to use blockstates with Items, i don't even know if it is applicable to Items.

Link to comment
Share on other sites

I've been reading the documentation, the problem is they don't explain you how to use blockstates with Items, i don't even know if it is applicable to Items.

 

Items don't have blockstates, although you can use the system for it.

 

When I wrote my code I was writing this in my client proxy (things have been refactored to make it a common object that all of my dependent mods can then access), but this is what I did:

 

https://github.com/Draco18s/ReasonableRealism/blob/master/src/main/java/com/draco18s/hardlib/client/ClientEasyRegistry.java#L86

 

The interface IMetaLookup was just a custom interface I apply to all of my variant enums so that I can convert between variant and metadata and back.  You should already have those methods, I just encapsulated them into a common interface.

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.

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

 Share



×
×
  • Create New...

Important Information

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