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 beacon activate/deactivate events #5646

Merged
merged 1 commit into from
May 29, 2021

Conversation

Machine-Maker
Copy link
Member

Fixes #5644

The events were being called in the wrong place, so they weren't being fired some of time.

@Machine-Maker Machine-Maker requested review from a team as code owners May 16, 2021 00:54
@enderian
Copy link
Contributor

Thank for for fixing my bad code 😅

@Machine-Maker
Copy link
Member Author

Well, I want to go back and look at it again later, cause the trigger for the advancement is right there too, not quite sure why it is, or what is happening, I just know that what I changed it to also works.

tldr; I'm guessing the advancement trigger is affected by the same thing, as is playing the sound, so ya, not 100% sure of the logic but this works.

Copy link
Member

@electronicboy electronicboy left a comment

Choose a reason for hiding this comment

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

I'm approving this for the sake of it being there, but, this does not make all that much sense, you're checking the exact same thing as the flags are checking but earlier, but, there is no logic between those areas where it would change, so, wut

@Machine-Maker
Copy link
Member Author

Actually, there is a logic difference between those areas, there are several if blocks having to do with the lastCheckedY field that prevented the events from firing when they should’ve.

@electronicboy electronicboy merged commit 525d0e3 into PaperMC:master May 29, 2021
@Machine-Maker Machine-Maker deleted the fix/beacon-events branch May 29, 2021 19:34
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.

BeaconActivatedEvent not firing in some cases
4 participants