Closed SwadicalRag closed 7 years ago
Addendum:
It seems that the radio also stops playing when the player dies and respawns, or returns to the overworld (where the radio is) from another dimension
Addendum part 2:
The radio also does not resume if a player goes out of range of the radio (until the chunk where the radio is unloads clientside) and returns
Which OFM/MC Version?
1.9.4-0.1.0.17 OFM running on 1.10.2 Minecraft
I'm not 100% familiar with minecraft/forge's API, but I had a look through the codebase for you
It seems that you send 'update' packets every tick from the server to the clients from TileEntityRadio::update right, and those packets are type 13, so this bit of logic here should make the client play a stream if it is stopped.
So the code seems like it should work, but isn't, unless I'm missing something...
I know this works properly in 1.7 as that's the version I run, I'll try to poke at this asap. It's likely some small issue in the network rewrite for 1.8+
(Note the files you linked are on the Master branch, which is 1.7 there is a 1.8.9, and 1.9.4 branch for those versions)
OH alright, I didn't notice, I assumed the master branch have the most up to date version of OFM.
Please try build 18 on curseforge
Okay, I don't have access to the server right now, but I should be able to test clientside
Seems to work in singleplayer, I will let you know if it works in multiplayer asap. The guy managing the server (@lixquid) is busy during weekdays, so I'll try and pester him to update OpenFM soon.
Okay, this issue has mainly been resolved as of the latest update, but I do notice that when I approach a speaker connected to a radio that's reasonably far away from the radio, the music plays, but cuts out when I get closer to the speaker. Is that a separate issue?
I can't reproduce that with the current version, my speaker is about 25-30 blocks away from the radio and the volume slowly lowers from the radio until the speaker picks it back up.
Try 200-300 blocks away (sorry for not specifying!), we had two mountain bases set up, connected to the same radio, and they're pretty far apart.
Is the chunk with the radio still loaded?
I mean we could use opencomputers to control and synchronise two radios at once, but it seemed like a bug, so I wanted to report it as well.
Uh, no, it isn't, is that the problem?
Yes, the radio controls the stream, if it unloads, the stream will stop.
Ah wait no, I misread, the chunk with the radio is loaded serverside, but the chunk with the speakers aren't
I don't think that's fixable without increasing the range for the packet broadcast which would be bad on server performance. I'm going to go ahead and close this as the original issue is resolved, but I'll keep thinking about better ways to solve the range issue.
Alright
I apologise if this is intentional, nevertheless, it would be great if radios would resume a stream automatically after disconnecting and reconnecting to a server.
I'm using OpenFM as an announcement system for my base using text-to-speech and a custom stream server, and having to detect whether players are connecting/disconnecting and toggling stop/play is a bit unintuitive.