Skip to content

ExprBlocks - BlockLineIterator#7062

Merged
APickledWalrus merged 24 commits into
SkriptLang:dev/patchfrom
Absolutionism:dev/ExprBlocks-Void-to-Void
Dec 1, 2024
Merged

ExprBlocks - BlockLineIterator#7062
APickledWalrus merged 24 commits into
SkriptLang:dev/patchfrom
Absolutionism:dev/ExprBlocks-Void-to-Void

Conversation

@Absolutionism
Copy link
Copy Markdown
Contributor

@Absolutionism Absolutionism 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
Copy Markdown
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
Comment thread src/main/java/ch/njol/skript/expressions/ExprBlocks.java Outdated
Comment thread src/main/java/ch/njol/skript/util/BlockLineIterator.java Outdated
Copy link
Copy Markdown
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

@Absolutionism
Copy link
Copy Markdown
Contributor Author

tests failing in 1.13.2

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

Comment thread src/test/skript/tests/syntaxes/expressions/ExprBlocks.sk
Comment thread src/test/skript/tests/syntaxes/expressions/ExprBlocks.sk
Comment thread src/test/skript/tests/syntaxes/expressions/ExprBlocks.sk
Comment thread src/test/skript/tests/syntaxes/expressions/ExprBlocks.sk Outdated
Comment thread src/main/java/ch/njol/skript/util/BlockLineIterator.java Outdated
@APickledWalrus APickledWalrus merged commit 631955d into SkriptLang:dev/patch Dec 1, 2024
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