Jump to content

Custom Dynamic Textures Similar to Armor and Armor Trims


hundoTabs

Recommended Posts

Hey, I've been looking around and trying to figure out how to make an item with a dynamic texture similar to armor and armor trims. Right now I have the items set up and into the game without any functionality. From the Forge Discord, I was told to make a custom 2D model to start the process and was linked to a GitHub showing how to do it though they had their own API and mod setup so it made it a little hard to understand when looking at a way to start off. 

I've been digging in the code for Minecraft and found the code for the armor trims and have found a couple of methods, specifically the "generateLayeredItem()" method, that could possibly be used but how would I go about calling the method for testing purposes?

 

IE: There is a rock item and a rune item. The items are separate but when crafted it creates a rune infused rock which is just the textures of the rock on layer0 and the rune on layer1. 

I've messed around with layering and figured out how to do it if it was just a regular item using the .json for it rather an item that can be interchangeable as if it were an armor with an armor trim.

 

I haven't been able to find any resources on making a custom 2D model and have only been able to find how to make custom 3D models whether that be for items or blocks. Any help, tips or guidance would be greatly appreciated.   

Link to comment
Share on other sites

  • Thanks 1

Boilerplate:

If you don't post your logs/debug.log we can't help you. For curseforge you need to enable the forge debug.log in its minecraft settings. You should also post your crash report if you have one.

If there is no error in the log file and you don't have a crash report then post the launcher_log.txt from the minecraft folder. Again for curseforge this will be in your curseforge/minecraft/Install

Large files should be posted to a file sharing site like https://gist.github.com  You should also read the support forum sticky post.

Link to comment
Share on other sites

8 hours ago, warjort said:

This makes sense now. Didn't know what one of the values was for the code when using the armor trims method. I didn't know you could use NBT tags for it. I now understand what the values were there for when in the List for the materials and how it works since it uses layering rather than the custom model loader. Thank you for that actually.

When it comes to the model loader, I honestly didn't know if you did since the person who shared their mod with me had a bigger mod up that seemed more on the complex side. Which again had their own API attached to it and called within the custom model loader. Not knocking it ofc but it just threw me off for a spin to figure it out since I am very new to Forge modding.

In this case, all I would need to do is just make a system similar to the armor trims and see where it goes from there?

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.