Skip to content

Fix cross-region block access and replaced block checks - #2321

Open
byPixelTV wants to merge 1 commit into
EngineHub:version/7.0.xfrom
byPixelTV:version/7.0.x
Open

byPixelTV wants to merge 1 commit into
EngineHub:version/7.0.xfrom
byPixelTV:version/7.0.x

Conversation

@byPixelTV

Copy link
Copy Markdown

Avoid reading a causing block from a region that is not owned by the current Folia thread. This prevents thread violations when a falling block lands in a different region or world from its origin.

Apply the same ownership check to block placement, block breaking, and fire cause checks. When the causing block cannot be read, its material-specific flags cannot be evaluated.

Also fix the replaced-block check in BlockPlaceEvent, which previously compared the replaced material with itself and never fired a break event.

Error log for reference:
https://pastes.dev/UWDTIF5k26

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