XSeries icon indicating copy to clipboard operation
XSeries copied to clipboard

[XItemStack] setDisplayName(getDisplayName()) doesn't retain the exact original IChatBaseComponent

Open RazerStorm opened this issue 9 months ago • 3 comments

Description So basicly the issue is that when i save a itemstack to the config using the XItemStack.serialize() function and deserialize it later it changes the nbt and that causes it not to be the exact item it was when it was put in the config.

image

Here is my full code if you want to review it: https://github.com/RazerStorm/CustomCrafting

RazerStorm avatar Oct 01 '23 09:10 RazerStorm

It's not possible for me to fix it. I just use get/setDisplayname(), I don't decide what those methods do. Of course I can modify the CraftBukkit instances directly, but that requires extra reflection code and probably a custom string -> TextComponent translator that I'm not willing to do myself.

Also you didn't say which version of Minecraft you're testing this with. If it's not the latest, see if the latest version has this issue as well.

CryptoMorin avatar Oct 01 '23 16:10 CryptoMorin

Oh sorry, i indeed forgot to mention the version. The version is 1.20.1

It's not possible for me to fix it. I just use get/setDisplayname(), I don't decide what those methods do. Of course I can modify the CraftBukkit instances directly, but that requires extra reflection code and probably a custom string -> TextComponent translator that I'm not willing to do myself.

Also you didn't say which version of Minecraft you're testing this with. If it's not the latest, see if the latest version has this issue as well.

RazerStorm avatar Oct 01 '23 22:10 RazerStorm

I accidently closed it, i am keeping it open in case someone decides to fix this :)

RazerStorm avatar Oct 02 '23 19:10 RazerStorm