Skip to content

Conversation

@eztaK-red
Copy link
Contributor

Overview

Fixes #3083

Description

Turning the mutable position vectors of the region iterator to immutable ones, to allow the original implementation of the hollowOutRegion to function as expected.

Submitter Checklist

  • Make sure you are opening from a topic branch (/feature/fix/docs/ branch (right side)) and not your main branch.
  • Ensure that the pull request title represents the desired changelog entry.
  • New public fields and methods are annotated with @since TODO.
  • I read and followed the contribution guidelines.

@eztaK-red eztaK-red requested a review from a team as a code owner March 9, 2025 23:59
@github-actions github-actions bot added the Bugfix This PR fixes a bug label Mar 9, 2025
@eztaK-red
Copy link
Contributor Author

eztaK-red commented Mar 10, 2025

Result of //hollow in latest FAWE versions vs result with fix from this PR
2025-03-10_01 04 31
2025-03-10_01 03 39

Copy link
Member

@dordsor21 dordsor21 left a comment

Choose a reason for hiding this comment

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

Assuming this still works (don't see why not), lgtm, thanks!

@dordsor21 dordsor21 requested a review from a team March 10, 2025 21:18
@eztaK-red
Copy link
Contributor Author

Oh hold up, there's a specific case for which it doesn't work

by yet again turning a mutable bv3 into an immutable one
@eztaK-red
Copy link
Contributor Author

The fix worked. The case I was just talking about was something separate. recurseHollow was incorrectly marking north-east-upwards concave corners as inside. Adding toImmutable() to a bv3 fixed it. In this case, it is not obvious to me whether there is a better way.

@dordsor21
Copy link
Member

The fix worked. The case I was just talking about was something separate. recurseHollow was incorrectly marking north-east-upwards concave corners as inside. Adding toImmutable() to a bv3 fixed it. In this case, it is not obvious to me whether there is a better way.

Make it not immutable after adding, this current way you're creating extra BV3s

@eztaK-red
Copy link
Contributor Author

Like this?
As far as I can see, //hollow now/still works as it should.

@dordsor21
Copy link
Member

Like this? As far as I can see, //hollow now/still works as it should.

Yeah I don't see why it would need to be immutable here - the queue does not actually store the BV3 and stores as an index in a long array

@dordsor21 dordsor21 requested a review from a team March 11, 2025 16:44
@dordsor21
Copy link
Member

You added the comments in the wrong place - where you added is already covered. Should be around 3301 and 3316

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.

Looks fine. I wonder if we should change MutableBV3 to create an immutable instance on add and instead have specific mutating variants instead. But that's out of scope for now.

@dordsor21
Copy link
Member

Looks fine. I wonder if we should change MutableBV3 to create an immutable instance on add and instead have specific mutating variants instead. But that's out of scope for now.

Mm probably, but I think that should be a forcibly breaking change in v3; relocating/renaming the class e.g.

@dordsor21 dordsor21 merged commit 5a148ea into IntellectualSites:main Mar 21, 2025
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.

//hollow incorrect behavior

3 participants