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

Alias bug: fire block cannot be checked #5497

Closed
1 task done
TwinkleToes777 opened this issue Mar 8, 2023 · 3 comments
Closed
1 task done

Alias bug: fire block cannot be checked #5497

TwinkleToes777 opened this issue Mar 8, 2023 · 3 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. priority: low Issues that are not harmful to the experience but are related to useful changes or additions.

Comments

@TwinkleToes777
Copy link

Skript/Server Version

[14:20:40 INFO]: §7[§6Skript§7]§r Server Version: §3git-Purpur-1171 (MC: 1.16.5)
[14:20:40 INFO]: §7[§6Skript§7]§r Skript Version: §32.6.4
[14:20:40 INFO]: §7[§6Skript§7]§r Installed Skript Addons: §3
[14:20:40 INFO]: §7[§6Skript§7]§r  - skript-yaml v1.4
[14:20:40 INFO]: §7[§6Skript§7]§r  - skRayFall v1.9.26 (https://sk.rayfall.net/)
[14:20:40 INFO]: §7[§6Skript§7]§r  - SkBee v1.15.2 (https://github.com/ShaneBeee/SkBee)
[14:20:40 INFO]: §7[§6Skript§7]§r  - Skore v2.0.1
[14:20:40 INFO]: §7[§6Skript§7]§r  - Skript-Packet v2.1.1 (www.github.com/Anarchick/skript-packet)
[14:20:40 INFO]: §7[§6Skript§7]§r  - skript-placeholders v1.5.2 (https://github.com/APickledWalrus/skript-placeholders)
[14:20:40 INFO]: §7[§6Skript§7]§r  - skDragon v0.17.5
[14:20:40 INFO]: §7[§6Skript§7]§r  - skript-reflect v2.3 (https://github.com/TPGamesNL/skript-reflect)
[14:20:40 INFO]: §7[§6Skript§7]§r  - SkQuery v4.1.6
[14:20:40 INFO]: §7[§6Skript§7]§r  - SkriptJSON v1.0.0
[14:20:40 INFO]: §7[§6Skript§7]§r  - SkJade v1.4.2 (https://www.github.com/Ankoki-Dev/SkJade)
[14:20:40 INFO]: §7[§6Skript§7]§r Installed dependencies: §3
[14:20:40 INFO]: §7[§6Skript§7]§r  - Vault v1.7.3-b131
[14:20:40 INFO]: §7[§6Skript§7]§r  - WorldGuard v7.0.5+3827266

Bug Description

if block at {_loc} is fire:

throws error that fire is a visual effect? how to check for fire? I tried "fire block"

Expected Behavior

before I updated from 2.6.1 to 2.6.4 it worked, now fire is a visual effect

Steps to Reproduce

reload a script with:
on join:
block at player is fire

Errors or Screenshots

Can't compare a block with a visual effect

Other

No response

Agreement

  • I have read the guidelines above and affirm I am following them with this report.
@NotSoDelayed
Copy link
Contributor

Duplicate of #4769
Have you tried using fire block?

@TwinkleToes777
Copy link
Author

TwinkleToes777 commented Mar 9, 2023

Duplicate of #4769 Have you tried using fire block?

Yes, as already written in my post.

It looks similar, but the error is different.

@TheLimeGlass TheLimeGlass added the bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. label Mar 9, 2023
@TheLimeGlass TheLimeGlass self-assigned this Mar 9, 2023
@TheLimeGlass
Copy link
Collaborator

Found and fixed the issue in an upcoming pull request.

Issue description

Essentially if an expression is an unparsed literal, you convert it to Object.class or use the defending literal utils class, this will allow that UnparsedLiteral to now be a proper literal. Well that also solidifies it's value now. So CondCompare was doing this and Skript picked VisualEffect each time for fire and not even comparators can save that because a block nor itemtype can be converted to a visual effect and vice versa. So I fixed it so it doesn't do this but rather check the context it's comparing against, and attempt to convert to something it can compare and convert to. So for example in this issue, Skript should be converting a block to an itemtype and then also ensuring the UnparsedLiteral is parsed as an ItemType.

@TheLimeGlass TheLimeGlass added the PR available Issues which have a yet-to-be merged PR resolving it label Mar 10, 2023
@TheLimeGlass TheLimeGlass added the priority: low Issues that are not harmful to the experience but are related to useful changes or additions. label Mar 15, 2023
@TheLimeGlass TheLimeGlass removed their assignment Jun 2, 2023
@TheLimeGlass TheLimeGlass added completed The issue has been fully resolved and the change will be in the next Skript update. and removed PR available Issues which have a yet-to-be merged PR resolving it labels Jun 2, 2023
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. priority: low Issues that are not harmful to the experience but are related to useful changes or additions.
Projects
None yet
Development

No branches or pull requests

3 participants