I'll get right to it: My problem is with 1.9's new feature of adding multiple textures to one item. I know how to set up the .json files (I've done that and all works properly). What I don't know how to do is making the item not lose durability or display a durability bar despite having a damage tag. I've seen plenty of command-blockers use this technique in resource packs, maps, etc, so I know it can work. I know this is easier than I'm trying to make it, but for some reason I just can't make it work. I'm sure this has been done in a tutorial somewhere, but I can't seem to find these anywhere either.
EDIT: And yes, I'm in 1.10.2. So I KNOW this can work.
EDIT 2: OK, so I used the Unbreakable tag in someone else's resource pack that I was plying with, and I found the above to work as I had hoped mine would. However, mine didn't work. Upon examination of the files, I found literally no difference between our packs' setups. Just different item names. I'm really getting puzzled now...
I think you'll be happy to hear that it was actually your tutorial that taught me how to resorce pack with damage values in the first place. I've used the Unbreakable tag for my item (Which is a carrot on a stick... I wonder if that item just behaves differently) but what happens is:
/give @p carrot_on_a_stick 1 3 {Unbreakable:1}
gives me a carrot on a stick with the texture I use for 0 damage. This is my problem, but I'll go and try it with a diamond sword to see if that fixes my problem.
However, some of my items are linked to right-click detection commands so I need the carrot_on_a_stick.
Well, yeah, I didn't copy and paste. I just did the same thing that you did for a different item. I get my texture to display just fine without the Unbreakable tag. However, adding the Unbreakable tag causes the item to use its damage = 0 texture. I've done some testing (Made a whole new pack) and this is true for diamond hoes as well...
EDIT: Wait... What does that Thumbs.db do? I don't have it in my pack.
I didn't right click though. And I copied the thumbs.db file from your pack, and still it didn't work. I don't know what went wrong.
EDIT: Just tried it with diamond sword but to no avail. Something is definitely bizarre here.
EDIT 2: What? I just tried your resource pack and everything worked well! I guess I'll just take your pack and build mine off of it... Not sure what else to do. This is really odd!
EDIT 3: ^^ I guess that means thanks for your help, though that wasn't the way I had expected to get it... XD ^^
But in all honesty, thanks so much for all your help. I'll probably "EDIT 4" of how this new plan went.
No what i mean is since it is a right click they probably make it do the default item when unbreakable. You can always try to make it diamond swords thesummon a villager at the player holding the item, then teleport it 1 tick later (chain command) to -200 and do this repeatedly. Then detect using scoreboard if they right clicked the villager
I dont know what the Thumbs.db does exactly, but it doesnt hurt to try it XD
Thumbs.db does nothing in resource packs. It's a junk file added by your OS (similar to desktop.ini and .DS_store), so you shouldn't include it in packs you release since it's just adding files (and a very minimal amount of data). They're basically cache files so not really needed with your OS anyways, especially with 16x packs since generating icons on-the-fly rather than reading them from a file won't be slow.
Rollback Post to RevisionRollBack
"I'm an outsider by choice, but not truly.
It’s the unpleasantness of the system that keeps me out.
I’d rather be in, in a good system. That’s where my discontent comes from:
being forced to choose to stay outside.
My advice: Just keep movin’ straight ahead.
Every now and then you find yourself in a different place."
-George Carlin
2. Yeah, I think you're right about the right click thing, cloudwolfbane. It worked for swords (After a bit of fiddling), but not hoes.
3. Thanks for all of your help with this, cloudwolfbane. I've now got it working, and maybe somebody else researching the topic will gain something from this post
4. Thanks for sticking with this one and helping me! Now it's time to work on this and probably find a new problem to post on the forum XD
EDIT: Wow, I must be tired! 3 and 4 say the same thing with added babbling XD
Can you guys tell me what the issue was, exactly? I'm having the exact same issue. When I /give or /summon an item with Unbreakable, the items spawns with no damage value and thus, doesn't have the custom texture.
Replying to myself since in case someone else wants to know the solution (I just figured it out).
There are two predicate values, "damaged" and "damage". The first one is a bool, which means it's either true or false. The second one is the amount of damage an item has in a percentage (0 is max damage, 1 is full damage).
When you spawn an item that is damaged, it has the damaged bool set to 1 (true). When you spawn an unbreakable damaged item, that damaged value is now 0. It has damage but it's not "damaged". So it uses the default (layer0) texture.
The solution is to setup your JSON file like this:
I'll get right to it: My problem is with 1.9's new feature of adding multiple textures to one item. I know how to set up the .json files (I've done that and all works properly). What I don't know how to do is making the item not lose durability or display a durability bar despite having a damage tag. I've seen plenty of command-blockers use this technique in resource packs, maps, etc, so I know it can work. I know this is easier than I'm trying to make it, but for some reason I just can't make it work. I'm sure this has been done in a tutorial somewhere, but I can't seem to find these anywhere either.
EDIT: And yes, I'm in 1.10.2. So I KNOW this can work.
EDIT 2: OK, so I used the Unbreakable tag in someone else's resource pack that I was plying with, and I found the above to work as I had hoped mine would. However, mine didn't work. Upon examination of the files, I found literally no difference between our packs' setups. Just different item names. I'm really getting puzzled now...
Thanks in advance!
I made a video on how to do just this.
To hide the damage bar just give the item unbreakable tag, I have done this many times
I think you'll be happy to hear that it was actually your tutorial that taught me how to resorce pack with damage values in the first place. I've used the Unbreakable tag for my item (Which is a carrot on a stick... I wonder if that item just behaves differently) but what happens is:
gives me a carrot on a stick with the texture I use for 0 damage. This is my problem, but I'll go and try it with a diamond sword to see if that fixes my problem.
However, some of my items are linked to right-click detection commands so I need the carrot_on_a_stick.
Yes you have to change the files because the total damage for diamond swords(what i used) is different than carrot on a stick
Well, yeah, I didn't copy and paste. I just did the same thing that you did for a different item. I get my texture to display just fine without the Unbreakable tag. However, adding the Unbreakable tag causes the item to use its damage = 0 texture. I've done some testing (Made a whole new pack) and this is true for diamond hoes as well...
EDIT: Wait... What does that Thumbs.db do? I don't have it in my pack.
I dont know what the Thumbs.db does exactly, but it doesnt hurt to try it XD
It could do that because the item decreases damage when u right click with it
I didn't right click though. And I copied the thumbs.db file from your pack, and still it didn't work. I don't know what went wrong.
EDIT: Just tried it with diamond sword but to no avail. Something is definitely bizarre here.
EDIT 2: What? I just tried your resource pack and everything worked well! I guess I'll just take your pack and build mine off of it... Not sure what else to do. This is really odd!
EDIT 3: ^^ I guess that means thanks for your help, though that wasn't the way I had expected to get it... XD ^^
But in all honesty, thanks so much for all your help. I'll probably "EDIT 4" of how this new plan went.
No what i mean is since it is a right click they probably make it do the default item when unbreakable. You can always try to make it diamond swords thesummon a villager at the player holding the item, then teleport it 1 tick later (chain command) to -200 and do this repeatedly. Then detect using scoreboard if they right clicked the villager
Thumbs.db does nothing in resource packs. It's a junk file added by your OS (similar to desktop.ini and .DS_store), so you shouldn't include it in packs you release since it's just adding files (and a very minimal amount of data). They're basically cache files so not really needed with your OS anyways, especially with 16x packs since generating icons on-the-fly rather than reading them from a file won't be slow.
"I'm an outsider by choice, but not truly.
It’s the unpleasantness of the system that keeps me out.
I’d rather be in, in a good system. That’s where my discontent comes from:
being forced to choose to stay outside.
My advice: Just keep movin’ straight ahead.
Every now and then you find yourself in a different place."
-George Carlin
Alright, so I'll just stick it all in one post.
1. Thanks for that info, Lemon
2. Yeah, I think you're right about the right click thing, cloudwolfbane. It worked for swords (After a bit of fiddling), but not hoes.
3. Thanks for all of your help with this, cloudwolfbane. I've now got it working, and maybe somebody else researching the topic will gain something from this post
4. Thanks for sticking with this one and helping me! Now it's time to work on this and probably find a new problem to post on the forum XD
EDIT: Wow, I must be tired! 3 and 4 say the same thing with added babbling XD
lol no problem, if you have another problem post a comment in my newest vid and i can get to it within the same day
Thanks!
Can you guys tell me what the issue was, exactly? I'm having the exact same issue. When I /give or /summon an item with Unbreakable, the items spawns with no damage value and thus, doesn't have the custom texture.
My JSON file looks like this:
And spawning the item (in a command block) looks like this:
Replying to myself since in case someone else wants to know the solution (I just figured it out).
There are two predicate values, "damaged" and "damage". The first one is a bool, which means it's either true or false. The second one is the amount of damage an item has in a percentage (0 is max damage, 1 is full damage).
When you spawn an item that is damaged, it has the damaged bool set to 1 (true). When you spawn an unbreakable damaged item, that damaged value is now 0. It has damage but it's not "damaged". So it uses the default (layer0) texture.
The solution is to setup your JSON file like this:
Basically, just remove the "damaged" variable and now the custom texture is based only on the amount of damage an item has.
Alternatively, you could use only the damaged variable and the item would use a different texture if it was damaged any amount.