| Type: | Bug | ||
| Reporter: | WolfieMario | Assignee: | [Mojang] Searge (Michael Stoyke) |
| Resolution: | Fixed | Votes: | 36 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||||||||||
| CHK: | |||||||||||||||||||||
| Confirmation Status: | Confirmed | ||||||||||||||||||||
| Description |
|
Villagers will only check an item's ID, not its damage value or any other data, in determining whether they will accept it. This leads to interesting situations where a priest will fully restore an item's durability when enchanting it, and a modified villager requesting bonemeal will just as easily accept ink sacs. This bug also prevents map makers from designating custom items for villager trade (e.g. a piece of glowstone with a custom name and enchantment will be treated the same as an ordinary piece of glowstone). What I expected to happen was...: What actually happened was...: Steps to Reproduce: 3b. If you attempt to enchant a previously enchanted item with this priest, you will observe that the old enchantment is ignored and the new one is placed. However, normally it is not possible to unenchant an item, and even anvils will charge extra for overwritten enchantments, so this behavior is not consistent. Caveat to fixing: Instead, it may be preferable (if anything is done about this issue at all) to add a new tag to an offer, determining whether it is to be considered strict. Thus, among vanilla Minecraft offers, the priest's enchantment offers would be marked 'strict', requiring unenchanted items at full durability. As this would be an NBT tag, map-makers would also be able to make use of it to prevent the aforementioned issues in custom traders. |
| Comments |
| Comment by Brad Larson [ 04/Sep/14 ] |
|
Aaron PLEASE stop editing your comments after you post, re-read them carefully before you submit your posts. Every time you edit them it sends everyone watching this Bug which is 30 people. So far I have gotten 20+ emails of you editing the post you made, this is pretty irritating. Thank you. |
| Comment by Aaron Rhodes [ 04/Sep/14 ] |
|
The only fix for it repairing an item that gets enchanted by a villager seems to be that they just changed it to giving you an enchanted item for emeralds instead of enchanting an item you give them. |
| Comment by Aaron Rhodes [ 04/Sep/14 ] |
|
Sorry, I just tested that and you are right. Thank you for the input, I have only recently started trying to help on bugs/glitchs and have also only started testing them, so I don't know exactly when these fixes were implemented. It only applies the data under the tag data tag to the item under the trading gui. |
| Comment by [Mod] Skylinerw [ 04/Sep/14 ] |
|
@Aaron, the problems is the inability to define the "tag" tag in the "buy" compound to force players to provide an item that has specific extra data, such as a display name or custom data. The "Damage" value detection was originally the issue, but was fixed a while ago in the 1.8 snapshots. The report remains open for the "tag" tag, specifically for the "buy" tag. The "sell" tag has always worked as far as I can recall. |
| Comment by Aaron Rhodes [ 04/Sep/14 ] |
|
In the 1.8 update, it seems this might have been partially fixed, probably because they went through and rebalanced villager trading. For the modified trades, the commands might not have been set up properly. ,sell{id:"minecraft:Item name",Damage:0s,Count:1b, ,]}}},]}} entitydata @e[type=Villager] {Offers:{Recipes:[0:{sell:{id:"minecraft:wool",Damage:14s,Count:1b,tag:{}},buy: {id:"minecraft:wool",Damage:0s,Count:1b},buyB:{id:"minecraft:dye",Damage:1s,Count:1b}},]}} This command will make a villager accept regular white wool and red dye and trade you red wool. It will not accept any other wool or dye color. Try using the command: ,]}},buy: {id:"minecraft:diamond_pickaxe",Damage:0s,Count:1b},buyB:{id:"minecraft:emerald",Damage:0s,Count:10b}},]}} If I typed it correctly, this should change any villager within a radius of 5 blocks to offer the trade of a special diamond pickaxe with a fortune 5 enchant for a regular diamond pickaxe and 10 emerald. Unfortunately, this requires a fully repaired diamond pickaxe to work; trying to trade a damaged one will fail to work. If you wanted to have it not repair the pickaxe, you would have to change the value for the Damage tag under sell and buy so that they match. For an easier solution, there would have to be a way where it checks the damage value on the tool being bought by the villager and apply that value to the tool being sold. Sorry for the long explanation, but I hope this helps. |
| Comment by Ben Edwards [ 01/Aug/14 ] |
|
Confirmed for 14w31a |
| Comment by Nikita Naista [ 30/Jul/14 ] |
|
Hello. I'm mostly talking about Pocket Edition bugs (such as MCPE-1319 texture bug), but this bug made me worrying about custom maps and things like that. I agree with people who want the 'strict' tags to be in Minecraft. Sometimes, one may need or just want to trade an used tool (enchanted or not) for a better one, but he/she may see a trade needing a fully-repaired tool. This is not a problem if you have an anvil, but custom tools may not be repaired like that (unless using custom attributes), while repairing by crafting will remove all enchantments and revert attributes to normal. So, the 'strict' tag will save most custom maps. Also note that I only played PC Minecraft on my brother's computer (versions 1.5.2 and 1.7.4). Other times, I played Minecraft Pocket Edition (demo and v0.8.1), but stopped due to MCPE-1319 texture bug, plus I cannot update to 0.9.5. |
| Comment by Brad Larson [ 23/Jul/14 ] |
|
Confirmed still broken in 14w30b |
| Comment by Brad Larson [ 10/Jul/14 ] |
|
Confirmed in 14w28b as well. |
| Comment by Jeuv [ 09/Jul/14 ] |
|
Confirmed for 14w28a. |
| Comment by [Mod] Skylinerw [ 05/Feb/14 ] |
|
Confirmed for 14w05b and now 14w06a/b. Present in 14w07a/14w08a. |
| Comment by [Mod] Ezekiel (ezfe) [ 10/Jan/14 ] |
|
Reopened specifically for data tags. May be working as intended, however. |
| Comment by [Mod] Skylinerw [ 10/Jan/14 ] |
|
@Ezekiel I can confirm that the Damage tag in this is fixed, but can also confirm that dataTags are still ignored. |
| Comment by [Mod] Ezekiel (ezfe) [ 10/Jan/14 ] |
|
Does the damage value still not matter? |
| Comment by WolfieMario [ 10/Jan/14 ] |
|
This is not actually fixed. Villagers will still ignore NBT tags. For example, you can trade the following villager ordinary bedrock instead of bedrock named "CustomBedrock": /summon Villager ~ ~ ~ {Profession:1,Offers:{Recipes:[{buy:{id:7,tag:{display:{Name:CustomBedrock}},Count:2},sell:{id:1,Count:64}}]}}
Confirmed for 14w02b; can this please be reopened? |
| Comment by branza [ 08/Jan/14 ] |
|
This has been fixed by Jeb: https://twitter.com/jeb_/status/420896850879987712 |
| Comment by [Mod] Skylinerw [ 21/Dec/13 ] |
|
Confirmed for 1.7.4 |
| Comment by WolfieMario [ 25/Oct/13 ] |
|
It's probably either the caveats, or Mojang being busy. Looking at the code, it wouldn't be complicated to fix: if you ignore the caveats, it's literally a change to one line (compare items by their existing equality method, rather than the equality of their IDs). My suggestion of adding an "offer strictness" tag to workaround those caveats would take a little more, but it wouldn't actually be complicated. I'm guessing there's a chance this issue will be revisited once Mojang removes block metadata, as it will break the farmer's wool offer (as I mentioned a while back). I'm interested in seeing if/how they will fix that. |
| Comment by CTK [ 25/Oct/13 ] |
|
Today marks this issue's 1 year anniversary. Even though it has not been seen to yet, I'm glad people have not forgot about it. Thank you mods and OP for keeping the issue up to date. |
| Comment by CTK [ 29/Jun/13 ] |
|
I think they just prioritize bug types (Which makes sense of course). Although this is a big issue with a lot of people, it's just not high on their to-do list. I just hope they find time for it eventually. :/ |
| Comment by Jesper the End [ 29/Jun/13 ] |
|
yeah, for some reason some bugs take a looooongg time to fix |
| Comment by CTK [ 28/Jun/13 ] |
|
I'm glad I'm not the only one having this problem. I tried making villagers trade items for custom items (Dmg values/Name/ect) for my adventure map and ran into this. My problem is not related to enchantments but it's caused by the same issue. Edit: I just saw the post date for this bug... Sigh Remember to up vote it or they'll never get to it at this rate. .-. |
| Comment by WolfieMario [ 21/May/13 ] |
|
I agree with that; it should honestly be fixed - I suppose I should clarify that my last post was addressed to Marcono1234 (which is describing a different, seemingly unrelated bug which I've yet to actually witness). |
| Comment by Jesper the End [ 21/May/13 ] |
|
I use an NBTedit mod I created a trade where 2 different maps (with different damage values) are traded for another map (so map 1 + map 2 --> map 3) but it is still possible to put in map 1 twice and still get map 3. Without even gaining map 2. That's my problem but this can also be a problem for vanilla survival. For example it is very easy to repair tools now using the Priest. |
| Comment by WolfieMario [ 21/May/13 ] |
|
I wouldn't say it's a bug for Minecraft to not interact correctly with MCedit, considering MCedit's a third-party tool. Does the same happen when creating a villager with any tool? If so, that would imply something changed in the NBT format or the game isn't loading the villagers correctly - either case would also mean that bug applies to vanilla villagers, and if you have evidence of that, then file a report about it. I personally haven't noticed villagers reverting to "1 Emerald for 8 Gold", although I haven't tested villagers on the snapshots - what version do you get this issue in? At any rate, how do you directly create a villager in MCedit? If you're importing a schematic, the villager will have the trades it has in that schematic - edit the NBT if you want something different. If the villager has no trades, vanilla will generate offers based on the villager's profession. If the profession is 5 (unused), the only offer that villager has is 8 gold ingots for 1 emerald, regardless of how many times you trade it. Vanilla has never had an offer of "1 Emerald for 8 Gold", so if it's not MCedit's fault then it's a very strange bug indeed. |
| Comment by Jesper the End [ 21/May/13 ] |
|
hmm yeah that's weird |
| Comment by Marcono1234 [ 21/May/13 ] |
|
There is also a bug: |
| Comment by WolfieMario [ 15/Mar/13 ] |
|
I'd like to mention two things which worsen this bug: 1. Anvils now allow you to abuse the enchantment offers like never before. The enchantment offer not only restores the durability - it also restores repair cost! At this point, you can buy something like Sharpness III on your 1-use-left dozen-times-repaired diamond sword, and use an anvil with a Sharpness III book to upgrade it to something respectable - at a very small fraction of the cost! 2. On the Plugin API JIRA, Mojang's Grumm has revealed that Mojang plans to do away with block metadata altogether. This means each wool will have a different value - and thus, farmers will only buy white wool after this change. So, the main good reason to have this bug will be removed in the future, leaving nothing but an exploitable bug and a headache to mapmakers. |
| Comment by Jesper the End [ 19/Feb/13 ] |
|
I'll go with 'only the green villager watches NBT data and damage values' that's handy for mapmakers. |
| Comment by Tyron [ 17/Feb/13 ] |
|
That is a bad glitch in my opinion. You can forever repair your diamond tools at almost no cost. Enchanting damaged tools should at least retain the damage value. |
| Comment by Jesper the End [ 08/Feb/13 ] |
|
confirmed, NBT tags, I understand why villagers don't look at that. |
| Comment by WolfieMario [ 25/Oct/12 ] |
|
Yes, this is why I suggested the fix should only apply to priest's enchantments, and to whatever custom offers a map maker chooses to add the property to. I explicitly said that it would be an issue if farmers distinguished wool color |
| Comment by [Mod] CubeTheThird [ 25/Oct/12 ] |
|
In terms of consistency, I agree that adding enchantments to items should not affect their durability. However, seeing as different colours of wool are not distinguished in terms of, say, crafting, it doesn't really make sense for villagers to make this distinction. |