Bug repport about items exchange
blablubbabcDEV opened this issue · 5 comments
Migrated from: https://dev.bukkit.org/projects/shopkeepers/issues/323
Originally posted by Black_Eyes (Jun 22, 2015):
- What steps will reproduce the problem?
 I don't really know, after a while, like 4 or 5 days after the creation of the custom villager shops, we couldn't exchage items (see additionnal
 informations).- What is the expected output? What do you see instead?
 I think you'll don't find any interesting informations here, see the additional informations istead.
 Here the ouptut http://pastebin.com/jQy3UF40- What version of the product are you using?
v1.59.  I now use the 1.60 version, I'll say you if that bug appear again in that version- Do you have an error log of what happened?
 We couldn't exchange items with certains villagers (not all) because of a difference between our items and villagers items.
 (see additional informations) We can resolve the bug by exchange items wich doesn't works with new items, but I think the bug will come again soonPlease provide any additional information below.
 The bug: seems like the plugin changed himself something in items. I always play with the f3+h activated, and that's why I seen the problem:
 (F3+H shows informations about items when you put your mouse on the items: the item id and the item name, usefull for administrators)
 I noticed that items in the shop couldn't be stacked with other identic items, and I put my mouse on it:
 normal item: http://hpics.li/595527a Infected item: http://hpics.li/72be0a0  So you see the little difference? yes, there is a third line under
 ShopKeeper items! that's why we couldn't exchange them, they have a difference. I hope you'll find a solution to ensure that bug.
Originally commented by blablubbabc (Jun 22, 2015):
Let me rephrase this, to make sure I did understand it correctly:
So you are setting up your shopkeeper with custom items, probably items created by some other plugin, which contain some additional internal nbt data.
Then shopkeepers saves those items into the save.yml file and later loads them from there again (maybe 4-5 days later, is that possible? Does your server run this long without restarts?).
Then the loaded item in the shopkeeper no longer contains that custom internal nbt data anymore, the items offered and the items in the shop are no longer matching, and the trade is no longer possible.
If that's the case then I doubt I can do anything on Shopkeepers side to fix this. It's either an issue with spigot, because we are using their API for saving and loading items, or it's a problem with the plugin which creates the custom item for you, because the way it adds additional internal nbt data might not be fully supported by spigot.
Which plugin are you using to create this item with additional custom nbt data?
Or: If you are saying that an normal minecraft item suddenly contains additional nbt data AFTER it was saved and reloaded or used by Shopkeepers for some time:
Could you upload your save.yml file containing the item before and after it has changed in the shopkeeper shop?
Also do you have any other information which could help me reproduce this issue (reliable, without having to wait 4-5 days)? Does it happen randomly (after 4-5 days), or does it happen after every reload/restart of the plugin/server? Does it happen to all types of items, or only those pistons?
You could also install some plugin like PowerNBT which let's you analyze the internal nbt data of items from in-game. So maybe you can find out what kind of additional data is suddenly stored in that shopkeeper item.
Edited Jun 22, 2015
Originally commented by Black_Eyes (Aug 30, 2015):
Hi, I found the issue! the 1.8 version of CompassNavigation causes that all items on the server have an NBT tag! I just removed compassnavigation and poof! all items returned to the norm, including inventory items and chest items of all players!
Originally commented by Black_Eyes (Jun 23, 2015):
It is real minecraft items. All the items you can see on my screenshot are infected, there is also some wooden planks, some diamonds, some stonebricks and more... I didn't save the "save.yml" before fixing the issue, so I can't give it to you, and yes I did some reload and restart, about every day, but since the server is in building, nobody seen the villager shops issue before today...
I'll install your plugin and see the changes of the items I stored in the chest of the screenshot.
(I did good to keep them finally)
Originally commented by blablubbabc (Jul 17, 2015):
I will close this ticket, as I currently (without further information, like the save file(s)) cannot find out what is causing this. Shopkeepers shouldn't be modifying the items (besides restoring attributes), and saving and loading of standard items is done via spigot's item serialization.