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

Powered and Unpowered Lever Bug #6998

Open
1 task done
aaaeeeMC opened this issue Aug 24, 2024 · 2 comments
Open
1 task done

Powered and Unpowered Lever Bug #6998

aaaeeeMC opened this issue Aug 24, 2024 · 2 comments
Labels
bug An issue that needs to be fixed. Alternatively, a PR fixing an issue.

Comments

@aaaeeeMC
Copy link

Skript/Server Version

[Skript] Skript's aliases can be found here: https://github.com/SkriptLang/skript-aliases
[Skript] Skript's documentation can be found here: https://docs.skriptlang.org/
[Skript] Skript's tutorials can be found here: https://docs.skriptlang.org/tutorials
[Skript] Server Version: 1.21-109-5a5035b (MC: 1.21)
[Skript] Skript Version: 2.9.1 (skriptlang-github)
[Skript] Installed Skript Addons:
[Skript] - SkBee v3.5.8 (https://github.com/ShaneBeee/SkBee)
[Skript] Installed dependencies: None

Bug Description

Skript won't make a difference between a powered and unpowered redstone lever. Currently both powered and unpowered levers are considered powered levers, as seen in the screenshot given in Errors or Screenshots.

Expected Behavior

Skript was supposed to return false to the whether target block is a powered lever check when the lever was deactivated.

Steps to Reproduce

  1. Place a Lever
  2. Look towards the lever
  3. Execute the effect command "send whether target block is a powered lever"
  4. It returns true instead of false
  5. Activate the lever
  6. Execute the effect command "send whether target block is a powered lever" again
  7. It returns true
  8. You now know it returns true to both, when it should return false when it isn't powered

Errors or Screenshots

image

Other

No response

Agreement

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

TenFont commented Aug 25, 2024

This doesn't seem to be an issue with the lever alias specifically but rather with all aliases that have blockdata, e.g. repeaters, comparators, redstone dust, etc. Even a condition like target block is waterlogged oak stairs passes regardless of whether or not the oak stairs are waterlogged.
To be more specific, this is an issue with the comparison. I'm not familiar with the way skript handles comparisons, however I have observed that this issue is most likely due to the fact that skript is trying to be lenient with its comparisons. Like how trying to compare an enchanted item to its regular form, returns true.

Interestingly enough, flipping the expressions around, send whether powered lever is target block works properly; sending true when it's a powered lever and false when it is not. I assume this is because it's now a strict comparison. Like how you can try send whether diamond sword is tool while holding an enchanted diamond sword and it'll send false.

@Fusezion
Copy link
Contributor

issue seems to be similar to #4582 not super important now with aliases being deprecated so their comparator is pretty useless but that's left to the team to decide as block data is encouraged more

but I guess if we're planning to retain the system for aliases to be created/added by players then this should probably still be fixed

@sovdeeth sovdeeth added the bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. label Aug 30, 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.
Projects
None yet
Development

No branches or pull requests

4 participants