PluginBugs / Issues-ItemsAdder

Repository used to keep track of issues of my plugin ItemsAdder
https://itemsadder.devs.beer
54 stars 21 forks source link

Useless properties added to display name and lore lines of custom items #2189

Closed minecraft-dripdrop closed 1 year ago

minecraft-dripdrop commented 1 year ago

Terms

Discord tag (optional)

No response

What happened?

I use shopkeepers to trade items to items. But after update plugin,the item's NBT all changed,and the old item can't trade,can't stack You can see the new and old item's nbt OLD old NEW new

old item can't trade anymore 2022-12-18_12 07 18

Steps to reproduce the issue

find a old item and new item

check this two item's NBT

Server version

git-purpur-1825(1.19.2)

ItemsAdder Version

3.3.0-beta-r11

ProtocolLib Version

5.0.0-snapshot-b600

LoneLibs Version

1.0.21

LightAPI Version (optional)

No response

LibsDisguises Version (optional)

No response

FULL server log

No response

Error (optional)

No response

Problematic items yml configuration file (optional)

No response

Other files, you can drag and drop them here to upload. (optional)

No response

Screenshots/Videos (you can drag and drop files or paste links)

No response

LoneDev6 commented 1 year ago

I'll try to find the cause, anyway this is a known issue of the trading GUI because the game is very strict on items matching.

Akiranya commented 1 year ago

Some functions of my server also rely on the vanilla trade GUI but I don't see this issue after I updated IA (so the strict itemMeta matching also appies to my server).

Specifically, I updated IA from 3.2 to 3.3 and I also updated IA as soon as there is a newer minor version of 3.3 (i.e. r5,6,7..). I guess it's some other plugins causing this issue.

LoneDev6 commented 1 year ago

Well, depends. This game is a total shit when it comes to reliability of text generation for lores and display names. Sometimes it adds some tags, sometimes not.

This causes various issues on GUIs and logics which require a PRECISE nbt check. In this case the text is the same but the internal JSON text is not.

minecraft-dripdrop commented 1 year ago

when you use anvil to rename item,the item's NBT will just like the New format.So the only problem is to make sure that NBT doesn't change

LoneDev6 commented 1 year ago

Another solution (cleaner) would be to try to fork the Shopkeepers plugin and somehow add a proper ItemsAdder match code to avoid having to deal with the unstable NBT matching logic.

But I'll try to find the cause of this issue before trying to work on Shopkeepers directly.

LoneDev6 commented 1 year ago

The next update will revert back the NBT display name removing the new useless properties.

Darkseno commented 1 year ago

I have the impression that this update to break something else.

When I give myself two tickets for example with /iagive and I do a /inv (with CMI) to give one of the tickets to another player and well the NBT changes and the ticket I keep is not the same as the player's.

It didn't do that before

LoneDev6 commented 1 year ago

Post the two different NBT, I can't do anything without proper data. Use /iatag while holding each one of the items and copy the result printed in the server console.

Darkseno commented 1 year ago

Here is the /iatag: https://pastebin.com/hjFik48y

Here how to reproduce the bug: https://www.youtube.com/watch?v=zj86n24K5cs

EDIT: Attention, I also use the Shopkeeper & Eco plugin (it's a kind of api for the Ecocrates, EcoEnchants etc.. plugin) I also believe it handles NBT.

But in this case I don't see why Eco or Shoopkeeper would be a problem.

Also be careful, with your last update you broke all the AI items on my server, I had to redo all my shopkeeper and create debug NPCs so that players could exchange the old items for the new ones, it was long and exhausting.

LoneDev6 commented 1 year ago

The last update was exactly made to fix this. This was the initial report here on the first message. Anyway next time make a new Github issue don't comment on closed issue reports. I opened a new one.