Skip to content

Fix PIE not being cancelled after a cancelled PIEE#8435

Open
sovdeeth wants to merge 3 commits intoSkriptLang:dev/patchfrom
sovdeeth:patch/fix-failure-to-cancel-PIE-after-PIEE
Open

Fix PIE not being cancelled after a cancelled PIEE#8435
sovdeeth wants to merge 3 commits intoSkriptLang:dev/patchfrom
sovdeeth:patch/fix-failure-to-cancel-PIE-after-PIEE

Conversation

@sovdeeth
Copy link
Member

@sovdeeth sovdeeth commented Feb 9, 2026

Problem

When a user clicks on an entity with a wind charge, for instance, a PlayerInteractEntityEvent is called. Skript uses this to trigger EvtClick, and can properly cancel it. However, then a PlayerInteractEvent is called, Skript skips it to avoid duplicating click events, and doesn't properly forward the cancellation from the prior PIEE.

When determining whether a received PIE should be treated as cancelled, Skript would treat any DENY as a cancellation, except if the click is on AIR and the useItemInHand is NOT DENY. This didn't handle cases like RIGHT_CLICK_BLOCK + DENY useInteractedBlock + DEFAULT useItemInHand. Skript would assume it is cancelled, not handle it, and then the user would shoot a wind charge.

Solution

Forwards the cancellation from PIEE to PIE, and properly tracks PIEE cancellations.
Determines cancellation properly for all PIE combinations. RIGHT_CLICK_BLOCK is complex and not possible to always determine, so I erred on the side of caution and treated it as cancelled ONLY if both uses are DENY. This means a hoe-ing of dirt that was denied solely on one or the other will be treated as uncancelled, despite it clearly being cancelled. There's no good way to solve this without introducing specific syntax to cancel item use or block use (which I will make a feature pr for), but I think this is acceptable for a bug fix.

Testing Completed

Manual confirmation.

Supporting Information


Completes: #8434
Related: none
AI assistance: none

@sovdeeth sovdeeth requested a review from a team as a code owner February 9, 2026 02:17
@sovdeeth sovdeeth added the bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. label Feb 9, 2026
@sovdeeth sovdeeth requested review from Efnilite and erenkarakal and removed request for a team February 9, 2026 02:17
@sovdeeth sovdeeth linked an issue Feb 9, 2026 that may be closed by this pull request
1 task
@sovdeeth sovdeeth moved this to In Review in 2.14 Releases Feb 9, 2026
@bluelhf
Copy link
Contributor

bluelhf commented Feb 9, 2026

excellent investigation :)

@sovdeeth sovdeeth added breaking changes Pull or feature requests that contain breaking changes (API, syntax, etc.) needs reviews A PR that needs additional reviews labels Feb 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking changes Pull or feature requests that contain breaking changes (API, syntax, etc.) bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. needs reviews A PR that needs additional reviews

Projects

Status: In Review

Development

Successfully merging this pull request may close these issues.

cancel event does not call when looking at a players feet

2 participants

Comments