mojira.dev
MC-58445

No texture for certain items with damage value higher than default

Items that do not have extra damage values in survival do not display the parent texture.

Examples:

/give @p apple 1 1
/give @p diamond 1 1
/give @p stick 1 1
/give @p written_book 1 1
{\code}

This was not present in 14w21b or any version prior to 14w25. And this will affect many custom maps negatively.

Linked issues

Attachments

Comments

user-f2760

Intended, the items now act like the block models, an invalid data = missing textute texture

qmagnet

Problem is some redstone puzzles are completely dependent on separating items based on damage values. Without this back to the way it was, maps are ruined.

user-f2760

Well you can also make it detect data tags, like a certain block in canDestroy or even the HideFlags tag, you can even rename them and test for the names.
I do admit is was more easy in 14w21b

qmagnet

Could be a workaround. But honestly, this change makes no sense.

qmagnet

Are you positive this is "Works as Intended"? This has NEVER been the case before the last snapshot.

setzke

This "works as intended" change makes it impossible for a map-maker to have custom items work in custom villager trades.

Maps with custom villagers that take emeralds with damage value of 1 instead of 0 are now useless and the whole of the map dynamics are poisoned by the fact that players can use normal emeralds and not the special ones dictated by the map & its maker. I currently know no way around this, as Villagers ignore names, Lore, and other tags... but paid attention to damage / data values.

user-f2760

@Elsyth Feathervine
that villagers do not look at any tags got fixed, you can use the methods mentioned above

qmagnet

We've made it work with custom NBT tags. But @Elsyth Feathervine, a way around it is to simply create a duplicate texture and include a resource pack.

user-f2760

true

setzke

Thanks guys. And that resource pack thing is a good idea; I was already using a server-side resource pack so if it comes to that later, I can - thanks. 🙂

Spoon Boy

Okay, if this is "intended", then how do you link a texture to a damage value? Because I've been trying to figure out how to do this in vanilla for a couple weeks since my own report of this "bug" got shut down instantly...

user-f2760

I think that's no longer possible as mojang is trying to get rid of metadata, not sure trough

qmagnet

What are you trying to do? In our map, we made it work by creating a custom NBT tag.

Spoon Boy

Okay. I've tested this further. I highly doubt this is intended, and if it IS, then this is a horrible idea. Here are my findings:

"Villagers ignore names, Lore, and other tags... but paid attention to damage / data values." — CORRECT
"that villagers do not look at any tags got fixed, you can use the methods mentioned above" – LIES AND SLANDER
"a way around it is to simply create a duplicate texture and include a resource pack." – CANNOT FIND ANY EVIDENCE THIS IS POSSIBLE, PLEASE CONFIRM.

I removed the damage value from my special piece of paper.
I can now trade a stack of REGULAR paper for a whole stack of rare quest items rather than my 1 specially-data'd, lored, named paper item.
I can also craft with the specially made items as if they were regular paper.
This essentially breaks everything I've worked on for months.

How is this beneficial if I can't reskin the items? What's an alternate workaround that creates an uncraftable item that NPCs won't eagerly accept its regular counterpart for in its stead?

qmagnet

This is intended.

Damaged items still work (since certain items still can have damaged counter parts) but they have no texture in default. You can add extra textures by creating your own resource pack.

With commands, you can detect custom NBT tags with items but I haven't tested it with trading.

I agree it's a move in the wrong direction, but it's intended.

Spoon Boy

It's fine if I have to define my own textures for the items – I could even define new textures and thus expand what I'm working on. This COULD be a beneficial change. However I don't know how one would link a new graphic to a damage value that's not yet defined, and I've had no luck finding anyone who can confirm that's actually possible (most say it isn't). :/

If anyone knows how to do that (link texture to DV in resource pack), I'd be so thankful.

Benjamin Simpson

Friend of Henry's here, been vaguely working with him to try and figure this out.

What I've found thus far is that in resource packs, block models have different variants. However, these are hard coded. I can't add in a "98:4.json" to "Blockstates" to make a fifth type of stone brick that uses data value 4 - at least, none of my research has pointed to this being a possibility, and none of my absolutely blind attempts at ramming different syntaxes at the file name, contents of the file, etc. have produced any useful results. There's a specific file for every block that exists, it's not flexible in any manner at all, as far as I can tell. I have strong doubts that you can add additional files and have them work.

I can't see anywhere else where data values might be defined, and, as Henry stated, NBT Tags are not read by crafting, villagers, or any such. Data values are, however.

What we were doing very successfully before this godawful update was using "339:1/339:2/339:3/etc.", which is paper with a data value of 1/2/3/etc., and giving it a name and lore to make a 1 dollar bill. Tangible currency, yay! Then, we placed this in a villager's trade, with various currency types, amounts, and the like being traded for diamonds, gold, and iron, and visa versa.

This is impossible now, as far as we can tell. Unless we want to use MAGIC PURPLE AND BLACK BLOCK DOLLARS. 'Cause everyone loves those, right? Lol.

However, as he stated, loreless, nameless items can be exchanged in the place of lored and named items. We really don't want someone plowing through sugar cane to get 5000 diamonds from paper, thank you very much. We also would prefer it if people couldn't make a book out of 100 dollar bills. Data values prevented these very nicely.

So, please. If there's an NBT tag that villagers and crafting recipes read, please tell us what it is, rather than simply saying 'oh, it's possible'. And, as for adding extra textures? Again, please, tell us HOW this is done. I mean, I apologize for the attitude, but he and I have been sitting here, scratching our heads, tearing apart resource packs, re-reading the wiki, staring for hours at threads, posting in tons of different places, asking anyone we know who might know about this, and we've found nothing. Nothing. He's been working on a map off and on while I've been finding methods that'll make our goals easier and this one thing has made it, seemingly, impossible. So, if you have a way, please, PLEASE, tell us how. You will be our knight in shining armor and we will love you forever, especially if that way is better and more flexible than the old methods.

Torabi

The plan is for data values to go away entirely in 1.9. The relationship between block ids, data values, and blockstates is currently hardcoded, but that should change in 1.9. It's not currently possible to define your own blocks or items. The method people were using before to accomplish this was a bug that had to be fixed in order to move forward on the rendering and block engines, which themselves needed to be rewritten for the plugin API. It's unfortunate that this is such a huge task that it can't all be completed in one release cycle. However, you should be able to limit villager trades using data tags, though that is currently broken, and also [scheduled to be fixed in 1.9|MC-349]. They're rewriting core components of the game that a lot of things depend on, so that the behavior will be predictable and more easily customizable. They're trying to prevent it from breaking things in the meantime, but so much of Minecraft is too hardcoded and interdependent for it to be a perfectly smooth transition.

I'm not aware of any way to prevent an item from being used in crafting using data tags. That would make for a good feature request.

Alpha

MC-84783 is an update on the situation

qmagnet

(Unassigned)

Unconfirmed

Minecraft 14w25b

Retrieved