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

Open
wants to merge 6 commits into
base: dev/patch
Choose a base branch
from

Conversation

TheAbsolutionism
Copy link

@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.

Another thing to point out as I was testing, I had tried to do blocks vector(1,0,0) (location of me) which ended up returning 100 blocks.
This has been "fixed", a minor discrepancy of when doing set blocks vector(1,0,0) (location of me) to stone only sets the block at the player, and when doing vector(2,0,0) had resulted in block at player plus 2 blocks being set.


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
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.

3 participants