
Comparing type of two items, of the same type, with differing enchants fails
Dot0420 opened this issue · 4 comments
Skript/Server Version
Skript 2.12.1
Purpur 1.21.4
Bug Description
When an item has an enchantment, comparing its type with type of {_item}
makes the enchanted item and the non-enchanted item be recognized as different items.
Expected Behavior
.
Steps to Reproduce
command /enchanttest:
trigger:
set {_left} to slot 0 of player's inventory
set {_right} to slot 1 of player's inventory
broadcast type of {_left}
broadcast type of {_right}
if type of {_left} = type of {_right}:
broadcast "a"
At this point, if either the left or right item has an enchantment, they are recognized as different items.
Errors or Screenshots
No response
Other
When comparing like in the code below, the problem is resolved, but I’m leaving an issue for now.
set {_left} to plain slot 0 of player's inventory
set {_right} to plain slot 1 of player's inventory
Agreement
- I have read the guidelines above and affirm I am following them with this report.
If one item has Mending I and the other has Efficiency I, they are recognized as different items.