Skript icon indicating copy to clipboard operation
Skript copied to clipboard

🚀 Add inventory raw slot expression

Open AyhamAl-Ali opened this issue 2 years ago • 8 comments

Description

This PR Adds a new expression to get the raw inventory slot number, this is a unique number for each view, it basically consider the current opened inventories (top and bottom) as a 1 inventory that begins from the top left


Target Minecraft Versions: Any Requirements: None Related Issues: #4461

AyhamAl-Ali avatar Feb 12 '22 04:02 AyhamAl-Ali

I'm concerned that this is handled as a number whereas the regular slot supports getting and setting the item - even if Bukkit doesn't handle this as easily you could try and support this for parity with the existing expression to avoid confusing users.

I think the idea of raw slot is to just get the slot number, otherwise users can use clicked slot, having both clicked slot and raw slot as a slot is redundant IMO

AyhamAl-Ali avatar Feb 14 '22 10:02 AyhamAl-Ali

There is the index of %slots% expression. Maybe this expression could be something like raw slot index to clear up any potential confusion?

Maybe that is more confusing though actually lol

APickledWalrus avatar Feb 14 '22 12:02 APickledWalrus

There is the index of %slots% expression. Maybe this expression could be something like raw slot index to clear up any potential confusion?

Maybe that is more confusing though actually lol

Should this not be raw index instead of raw slot then?

Moderocky avatar Feb 14 '22 13:02 Moderocky

I was thinking of adding this to index of slot as Kenzie said, but thought not then, if that's a better approach then i will try it out if possible

More discussion here

AyhamAl-Ali avatar Feb 14 '22 14:02 AyhamAl-Ali

Not a fan of this addition, raw slot is basically never used.

TheLimeGlass avatar Jul 01 '22 09:07 TheLimeGlass

Not a fan of this addition, raw slot is basically never used.

It's indeed needed in some places if not many when you open 2 inventories the usual slot number will continue after 63 in the below gui while the raw will begin from 0

AyhamAl-Ali avatar Jul 01 '22 09:07 AyhamAl-Ali

Was there a reason we didn't change this to return Slot? I forget

Here is more info about our discussion

EDIT: New discussion in skript-dev

AyhamAl-Ali avatar Jul 18 '22 21:07 AyhamAl-Ali

I don't believe Skript should have this expression. I'm removing my review request from this pull request.

TheLimeGlass avatar Jul 21 '22 10:07 TheLimeGlass