Powered and Unpowered Lever Bug
aaaeeeMC opened this issue ยท 2 comments
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
- Place a Lever
- Look towards the lever
- Execute the effect command "send whether target block is a powered lever"
- It returns true instead of false
- Activate the lever
- Execute the effect command "send whether target block is a powered lever" again
- It returns true
- You now know it returns true to both, when it should return false when it isn't powered
Errors or Screenshots
Other
No response
Agreement
- I have read the guidelines above and affirm I am following them with this report.
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
.
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