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 queryRel returning data value for block at absolute coordinates #2645

Merged
merged 2 commits into from Mar 23, 2024

Conversation

Zeranny
Copy link
Contributor

@Zeranny Zeranny commented Mar 22, 2024

Overview

Fixes the incorrect method for relative data checks in expressions (queryRel)

Fixes #2643

Description

Current version erroneously uses toWorld instead of toWorldRel, so queryRel(0,0,0,t,d) would always return the data of the block at 0,0,0 for d, where it should return the data value of whatever block is 0,0,0 offset.

Submitter Checklist

Edit tasklist title
Beta Give feedback Tasklist Submitter Checklist, more options

Delete tasklist

Delete tasklist block?
Are you sure? All relationships in this tasklist will be removed.
  1. Make sure you are opening from a topic branch (/feature/fix/docs/ branch (right side)) and not your main branch.
    Options
  2. Ensure that the pull request title represents the desired changelog entry.
    Options
  3. New public fields and methods are annotated with @since TODO.
    Options
  4. I read and followed the contribution guidelines.
    Options

@Zeranny Zeranny requested a review from a team as a code owner March 22, 2024 18:27
@github-actions github-actions bot added the Bugfix This PR fixes a bug label Mar 22, 2024
Copy link
Member

@SirYwell SirYwell left a comment

Choose a reason for hiding this comment

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

As a side note, we should probably also pull EngineHub/WorldEdit@b5b9c6a as a follow-up?

@@ -83,9 +83,8 @@ public int getBlockTypeRel(double x, double y, double z) {
}

@SuppressWarnings("deprecation")
@Override
Copy link
Member

Choose a reason for hiding this comment

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

The annotation should be kept

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good spot, didn't mean to remove that

@NotMyFault NotMyFault merged commit 9d20df9 into IntellectualSites:main Mar 23, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bugfix This PR fixes a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

queryRel masks with data values don't work anymore
3 participants