I want to put custom models on iron sword durability values but I'm having trouble figuring out how to do this. I've found a ton of tutorials that cover how to do dura values without 3d models, but it seems there are extra steps involved when a model is there and has to call on a texture...
You say "you can do it with models too" but you dont explain how. It seems everyone just says "do it with models too" in everything i find on this, but there are more steps to models surely and they just aren't working...
Do you think you're able to help me out?
What do I need in iron_sword.json, iron_sword1.json, and the texture belonging to iron_sword1.json, and where do I need to place all of these. I want it on the dura 1, which should be 0.00398406374.
I think the best thing for me to do, would to just replicate what you're trying to do with the iron_sword, using my own assets as placeholders. That way you can see & compare against yours.
Here is my resource pack item models folder:
('tmp' is just to hide my other files for now. 'end_crystal.json' is my custom model I'm using; it could be named anything)
When I'm replacing the durability of a vanilla item, I prefer to make a copy of the vanilla file and call it "<original>_default.json". This means that I can easily reference back to what the vanilla item would be, in my custom overrides file.
For now, in 'iron_sword.json', I have the model parented to what the vanilla model looks like. (for simplicity)
I have 2 overrides: The first one is for durability 1 of an unbreakable iron sword and I then reference the custom model file. The second one is for durability 1 of a normal iron sword and then I reference what the vanilla iron sword looks like.
This pattern of paired predicates should repeat for however many durabilities you want to override.
Since I'm only using vanilla textures for this example, I don't have any to show you in my res pack textures folder.
Just create your 3D model normally, with the model anywhere under "assets/minecraft/models/item/..." and your textures anywhere under "assets/minecraft/textures/items/...". Making sure that you reference them correctly.
I.E. If I have a texture in "assets/minecraft/textures/items/weapons/guns/rifles/ak47.png" then in my model file, I would reference it as "texture":"weapons/guns/rifles/ak47".
Here is what it looks like in-game:
I prefer to start overriding at durability 1 because at damage 0, the normal & unbreakable tool both count as undamaged. As seen by them looking the same in the hotbar.
(The first end_crystal is enchanted because the vanilla one is too and I can't control that.)
General other things to check:
Make sure you don't accidentally have 'smart quotes' in your code.
Check your file extensions are exactly '.json', not '.txt.json'.
Brackets, quotes, commas, general syntax.
This advice is designed for 1.11/1.12 (pack_format:3)
I hope this helps and you can find what you might need to do. In the future, could you also leave specific examples of where you see things going wrong and/or what your current setup looks like? That way we can read it and deliver more specific advice to your problem.
If this doesn't work for you or you still don't understand me then I might like to take a look at your res pack.
My problem was the paths as you probably guessed they were all screwed up lol. I'm super grateful for the entire laydown though, it's way more organized and just feels a lot less messy now so thank you!
It was just a simple syntax problem. In the second 'iron_pickaxe.json', you closed your override list with a '}' instead of a ']'.
} <-- HERE
When encountering a problem with res packs & modeling, one of the things I mention is brackets, quotes, commas & general syntax. The simplest way to check these would be to copy+paste the code into JSONLint which reads and validates your JSON code.
You don't need to omit parts of your code when validating, and if you do, make sure that all your brackets are paired up correctly before you hit Validate.
Also, it formats the code differently to how I do and maybe how you do. You could either fix the code there and copy it back into your text editor to reformat it or you can just fix the error directly in your own code if you know where it is.
Good work on the res pack and I hope others also end up learning something from this thread that they can't learn from other threads.
P.S. You may want to edit the code for your gun models in your post, to remove the comment saying your name & Cubik Studio. Maybe even change that in Cubik settings too. Tools>Preferences>General I believe.