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 wrong ActionResult on FabricDoorClaimPermission #6

Merged
merged 1 commit into from
Feb 6, 2024

Conversation

alikindsys
Copy link
Member

ActionResult.SUCCESS is used to indicate to FabricAPI that all processing is done, since it "cancels further processing".

Although it might seem that this is what you want to convey, unfortunately since it cancels ALL further processing, the first callback to get that event from the queue consumes it, and all the logic that should follow that is blocked from ever existing.

The most common (and visible) side effect is the complete inability to place any blocks in the world, even though this permission should only ever check for block interactions not new blocks being placed.

Placing blocks is another permission entirely, and since this is a clear overreach of FabricDoorClaimPermission, which should only "Allow the player to open and close doors in the claim."

`ActionResult.SUCCESS` is used to indicate to FabricAPI that *all processing is done*, since it "cancels further processing".

Although it might seem that this is what you want to convey, unfortunately since it cancels ALL further processing, the first callback to get that event from the queue consumes it, and all the logic that should follow that is blocked from ever existing.

The most common (and visible) side effect is the complete inability to place any blocks in the world, even though this permission should only ever check for block interactions not new blocks being placed.

Placing blocks is another permission entirely, and since this is a clear overreach of `FabricDoorClaimPermission`, which should only "Allow the player to open and close doors in the claim."
Copy link
Member

@LoboMetalurgico LoboMetalurgico left a comment

Choose a reason for hiding this comment

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

Thanks for fixing this bug!

@LoboMetalurgico LoboMetalurgico merged commit bb1e62e into 1.20 Feb 6, 2024
4 checks passed
@LoboMetalurgico LoboMetalurgico deleted the fix/cant-place-blocks branch February 6, 2024 01:33
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.

2 participants