Skip to content

Fix multiple issues related to rounding / inBounds checks - #4308

Open
avaruus1 wants to merge 1 commit into
SpongePowered:api-12from
avaruus1:fix-rounding-and-boundary-bugs
Open

Fix multiple issues related to rounding / inBounds checks#4308
avaruus1 wants to merge 1 commit into
SpongePowered:api-12from
avaruus1:fix-rounding-and-boundary-bugs

Conversation

@avaruus1

@avaruus1 avaruus1 commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Cast to int rounds towards zero instead of negative infinity resulting in inconsistent behaviour. BlockPos.containing(...) floors the input values.

The inBounds check failed when, for example, spawning an entity near the border of a chunk.

Cast to int rounds towards zero instead of negative infinity resulting in inconsistent behaviour. The inBounds check failed when, for example, spawning an entity near the border of a chunk.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant