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

Fix 'all armor stands' expression not working #4260

Merged
merged 6 commits into from
Mar 6, 2022

Conversation

TPGamesNL
Copy link
Member

@TPGamesNL TPGamesNL commented Aug 9, 2021

Description

The bug was caused by 4dc285a, as bensku said:

Wow this breaks stuff -bensku, 21.10.2016

Because of this code in SkriptParser, it tries to parse all armor stands as an ItemType first. This works, because all ... is a valid pattern for items (e.g. all beds, all flowers): you can even use all ... for any item, not just items that have multiple possibilities.

Disabling this code would originally break syntax such as diamond sword of sharpness and unbreaking or 2 minutes and 5 seconds, because Skript tries to parse it as a list (e.g. diamond sword of sharpness and unbreaking), but this bug is fixed by #4242.

#4242 must be merged before this PR

This decreases the parsing time of my test scripts by 9%


Target Minecraft Versions: any
Requirements: none
Related Issues: #2370, #2723, #4239, #4242

@TPGamesNL TPGamesNL added the bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. label Aug 9, 2021
Copy link
Member

@APickledWalrus APickledWalrus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me as long as everything is parsing okay still ;D

@TPGamesNL
Copy link
Member Author

This PR also fixes missing and/or warning showing up when they were disabled in config (#2370), and I also fixed another bug with ParseLogHandlers that caused warnings in list parsing not to show up

@TPGamesNL TPGamesNL mentioned this pull request Aug 15, 2021
1 task
@TPGamesNL TPGamesNL merged commit d707c15 into SkriptLang:master Mar 6, 2022
@TPGamesNL TPGamesNL deleted the fix/skript-parser-bad-code branch March 6, 2022 16:49
TPGamesNL added a commit to TPGamesNL/Skript that referenced this pull request Mar 8, 2022
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

Successfully merging this pull request may close these issues.

2 participants