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

Use custom packet to play records, instead of using block events #451

Open
wants to merge 4 commits into
base: master
from

Conversation

Projects
None yet
1 participant
@SquidDev
Contributor

SquidDev commented Sep 15, 2017

Breaking a disk drive was not stopping the record being played as the block event never reached the client. Instead, we send a custom packet which starts/stops music at a given location.

We also remove all the plumbing for eventReceived/sendBlockEvent from the generic block/tile classes, as they are no longer used.

Closes #443


Note there are a couple of other disk/disk-drive related bug fixes in this PR, as they are relatively minor changes and I didn't feel it was worth splitting them out. I'm happy to do so if desired though.

SquidDev added some commits Sep 12, 2017

Use custom packet to play records, instead of using block events
Breaking a disk drive was not stopping the record being played as the
block event never reached the client. Instead, we send a custom packet
which starts/stops music at a given location.

We also remove all the plumbing for eventReceived/sendBlockEvent from
the generic block/tile classes, as they are no longer used.

Closes #443
Only send the packet to people within 64 blocks
This is equivalent to what vanilla Minecraft does

SquidDev added some commits Mar 29, 2018

Fix .isDiskPresent() always reporting true
We were still determining if the stack was null, but post-1.11 this will
never be the case.
Always create extended disks
Whilst the legacy ones are important for backwards compatibility, they
cannot have an ID of 0, which introduces issues when they are the first
disk created in the world.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment