[SPIGOT-6260] ItemStack#isSimilar() no longer work after the item is deserialized Created: 30/Nov/20 Updated: 30/Nov/20 Resolved: 30/Nov/20 |
|
Status: | Closed |
Project: | Spigot |
Component/s: | None |
Affects Version/s: | None |
Fix Version/s: | None |
Type: | Bug | Priority: | Minor |
Reporter: | wysohn | Assignee: | Unassigned |
Resolution: | Duplicate | Votes: | 0 |
Labels: | 1.16.4, itemstack, serialization |
Attachments: |
![]() ![]() ![]() ![]() ![]() ![]() |
Version: | This server is running CraftBukkit version git-Spigot-a19903d-e1ebdd9 (MC: 1.16.4) (Implementing API version 1.16.4-R0.1-SNAPSHOT) |
Guidelines Read: | Yes |
Description |
So it is quite straight forward. Whenever an item's name is modified by the anvil, serialized, and then de-serialized, then isSimilar() now no longer able to tell they are the similar items. Take a look at the screenshots for details. Steps:
Since the toString() of both ItemStack shows exactly same output, I assume something is internally failing. I think this is a major issue since it's a quite basic functionality. Item name is something that can be easily changed in-game without any plugins. Plugins that rely on isSimilar() method will be severely impacted by this problem. Thanks! PS) test code attached here
|
Comments |
Comment by Black Hole [ 30/Nov/20 ] |
Duplicate of |