Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

holder of inventory returning as blockstate #6424

Closed
1 task done
ShaneBeee opened this issue Feb 12, 2024 · 2 comments
Closed
1 task done

holder of inventory returning as blockstate #6424

ShaneBeee opened this issue Feb 12, 2024 · 2 comments
Labels
bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. completed The issue has been fully resolved and the change will be in the next Skript update. patch-ready A PR/issue that has been approved and is ready to be merged/closed for the next patch version. priority: medium Issues that are detrimental to user experience (prohibitive bugs or lack of useful implementation).

Comments

@ShaneBeee
Copy link
Contributor

Skript/Server Version

[21:15:28 INFO]: [Skript] Skript's aliases can be found here: https://github.com/SkriptLang/skript-aliases
[21:15:28 INFO]: [Skript] Skript's documentation can be found here: https://docs.skriptlang.org/
[21:15:28 INFO]: [Skript] Skript's tutorials can be found here: https://docs.skriptlang.org/tutorials
[21:15:28 INFO]: [Skript] Server Version: git-Paper-423 (MC: 1.20.4)
[21:15:28 INFO]: [Skript] Skript Version: 2.8.2 (selfbuilt-unknown)
[21:15:28 INFO]: [Skript] Installed Skript Addons: 
[21:15:28 INFO]: [Skript]  - skript-reflect v2.4 (https://github.com/SkriptLang/skript-reflect)
[21:15:28 INFO]: [Skript]  - SkBee v3.2.1 (https://github.com/ShaneBeee/SkBee)
[21:15:28 INFO]: [Skript]  - SkMaze v1.1.0
[21:15:28 INFO]: [Skript] Installed dependencies: 
[21:15:28 INFO]: [Skript]  - Vault v1.7.3-b131
>

Bug Description

when using code such as holder of inventory it's returning a BlockState, but Skript doesn't allow the use of blockstate anywhere.

Expected Behavior

Holder should return a block

Steps to Reproduce

test the code:

on inventory close:
	send "Location: %location of holder of event-inventory%"

get error:

[21:16:28 INFO]: Line 3: (test.sk)
[21:16:28 INFO]:     holder of event-inventory is not a location
[21:16:28 INFO]:     Line: send "Location: %location of holder of event-inventory%"

I was given this issue by someone else, they asked me to report it.
I have confirmed it is in fact an issue.
They informed me that this USED to work in a previous version of Skript but recently broke.

Errors or Screenshots

No response

Other

No response

Agreement

  • I have read the guidelines above and affirm I am following them with this report.
@AyhamAl-Ali AyhamAl-Ali added the investigating The core developers are currently investigating this issue. Usually used for complex cases. label Feb 12, 2024
@sovdeeth
Copy link
Member

This should be handled by the InventoryHolder -> Block converter, I wonder why it's not working.
#6171 might be related.

@sovdeeth sovdeeth added bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. priority: medium Issues that are detrimental to user experience (prohibitive bugs or lack of useful implementation). labels Feb 25, 2024
@sovdeeth
Copy link
Member

Yes it seems that since ExprLocation is a WrapperExpression for Location, it relies on the input to be converted to a Location automatically. Since InventoryHolders can only be converted to Entity or Block, and not chained, this means ExprLocation won't work for InventoryHolders.
Personally, I think relying on converters is a bad design for ExprLocation.

@sovdeeth sovdeeth added PR available Issues which have a yet-to-be merged PR resolving it patch-ready A PR/issue that has been approved and is ready to be merged/closed for the next patch version. completed The issue has been fully resolved and the change will be in the next Skript update. and removed investigating The core developers are currently investigating this issue. Usually used for complex cases. PR available Issues which have a yet-to-be merged PR resolving it labels May 31, 2024
@sovdeeth sovdeeth closed this as completed Jun 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. completed The issue has been fully resolved and the change will be in the next Skript update. patch-ready A PR/issue that has been approved and is ready to be merged/closed for the next patch version. priority: medium Issues that are detrimental to user experience (prohibitive bugs or lack of useful implementation).
Projects
None yet
Development

No branches or pull requests

3 participants