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

Change speakers to use the SPacketCustomSound packet instead #578

Open
wants to merge 2 commits into
base: master
from

Conversation

@SquidDev
Copy link
Contributor

@SquidDev SquidDev commented Oct 10, 2018

The method to register new SoundEvents is private, which means that few (if any) mods actually register them. Consequently, one could not use the speaker to play any modded sound, as they weren't registered on the server side.

Using SPacketCustomSound does mean we can no longer determine if a sound exists or not, but I think a price I'm willing to pay in order to allow playing modded sounds.

The method to register new SoundEvents is private, which means that few
(if any) mods actually register them. Consequently, one could not use
the speaker to play any modded sound, as they weren't registered on the
server side.

Using SPacketCustomSound does mean we can no longer determine if a sound
exists or not, but I think a price I'm willing to pay in order to allow
playing modded sounds.
@Lupus590
Copy link
Contributor

@Lupus590 Lupus590 commented Oct 10, 2018

What happens if I try to play a sound that doesn't exist?

@SquidDev
Copy link
Contributor Author

@SquidDev SquidDev commented Oct 10, 2018

It just returns true and does nothing on the client.

This restores the previous behaviour.
ccserver pushed a commit to ccserver/ComputerCraft that referenced this pull request Sep 16, 2019
…speaker-sound

Change speakers to use the SPacketCustomSound packet instead
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.