The problem
ping reports side, mcVersion, hasClient, and now protocol. None of those distinguish two
Minecraft 26.1.2 clients running on one machine.
This is the motivating bug behind the port discipline in the docs: two projects both used 25580, and
a pack's verifier connected to a different game's dev client and reported a clean pass about the
wrong world. Nothing in the reply would have revealed that.
The proposal
Add identity to the ping reply:
{"ok": true, "protocol": 1, "side": "integrated", "gameDir": "C:/.../Instances/Trashlands",
"worldName": "New World", "modCount": 87}
gameDir alone probably settles it. A mod-list hash would let a tool assert it is talking to a game
with the expected mods, which is a stronger check for a pack verifier.
Then gamebridge grows something like --expect-instance <path>, refusing to run against anything
else, so the assertion is one flag rather than something every script reimplements.
Why the mod and not a command
A command can report a world name, but not the process's game directory, and not before you have
decided to trust the connection. This has to come from the handshake to be worth anything.
Notes
- Cheap. The information is all sitting on
Minecraft and MinecraftServer already.
- Closes a class of silent false positive rather than adding a capability, which is why it ranks
above larger items.
The problem
pingreportsside,mcVersion,hasClient, and nowprotocol. None of those distinguish twoMinecraft 26.1.2 clients running on one machine.
This is the motivating bug behind the port discipline in the docs: two projects both used 25580, and
a pack's verifier connected to a different game's dev client and reported a clean pass about the
wrong world. Nothing in the reply would have revealed that.
The proposal
Add identity to the
pingreply:{"ok": true, "protocol": 1, "side": "integrated", "gameDir": "C:/.../Instances/Trashlands", "worldName": "New World", "modCount": 87}gameDiralone probably settles it. A mod-list hash would let a tool assert it is talking to a gamewith the expected mods, which is a stronger check for a pack verifier.
Then
gamebridgegrows something like--expect-instance <path>, refusing to run against anythingelse, so the assertion is one flag rather than something every script reimplements.
Why the mod and not a command
A command can report a world name, but not the process's game directory, and not before you have
decided to trust the connection. This has to come from the handshake to be worth anything.
Notes
MinecraftandMinecraftServeralready.above larger items.