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

ExprBlocks - BlockLineIterator #7062

Conversation

TheAbsolutionism
Copy link
Contributor

@TheAbsolutionism TheAbsolutionism commented Sep 9, 2024

Description

This PR aims to fix the stack trace of using the blocks between %loc% and %loc% if starting location is above max height limit.
Starting off with my initial testing, the same stack trace occurred when below minimum height limit as well.

This issue was caused by the fitInWorld function. As it was clamping the starting location to min/max height limit thus making the BlockIterator not able to reach its goal.
Personally, I see no point in using this function, as even though it would restrict the starting point to the limit, if you were to get 10 blocks above it, it would still go into the void.
Ultimately leading me to not use it anymore.


Target Minecraft Versions: any
Requirements: none
Related Issues: #6437

Changed, fitInWorld function
Fixed, Using vector function
@Efnilite
Copy link
Member

Efnilite commented Sep 9, 2024

you should add a regression test

@Efnilite Efnilite added the bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. label Sep 9, 2024
Copy link
Member

@sovdeeth sovdeeth left a comment

Choose a reason for hiding this comment

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

tests failing in 1.13.2

@TheAbsolutionism
Copy link
Contributor Author

tests failing in 1.13.2

Found the problem, Location#isWorldLoaded does not exist for 1.13.2

@APickledWalrus APickledWalrus merged commit 631955d into SkriptLang:dev/patch Dec 1, 2024
7 checks passed
Burbulinis pushed a commit to Burbulinis/Skript that referenced this pull request Dec 3, 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

Successfully merging this pull request may close these issues.

6 participants