comparing looped items in inventory
ddeejj opened this issue ยท 2 comments
Skript/Server Version
[06:38:24 INFO]: [Skript] Skript's aliases can be found here: https://github.com/SkriptLang/skript-aliases
[06:38:24 INFO]: [Skript] Skript's documentation can be found here: https://docs.skriptlang.org/
[06:38:24 INFO]: [Skript] Skript's tutorials can be found here: https://docs.skriptlang.org/tutorials
[06:38:24 INFO]: [Skript] Server Version: 1.20.6-148-20f5165 (MC: 1.20.6)
[06:38:24 INFO]: [Skript] Skript Version: 2.9.1 (skriptlang-github)
[06:38:24 INFO]: [Skript] Installed Skript Addons:
[06:38:24 INFO]: [Skript] - SkBee v3.5.8 (https://github.com/ShaneBeee/SkBee)
[06:38:24 INFO]: [Skript] Installed dependencies: None
Bug Description
- When getting the slots of the plain item it returns all items that are the same item type
- When getting the slots of the edited item type (e.g. renaming the item,lore, enchantments, custom model data ect) it only return the edited items and not the plain items
- this is also a issue with removing items from the inventory and getting the item amount in inventory too - without loop
Expected Behavior
Only return the exact item
Steps to Reproduce
command /test:
trigger:
set {_i} to 1 of (player's tool) #name of the tool is "ayo"
test(player, {_i})
function test(p: player, item: item):
loop (items in {_p}'s inventory):
loop-item' index is between 0 and 35
1 of (loop-item) = {_item} #<---
broadcast loop-item' index
also this way
{_item} = 1 of (loop-item)
when getting the slots of the plain item it returns only the plain item
but when getting the slots of the edited item it returns all the same item types
so this is just in reverse as i stated in bug description
Errors or Screenshots
No response
Other
No response
Agreement
- I have read the guidelines above and affirm I am following them with this report.
This isn't necessarily a bug, just a behavioral quirk of item comparison. We have plans to rework the system coming up, though.
Duplicate #6891