JSON Subtextures / Change State Of Specific Texture Within A JSON Mapping With Procedure Or Return Value

Started by Seer on

Topic category: Feature requests and ideas for MCreator

Last seen on 21:18, 22. Apr 2024
Joined Apr 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
JSON Subtextures / Change State Of Specific Texture Within A JSON Mapping With Procedure Or Return Value

Hello.

 

I'm unaware if there is a major limitation due to how JSON mappings work, but I've hit a roadblock in my plans for designing mods that I can't find solutions for besides attempting to custom model multiple layers with a plugin that allows me to appear models on a player or attempt to layer my own code in with each item which would create lots of problems with porting in the future.

I'm hoping to make a mod that utilizes potentially hundreds of different types of textures that would require thousands or tens of thousands of mappings on my individual models with how the MCreator texture system currently works.

I'm hoping to try to find a way to modify a subtexture or part of the mapping with a procedure or with a feature like the item state. For example, in the reference image for a sword in my mod, I'd want to only change texture part 1 while leaving part 2 the same. This could be solved by simply creating multiple variations, but that process gets increasingly complex with even 9 unique textures. If there could be a way to change exclusively part 1 while not remapping part 2 at all (including replacing the texture with the same texture in a separate mapping), I'd love to know how.

 

My main problem involves the fact I wish to change textures for different materials and allow you to swap specific parts of the model out. With Wood, Stone, Iron, Gold, Diamond, and Netherite, for example in this mapping, I'd have 6 different variations for each part, or 36 total mappings. If I were to continue adding, this increases exponentially. What if I want to add things like gems to the sword, or make the handle and guard separate? That's 1,296 (6^4) mappings. If I could simply change part 1 or 2 without mapping a custom texture for each variation, I wouldn't have to manually create over 1 thousand item states and textures. This would save me an enormous amount of time and optimize my mod significantly.

 

If this is not possible due to the limitations of Minecraft, this post can be entirely ignored. I just hope for a form of simplifying this process if possible.