Breaking a disk drive does not stop music
SquidDev opened this issue ยท 2 comments
Steps to reproduce
- Place a disk drive next to a computer and place a disk inside.
- Run
dj
. - Break the disk drive. This calls
TileDiskDrive.destroy
, which fires a block event to stop the music. However, as the block has already been removed, this has no effect and so is not relayed to the client, and so the music continues.
Solution
Like #301, I suspect the only solution is to create a new packet in order to play a record at a given position.
This might be a good opportunity to clean up some of the networking code. It'd be really nice to start using Forge's IMessage
instead. This'd allow us to move some packets into separate classes, such as RequestTileEntityUpdate
. This can probably wait though :).
@Restioson That commit still has it's own problems, due to a couple of bugs in Minecraft's sound code - it isn't quite ready for use yet.
For #301, we'll have to do a little bit more as we'll want to keep track of multiple sounds, and also change their position for turtles/pocket computers. I haven't yet worked out a way to do this whilst keeping network noise to a minimum.