vitaminmcp 2.0.0 → 2.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/checksums.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
- "version": "2.0.0",
2
+ "version": "2.1.1",
3
3
  "jars": {
4
- "mcp-server.jar": "557ad3ad919244e31fcbc8f7ecb05c8c7744c2922a0220e0fec9eb531af77759"
4
+ "mcp-server.jar": "fb87cad80a91518def06f89eaf82a277531b62caf9dc0d1f3f7a6ef17bda357a"
5
5
  },
6
6
  "assets": {
7
- "bot-runner-win-x64.exe": "230ea83146c9f3ade0999764e8b9dd5ca790f13fec055484237ba8e6b7d8b3bd"
7
+ "bot-runner-win-x64.exe": "15efc844b70a6cdbe190bec4420e31eacabf3d5e77596d81a38f99e3169929d9"
8
8
  }
9
9
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vitaminmcp",
3
- "version": "2.0.0",
3
+ "version": "2.1.1",
4
4
  "mcpName": "io.github.Backas03/vitaminmcp",
5
5
  "description": "MCP server for testing Minecraft plugins: drives a real Paper server and real protocol bots from an AI agent.",
6
6
  "keywords": [
@@ -4,6 +4,20 @@ import mc from 'minecraft-protocol';
4
4
  /** Long enough for a server still finishing its first tick, short enough to fail. */
5
5
  export const PING_TIMEOUT_MILLIS = 10_000;
6
6
 
7
+ /**
8
+ * The version whose packet definitions a server-list ping is written with.
9
+ *
10
+ * A ping happens before anything knows what the server speaks, so minecraft-protocol otherwise
11
+ * falls back to the newest version it has ever heard of and loads that entire data set — blocks,
12
+ * items, the lot — to send a handshake and read a status string. Naming a version here skips that,
13
+ * and it is safe because handshake and status have not changed shape since 1.7: the server answers
14
+ * with its own protocol number whatever we send.
15
+ *
16
+ * It must be a version the SEA build bundles, so keep it on the supported line — see
17
+ * `scripts/slim-minecraft-data.mjs`, which is what makes the others absent.
18
+ */
19
+ export const PING_VERSION = '1.21';
20
+
7
21
  /**
8
22
  * The protocol number a server speaks, asked without speaking it.
9
23
  *
@@ -17,7 +31,7 @@ export function pingProtocol(host, port, timeoutMillis = PING_TIMEOUT_MILLIS) {
17
31
  () => reject(new Error(`${host}:${port} did not answer a server-list ping within ${timeoutMillis}ms`)),
18
32
  timeoutMillis,
19
33
  );
20
- mc.ping({ host, port, closeTimeout: timeoutMillis }, (error, result) => {
34
+ mc.ping({ host, port, closeTimeout: timeoutMillis, version: PING_VERSION }, (error, result) => {
21
35
  clearTimeout(timer);
22
36
  if (error) {
23
37
  reject(error);