-
Notifications
You must be signed in to change notification settings - Fork 24
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
Mumblelink fabric and mumblelink forge #38
Comments
It seems like a By default, the context is set to |
You can change it or we need to wait forge mumblelink's dev to make changes in both mods ? |
I don't currently see a way to use MumbleLink/mod/src/main/java/zsawyer/mods/mumblelink/mumble/UpdateData.java Lines 198 to 209 in 1e590a6
"Minecraft" and compile a custom version.
The best solution would be to establish a standard for a "Minecraft" context. I'm interested in @zsawyer's opinion on what that should be. |
I'm just asking I have plenty of time |
I agree. It should be as simple as you said. I used this json format in anticipation that there might be more flexibility needed. Which wasn't really the case. I am thinking that this could be achieved by a plugin mod (using the API of this Forge MumbleLink). However that is probably overkill and it would be best to agree on a base value for context. |
I am thinking either go with “Minecraft“ or use json {"game":"Minecraft"}. Mumble docs say it should even contain server details. A management bot might want to use this information for distributing users into correct channels. But then this group would probably also need their own ContextManipulator plugin where they could code the data protocol then selves. Sadly this would break backwards compatibility with older versions of this forge mod. So I might end up implementing it only starting with a certain minecraft version. |
I propose deciding on JSON fields to include and releasing new versions of the mods simultaneously. I don't think breaking backwards compatibility is a big problem because most people using mods like this have a shared modpack that they play with other people (citation needed). I also don't support versions older than the latest on each major Minecraft version, so users are encouraged update relatively quickly. |
I don't think it is like that. Looking at the download numbers and questions over the past week I think a lot of people are actually downloading forge-MumbleLink on curseforge directly (almost 9,000 downloads in 2 weeks; https://www.curseforge.com/minecraft/mc-mods/mumblelink/files). I usually try to support all Minecraft versions while using the latest stable Forge version if possible (simply because it is more likely to have less things for us to change in the mod - talking about mappings). However I don't want a hypothetical MumbleLink-1.16.5-5.0.0 as it would break compatibility with all those that installed MumbleLink-1.16.5-4.6.3. The issue would be completely intransparent and cause unnecessary confusion and frustration for the users. That being said - We can't always prevent breaking inter-version-compatibility. So I made up my mind:
Edit: added 3. |
Okay, I'll let you handle your mod's versioning however you want. I'm planning on updating to the standard we settle on ASAP and bumping the minor version number since it's still in the Context formatAs far as the exact format to use, let's look at the recommendations from the Mumble wiki here: What the Context does:
The Context should be the same for players on the:
The wiki also states:
(I'm not sure how true this is since the strings are just compared for equality and any change is equally different.) Implementation ideasGame, map, and team information is easily available to our mods. The game is constant, the map could be the namespaced ID of the current world, and the team could be the team string. Things get a little tricky trying to figure out something to represent the server though... We can't use IP or URL since multiple IPs or URLs could correspond to a single host. We can't use the server name since that's client-side. We probably can't use the server MOTD because some servers modify that based on the server state or player connecting. The only option I see for the server would be to generate a token of some kind in-memory server-side and send it to each client. With all that analysis out of the way, here's what I propose: Option 1:
This is the simplest option. It doesn't support adding fields for parsing like JSON, but then again, adding a JSON field is just as big a change as moving from this option to JSON in the first place. Option 2:
This includes an ID for the server. I don't really expect anyone to be in the same Mumble server but different Minecraft servers. Even if they were, still hearing the other people but without positional audio would probably be even more unexpected. Overall thoughtsI'm less in favor of using JSON because the field ordering (if there are multiple fields) and the whitespace used matters to Mumble (since the strings content is just directly compared). That notion of equality isn't intuitive for a JSON document, and could cause subtle breakages if different JSON serializers use different orderings/whitespace. Including the map isn't possible if you want to also make #35 (and the similar feature that's already in my mod) work properly. If two people were on different maps, the position data would be stripped, preventing any offset from muting other people. Including the team might be confusing for maps or servers that use the "team" of a player to control certain features not related to competition, or if the teams should be able to hear each other. |
You have some very good points there. on Context format:
I agree. My experience tells me to go with the lowest common denominator. I did include all that information in the beginning - it was terrible. That's why we have that "AllTalk" (which is actually a somewhat known phrase among gamers using mumble with pa). Here is a discussion I had with the mumble devs regarding that topic, way back then: The main point there was this:
And here the feature request to stop this dreaded unlinking: on Overall thoughtsGood points. JSON is not the way to go for the If we would need data like that for server side handling we should really put it all that into on Implementation ideasOption 1 (accepted)
Option 2I rule it out because of above reasons from the past.
Conclusion on Fabric and Forge mod collaboration@magneticflux- @Robijnvogel Do you agree? Context ConventionSince fabric-mumblelink-mod already uses the "correct" context. Only this Forge Mod needs updating. We agree to use Dimension OffsetI would appreciate your feedback in #35 and think we should agree on the same offset implementation. Else Forge and Fabric mods only are working together properly in the "overworld" dimension. |
This renders #4 obsolete. There will by no dynamic in the context to ensure maximum compatibility with the fabric mod. |
Regarding your thoughts on how to get the server details to match up. I simply ignored that and instead used this implementation to get that data into ìdentity`: MumbleLink/mod/src/main/java/zsawyer/mods/mumblelink/addons/pa/es/ExtendedPASupport.java Lines 166 to 181 in 7326a2d
Basically I assume that if the worlds are exactly the same then they must be on the same server. |
#38 (comment) That sounds good to me! In terms of the #38 (comment) As far as switching channel per dimension, my mod already responds to certain packets from the server and opens a #38 (comment) That's a really clever way to solve that issue! I hadn't thought of using the server spawn as a pseudo-unique identifier for a given server. |
I'd still like to wait for @Robijnvogel 's feedback. Then we can proceed with the context change. Regarding dimension switching: let's continue that in #35 |
I started editing the code. Then I stumbled upon the reason I was using JSON... it was not because it should be interpreted by the server. Instead it was meant to provide inter-mod compatibility in case multiple addon-mod's wanted to append to the I am pondering if I should get rid of the Or I could leave this problem to said future generations to solve - it is FOSS after all. |
We might have to unify the plugin name as well! During testing I have just seen that mumblePAhelper prepends the fabric modhttps://github.com/magneticflux-/fabric-mumblelink-mod/blob/b6ffa961f070ae17241ecb9f5d2a1a7fb91c9cdd/src/main/kotlin/com/skaggsm/mumblelinkmod/ClientMumbleLinkMod.kt#L85 forge modMumbleLink/mod/src/main/java/zsawyer/mods/mumblelink/mumble/MumbleInitializer.java Lines 43 to 45 in 7326a2d
This also explains why I initially didn't bother putting the game name into the Any idea if the plugin name is actually being checked / prepended to the |
It looks like the name + context in MumblePAHelper is right here: https://github.com/mumble-voip/mumble-pahelper/blame/2ed12916c5662ec04879960e91514f6d7afe9492/Plugins.cpp#L214 and was introduced with the first commit 11 years ago.
It creates a The server receives it here https://github.com/mumble-voip/mumble/blob/c8e8a84f11359affd6ba34dc670527931b45c204/src/murmur/Messages.cpp#L842-L847 and sets the field of a Finally, Murmur reads the field here https://github.com/mumble-voip/mumble/blob/0b352ebee5b3b2d703296aa8fb9a2effc39a913e/src/murmur/Server.cpp#L1079-L1085 and conditionally sends a message (a packet of audio) to users. I think we have to make the names match. |
Suggestions? I actually prefer only "Minecraft" as the Also I am questioning if we would need a |
I haven't tested it, but maybe the servers public key can be used from https://github.com/FabricMC/yarn/blob/69c470b145d3c0ef4c1d6a2b327760d5586d7fcf/mappings/net/minecraft/network/NetworkEncryptionUtils.mapping#L14 |
Would there be situations where server do not use encryption? Like LAN or unofficial servers? |
@magneticflux- can we agree that the plugin Looking at the other plugins' |
I did some testing with offline servers and open-to-LAN, and the server public key turns out to be used in both cases. Even the Minecraft instance that acts as server in open-to-LAN performs the encryption handshake when the first other player joins. Each time you start a server or open-to-LAN, a random public key is generated. See this screenshot of my simple mod that hashes the public key bytes and logs it to the console: So, such public key hash could to be used as identifiable information for the Minecraft server in all vanilla cases of multi-player. Though I'm not sure about cracked servers. |
Conceptually, that would work for traditional servers. Imagine, however, a proxied server using something like BungeeCord or Waterfall. Each proxy generates unique keys at startup: https://github.com/SpigotMC/BungeeCord/blob/a7c6edeb638f0a2ba4fb051f2b0be5a6e226c955/proxy/src/main/java/net/md_5/bungee/EncryptionUtil.java#L36-L47 Are those the keys that the client sees? The shared secret from the server used here https://github.com/SpigotMC/BungeeCord/blob/a7c6edeb638f0a2ba4fb051f2b0be5a6e226c955/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java#L419-L423 to decode and encode packets on the proxy-to-server Netty channel, so it seems like the Minecraft server only "sees" the Bungeecord keys? |
You are right magneticflux. If each BungeeCord proxy has its own key pair and several proxies point to the same server, the public key is no longer a good identifier for the server. I guess large servers do use such architecture. |
Most players won't join two Minecraft servers at once at the same time. But it is common to switch between survival and creative worlds to replicate a design. If MumbleLink uses a context without an identifier for the server, the coordinates of different servers would be used for positional audio. That's confusing. |
I had another thought. Would it be a good idea to base the Mumble context on the dimension ID? That wouldn't identity the server, but at least make sure that overworld and nether coordinates are not mixed up. |
@TjeuKayim I think including the dimension ID in the context was ruled out in the second to last paragraph of my analysis here: #38 (comment). The core issue is that mismatched contexts don't strip audio data, they just strip position data. Does that make sense? |
Ah, I see. Sorry for not reading that part of your analysis correctly. When contex data doesn't match, you hear the other person full volume. That would make sense if he/she is in another (unrelated) MC world, but not for another dimension of the same world. |
https://www.planetminecraft.com/mod/164-better-pvp-v10/
It may be a good idea to ask, even though the dev hasn't open sourced their mod. That said, I think whatever method they use it not considered 100 % reliable, as it still provides the option manually override the automatic identification. |
@thexaero can you comment on this ? |
@TjeuKayim I only skimmed through the conversation (at 1 AM) and I haven't used Mumblelink, so I hope I understand the issue correctly. Is it that you want to get a server identifier on the client side without using dimension IDs or a server mod? The dimension IDs can't be used because you want players on different dimensions from the same world to have the same context and only different servers to have different context. Correct? |
You probably want to tag @zsawyer and @magneticflux- since they're the maintainers of the respective projects. I wonder if a combination of dimension_ID and the public key is unique enough for most situations? |
Identity seems to be best practice. |
@thexaero thank you for your valuable input.
Dimension ID would be ok. But I had not considered it to be reliable or unique enough.
We are not exactly sure what the best approach is regarding
Supplementing these unique dimension ids (since 1.16) to the world spawn sounds like the right thing to do.
Same ;) |
@zsawyer No problem!
I was talking about using the dimension ID for
The issues come from the fact that the server can update the world spawn coordinates at any time. For example, a lot of servers use the compass to point players to their latest death location, other players or, most commonly, to their personal spawn (bed). They achieve it by sending fake world spawn coordinates to the client. Mojang finally gave us custom compasses, but some servers will still use the old method (e.g. multi-version servers). |
I'm preparing a release of my mod for 1.17 in the next few days, so I'd like to wrap this up so there aren't any version discrepancies in 1.17 and later (since some users may only install the first version for 1.17 and never update). My current plan is to use |
Hello,
I'm playing with friends on a minecraft server with mumblelink (1.16.5).
But I have a problem. "Positional audio" only work between two versions of mumblelink fabric or two versions of mumblelink forge but not between fabric and forge.
I talked with fabric mumblelink's dev and it seems like some values are different between the two versions of the mod. That means you will have to work together with the fabric version's dev to achieve compatibility, do you agree with that ?
Repo : https://github.com/magneticflux-/fabric-mumblelink-mod
The text was updated successfully, but these errors were encountered: