Skip to content

stop firing pressure plate EntityInteractEvent for ignored entities (fixes #4962)#5149

Merged
MiniDigger merged 1 commit into
PaperMC:masterfrom
Trigary:issue-4962
Mar 4, 2021
Merged

stop firing pressure plate EntityInteractEvent for ignored entities (fixes #4962)#5149
MiniDigger merged 1 commit into
PaperMC:masterfrom
Trigary:issue-4962

Conversation

@Trigary
Copy link
Copy Markdown
Contributor

@Trigary Trigary commented Feb 2, 2021

This only affects bats at the moment.

You can't see it in the patch, but the value of Entity#isIgnoreBlockTrigger() is checked after the events have been fired.

Basically, this is how stuff worked before and after Bukkit events were added to the method:

for each entity:
//Added by Bukkit: fire PlayerInteractEvent or EntityInteractEvent
//Added by Bukkit: if event not cancelled
if not isIgnoreBlockTrigger
return full power

Fixes #4962

@Trigary Trigary requested a review from a team as a code owner February 2, 2021 08:37
@MiniDigger MiniDigger merged commit be16879 into PaperMC:master Mar 4, 2021
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.

Entities that cannot interact with blocks trigger interact events

2 participants