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 playing adventure sounds on World/Server #8077

Merged

Conversation

Machine-Maker
Copy link
Member

@Machine-Maker Machine-Maker commented Jun 30, 2022

playing adventure sounds on a World/Server had some unexpected side effects due to ForwardingAudience's delegation to each individual audience. This overrides all 3 playSound methods in CraftWorld/CraftServer with better implementations.


The issues arrises due to seeded sounds. When you play a sound on a World or Server without a seed, it should pick one seed. For location-specific sounds on World/Server, packets shouldn't be sent to all players, only players within range, so overriding also allows delegation to vanilla packet broadcast mechanics.

@Machine-Maker Machine-Maker force-pushed the fix/adventure-world-sounds branch from 7f8a811 to a42ad60 Compare June 30, 2022 03:03
@Machine-Maker Machine-Maker force-pushed the fix/adventure-world-sounds branch from a42ad60 to 98137cd Compare February 23, 2023 22:03
@Machine-Maker Machine-Maker requested a review from a team as a code owner February 23, 2023 22:03
@Machine-Maker Machine-Maker force-pushed the fix/adventure-world-sounds branch 2 times, most recently from 3e82bd5 to f34f1e3 Compare February 23, 2023 22:46
@Machine-Maker Machine-Maker changed the title Fix playing adventure sounds on World Fix playing adventure sounds on World/Server Feb 23, 2023
@Machine-Maker
Copy link
Member Author

Rebased for 1.19.3

@Machine-Maker Machine-Maker force-pushed the fix/adventure-world-sounds branch from f34f1e3 to 78da3dc Compare February 23, 2023 22:51
Copy link
Member

@jpenilla jpenilla left a comment

Choose a reason for hiding this comment

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

Approved

@Machine-Maker Machine-Maker force-pushed the fix/adventure-world-sounds branch from 78da3dc to f7aa173 Compare May 31, 2023 01:23
@Machine-Maker Machine-Maker merged commit fa8fa1c into PaperMC:master May 31, 2023
@Machine-Maker Machine-Maker deleted the fix/adventure-world-sounds branch May 31, 2023 01:36
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.

3 participants