@lzimul/minecraft-mcp 1.0.3 → 1.0.4

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.
Files changed (88) hide show
  1. package/README.md +219 -179
  2. package/SECURITY.md +38 -21
  3. package/build/config/server-info.js +3 -2
  4. package/build/config/world-limits.js +4 -1
  5. package/build/data/entities.js +1581 -0
  6. package/build/enums/entity-kind.enum.js +5 -0
  7. package/build/enums/inventory-section.enum.js +5 -0
  8. package/build/index.js +5 -6
  9. package/build/interfaces/entity-inventory.interface.js +1 -0
  10. package/build/interfaces/entity-type.interface.js +1 -0
  11. package/build/interfaces/entity.interface.js +1 -0
  12. package/build/resources/dimension-resources.js +23 -6
  13. package/build/resources/entity-resources.js +17 -0
  14. package/build/resources/index.js +2 -0
  15. package/build/schemas/coordinate-schema.js +5 -0
  16. package/build/schemas/dimension-schema.js +1 -0
  17. package/build/schemas/entity-schema.js +95 -0
  18. package/build/tools/block-tools.js +14 -23
  19. package/build/tools/entity-tools.js +325 -0
  20. package/build/tools/index.js +4 -0
  21. package/build/tools/result.js +3 -5
  22. package/build/tools/world-tools.js +139 -0
  23. package/build/utils/logger.js +53 -0
  24. package/build/world/block-spec.js +6 -6
  25. package/build/world/block-states.js +23 -4
  26. package/build/world/entity-inventory.js +84 -0
  27. package/build/world/item-spec.js +25 -0
  28. package/build/world/simulated-dimension.js +187 -13
  29. package/build/world/stores/file-world-store.js +67 -20
  30. package/build/world/stores/memory-world-store.js +13 -5
  31. package/build/world/stores/serialized-block.js +9 -14
  32. package/build/world/stores/serialized-entity.js +74 -0
  33. package/build/world/world.js +33 -1
  34. package/lib/config/server-info.d.ts.map +1 -1
  35. package/lib/config/world-limits.d.ts +3 -0
  36. package/lib/config/world-limits.d.ts.map +1 -1
  37. package/lib/data/entities.d.ts +5 -0
  38. package/lib/data/entities.d.ts.map +1 -0
  39. package/lib/enums/entity-kind.enum.d.ts +5 -0
  40. package/lib/enums/entity-kind.enum.d.ts.map +1 -0
  41. package/lib/enums/inventory-section.enum.d.ts +5 -0
  42. package/lib/enums/inventory-section.enum.d.ts.map +1 -0
  43. package/lib/interfaces/entity-inventory.interface.d.ts +9 -0
  44. package/lib/interfaces/entity-inventory.interface.d.ts.map +1 -0
  45. package/lib/interfaces/entity-type.interface.d.ts +8 -0
  46. package/lib/interfaces/entity-type.interface.d.ts.map +1 -0
  47. package/lib/interfaces/entity.interface.d.ts +17 -0
  48. package/lib/interfaces/entity.interface.d.ts.map +1 -0
  49. package/lib/interfaces/world-store.interface.d.ts +7 -2
  50. package/lib/interfaces/world-store.interface.d.ts.map +1 -1
  51. package/lib/resources/dimension-resources.d.ts.map +1 -1
  52. package/lib/resources/entity-resources.d.ts +3 -0
  53. package/lib/resources/entity-resources.d.ts.map +1 -0
  54. package/lib/resources/index.d.ts.map +1 -1
  55. package/lib/schemas/coordinate-schema.d.ts +5 -0
  56. package/lib/schemas/coordinate-schema.d.ts.map +1 -1
  57. package/lib/schemas/dimension-schema.d.ts +1 -0
  58. package/lib/schemas/dimension-schema.d.ts.map +1 -1
  59. package/lib/schemas/entity-schema.d.ts +134 -0
  60. package/lib/schemas/entity-schema.d.ts.map +1 -0
  61. package/lib/tools/block-tools.d.ts.map +1 -1
  62. package/lib/tools/entity-tools.d.ts +4 -0
  63. package/lib/tools/entity-tools.d.ts.map +1 -0
  64. package/lib/tools/index.d.ts.map +1 -1
  65. package/lib/tools/result.d.ts +2 -6
  66. package/lib/tools/result.d.ts.map +1 -1
  67. package/lib/tools/world-tools.d.ts +4 -0
  68. package/lib/tools/world-tools.d.ts.map +1 -0
  69. package/lib/utils/logger.d.ts +3 -0
  70. package/lib/utils/logger.d.ts.map +1 -0
  71. package/lib/world/block-states.d.ts +2 -0
  72. package/lib/world/block-states.d.ts.map +1 -1
  73. package/lib/world/entity-inventory.d.ts +16 -0
  74. package/lib/world/entity-inventory.d.ts.map +1 -0
  75. package/lib/world/item-spec.d.ts +10 -0
  76. package/lib/world/item-spec.d.ts.map +1 -0
  77. package/lib/world/simulated-dimension.d.ts +29 -0
  78. package/lib/world/simulated-dimension.d.ts.map +1 -1
  79. package/lib/world/stores/file-world-store.d.ts +3 -3
  80. package/lib/world/stores/file-world-store.d.ts.map +1 -1
  81. package/lib/world/stores/memory-world-store.d.ts +3 -4
  82. package/lib/world/stores/memory-world-store.d.ts.map +1 -1
  83. package/lib/world/stores/serialized-block.d.ts.map +1 -1
  84. package/lib/world/stores/serialized-entity.d.ts +24 -0
  85. package/lib/world/stores/serialized-entity.d.ts.map +1 -0
  86. package/lib/world/world.d.ts +3 -0
  87. package/lib/world/world.d.ts.map +1 -1
  88. package/package.json +113 -109
@@ -0,0 +1,24 @@
1
+ import type { EDimensionType } from '../../enums/dimension-type.enum.js';
2
+ import type { IEntity } from '../../interfaces/entity.interface.js';
3
+ export interface ISerializedItemStack {
4
+ readonly item: string;
5
+ readonly count: number;
6
+ }
7
+ export interface ISerializedInventory {
8
+ readonly hotbar?: readonly (ISerializedItemStack | null)[];
9
+ readonly inventory?: readonly (ISerializedItemStack | null)[];
10
+ }
11
+ export interface ISerializedEntity {
12
+ readonly id: string;
13
+ readonly kind: string;
14
+ readonly type: string;
15
+ readonly name: string;
16
+ readonly x: number;
17
+ readonly y: number;
18
+ readonly z: number;
19
+ readonly createdAt: string;
20
+ readonly inventory?: ISerializedInventory;
21
+ }
22
+ export declare function toSerializedEntity(entity: IEntity): ISerializedEntity;
23
+ export declare function fromSerializedEntity(entry: unknown, dimension: EDimensionType): IEntity | null;
24
+ //# sourceMappingURL=serialized-entity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"serialized-entity.d.ts","sourceRoot":"","sources":["../../../src/world/stores/serialized-entity.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AAKzE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sCAAsC,CAAC;AAGpE,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB;AAGD,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,MAAM,CAAC,EAAE,SAAS,CAAC,oBAAoB,GAAG,IAAI,CAAC,EAAE,CAAC;IAC3D,QAAQ,CAAC,SAAS,CAAC,EAAE,SAAS,CAAC,oBAAoB,GAAG,IAAI,CAAC,EAAE,CAAC;CAC/D;AAGD,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAEtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,SAAS,CAAC,EAAE,oBAAoB,CAAC;CAC3C;AAoBD,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,OAAO,GAAG,iBAAiB,CAiBrE;AAWD,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,OAAO,EACd,SAAS,EAAE,cAAc,GACxB,OAAO,GAAG,IAAI,CA6ChB"}
@@ -1,6 +1,7 @@
1
1
  import { SimulatedDimension } from './simulated-dimension.js';
2
2
  import type { EDimensionType } from '../enums/dimension-type.enum.js';
3
3
  import type { IDimension } from '../interfaces/dimension.interface.js';
4
+ import type { IEntity } from '../interfaces/entity.interface.js';
4
5
  import type { IWorldStore } from '../interfaces/world-store.interface.js';
5
6
  export declare class World {
6
7
  private readonly dimensions;
@@ -8,6 +9,8 @@ export declare class World {
8
9
  static load(store: IWorldStore, writeDelayMs?: number): Promise<World>;
9
10
  static listDimensions(): readonly IDimension[];
10
11
  getDimension(type: EDimensionType): SimulatedDimension;
12
+ findEntity(id: string): IEntity | undefined;
13
+ findPlayer(name: string): IEntity | undefined;
11
14
  flush(): Promise<void>;
12
15
  }
13
16
  //# sourceMappingURL=world.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"world.d.ts","sourceRoot":"","sources":["../../src/world/world.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAE9D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sCAAsC,CAAC;AACvE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAC;AAS1E,qBAAa,KAAK;IAChB,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAkD;IAE7E,OAAO;WAMM,IAAI,CAAC,KAAK,EAAE,WAAW,EAAE,YAAY,SAAK,GAAG,OAAO,CAAC,KAAK,CAAC;IAsBxE,MAAM,CAAC,cAAc,IAAI,SAAS,UAAU,EAAE;IAI9C,YAAY,CAAC,IAAI,EAAE,cAAc,GAAG,kBAAkB;IAUhD,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;CAc7B"}
1
+ {"version":3,"file":"world.d.ts","sourceRoot":"","sources":["../../src/world/world.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAE9D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sCAAsC,CAAC;AACvE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mCAAmC,CAAC;AACjE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAC;AAS1E,qBAAa,KAAK;IAChB,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAkD;IAE7E,OAAO;WAMM,IAAI,CAAC,KAAK,EAAE,WAAW,EAAE,YAAY,SAAK,GAAG,OAAO,CAAC,KAAK,CAAC;IAsCxE,MAAM,CAAC,cAAc,IAAI,SAAS,UAAU,EAAE;IAI9C,YAAY,CAAC,IAAI,EAAE,cAAc,GAAG,kBAAkB;IAWtD,UAAU,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS;IAW3C,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS;IAcvC,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;CAc7B"}
package/package.json CHANGED
@@ -1,109 +1,113 @@
1
- {
2
- "name": "@lzimul/minecraft-mcp",
3
- "description": "Minecraft Model Context Protocol (MCP) Server",
4
- "version": "1.0.3",
5
- "author": {
6
- "name": "lZiMUl",
7
- "email": "lZiMUl@lzimul.com",
8
- "url": "https://www.lzimul.com"
9
- },
10
- "contributors": [
11
- {
12
- "name": "lZiMUl",
13
- "email": "lZiMUl@lzimul.com",
14
- "url": "https://www.lzimul.com"
15
- }
16
- ],
17
- "maintainers": [
18
- {
19
- "name": "lZiMUl",
20
- "email": "lZiMUl@lzimul.com",
21
- "url": "https://www.lzimul.com"
22
- }
23
- ],
24
- "homepage": "https://projects.lzimul.com/minecraft-mcp",
25
- "type": "module",
26
- "license": "MIT",
27
- "main": "./build/index.js",
28
- "types": "./lib/index.d.ts",
29
- "exports": {
30
- ".": {
31
- "types": "./lib/index.d.ts",
32
- "default": "./build/index.js"
33
- }
34
- },
35
- "bin": {
36
- "lzimul-minecraft-mcp": "./build/index.js"
37
- },
38
- "scripts": {
39
- "start": "node .",
40
- "lint": "npx eslint --fix",
41
- "build": "npm run lint && npx tsc -p ./tsconfig.json && npm run typedoc",
42
- "typedoc": "npx typedoc --options ./typedoc.json",
43
- "dev": "npm run build && npm run start",
44
- "generate-data": "node ./scripts/generate-data.mjs",
45
- "clean": "node ./scripts/clean.mjs",
46
- "test": "node ./scripts/smoke-test.mjs && node ./scripts/protocol-test.mjs && node ./scripts/persistence-test.mjs && node ./scripts/error-test.mjs && node ./scripts/stress-test.mjs",
47
- "test:stress": "node ./scripts/stress-test.mjs"
48
- },
49
- "files": [
50
- "./build/",
51
- "./lib/",
52
- "./LICENSE",
53
- "./README.md",
54
- "./SECURITY.md"
55
- ],
56
- "keywords": [
57
- "lzimul",
58
- "minecraft",
59
- "mcp",
60
- "model-context-protocol",
61
- "minecraft-mcp"
62
- ],
63
- "engines": {
64
- "node": ">=20"
65
- },
66
- "overrides": {
67
- "katex": "^0.19.1"
68
- },
69
- "dependencies": {
70
- "@modelcontextprotocol/server": "^2.4.0",
71
- "zod": "^4.6.7"
72
- },
73
- "devDependencies": {
74
- "@eslint/css": "^2.0.1",
75
- "@eslint/eslintrc": "^3.3.7",
76
- "@eslint/js": "^10.0.1",
77
- "@eslint/json": "^2.1.1",
78
- "@eslint/markdown": "^8.0.3",
79
- "@types/node": "^26.6.5",
80
- "@typescript-eslint/eslint-plugin": "^8.72.0",
81
- "@typescript-eslint/parser": "^8.72.0",
82
- "eslint": "^10.13.0",
83
- "eslint-config-prettier": "^10.1.8",
84
- "eslint-plugin-prettier": "^5.5.7",
85
- "globals": "^17.13.0",
86
- "jiti": "^2.7.0",
87
- "prettier": "^3.9.10",
88
- "tslib": "^2.8.1",
89
- "typedoc": "^0.28.20",
90
- "typescript": "^6.0.3",
91
- "typescript-eslint": "^8.72.0"
92
- },
93
- "repository": {
94
- "type": "git",
95
- "url": "git+https://github.com/lZiMUl/minecraft-mcp.git"
96
- },
97
- "bugs": {
98
- "url": "https://github.com/lZiMUl/minecraft-mcp/issues",
99
- "email": "lZiMUl@lzimul.com"
100
- },
101
- "publishConfig": {
102
- "registry": "https://registry.npmjs.org",
103
- "provenance": true,
104
- "access": "public",
105
- "tag": "latest"
106
- },
107
- "sideEffects": false,
108
- "private": false
109
- }
1
+ {
2
+ "name": "@lzimul/minecraft-mcp",
3
+ "description": "Minecraft Model Context Protocol (MCP) Server",
4
+ "version": "1.0.4",
5
+ "author": {
6
+ "name": "lZiMUl",
7
+ "email": "lZiMUl@lzimul.com",
8
+ "url": "https://www.lzimul.com"
9
+ },
10
+ "contributors": [
11
+ {
12
+ "name": "lZiMUl",
13
+ "email": "lZiMUl@lzimul.com",
14
+ "url": "https://www.lzimul.com"
15
+ }
16
+ ],
17
+ "maintainers": [
18
+ {
19
+ "name": "lZiMUl",
20
+ "email": "lZiMUl@lzimul.com",
21
+ "url": "https://www.lzimul.com"
22
+ }
23
+ ],
24
+ "homepage": "https://projects.lzimul.com/minecraft-mcp",
25
+ "type": "module",
26
+ "license": "MIT",
27
+ "main": "./build/index.js",
28
+ "types": "./lib/index.d.ts",
29
+ "exports": {
30
+ ".": {
31
+ "types": "./lib/index.d.ts",
32
+ "default": "./build/index.js"
33
+ }
34
+ },
35
+ "bin": {
36
+ "lzimul-minecraft-mcp": "./build/index.js"
37
+ },
38
+ "scripts": {
39
+ "start": "node .",
40
+ "lint": "npx eslint .",
41
+ "lint:fix": "npx eslint . --fix",
42
+ "build": "npm run lint && npx tsc -p ./tsconfig.json && npm run typedoc",
43
+ "typedoc": "npx typedoc --options ./typedoc.json",
44
+ "dev": "npm run build && npm run start",
45
+ "generate-data": "node ./scripts/generate-data.mjs",
46
+ "clean": "node ./scripts/clean.mjs",
47
+ "test": "node ./scripts/smoke-test.mjs && node ./scripts/persistence-test.mjs && node ./scripts/error-test.mjs && node ./scripts/stress-test.mjs",
48
+ "test:stress": "node ./scripts/stress-test.mjs",
49
+ "prepublishOnly": "npm run build && npm test"
50
+ },
51
+ "files": [
52
+ "./build/",
53
+ "./lib/",
54
+ "./LICENSE",
55
+ "./README.md",
56
+ "./SECURITY.md"
57
+ ],
58
+ "keywords": [
59
+ "lzimul",
60
+ "minecraft",
61
+ "mcp",
62
+ "model-context-protocol",
63
+ "minecraft-mcp"
64
+ ],
65
+ "engines": {
66
+ "node": ">=22"
67
+ },
68
+ "overrides": {
69
+ "katex": "^0.19.1"
70
+ },
71
+ "dependencies": {
72
+ "@modelcontextprotocol/server": "^2.4.0",
73
+ "chalk": "^6.0.1",
74
+ "log4js": "^6.9.1",
75
+ "zod": "^4.6.7"
76
+ },
77
+ "devDependencies": {
78
+ "@eslint/css": "^2.0.1",
79
+ "@eslint/eslintrc": "^3.3.7",
80
+ "@eslint/js": "^10.0.1",
81
+ "@eslint/json": "^2.1.1",
82
+ "@eslint/markdown": "^8.0.3",
83
+ "@types/node": "^26.6.5",
84
+ "@typescript-eslint/eslint-plugin": "^8.72.0",
85
+ "@typescript-eslint/parser": "^8.72.0",
86
+ "eslint": "^10.13.0",
87
+ "eslint-config-prettier": "^10.1.8",
88
+ "eslint-plugin-prettier": "^5.5.7",
89
+ "globals": "^17.13.0",
90
+ "jiti": "^2.7.0",
91
+ "prettier": "^3.9.10",
92
+ "tslib": "^2.8.1",
93
+ "typedoc": "^0.28.20",
94
+ "typescript": "^6.0.3",
95
+ "typescript-eslint": "^8.72.0"
96
+ },
97
+ "repository": {
98
+ "type": "git",
99
+ "url": "git+https://github.com/lZiMUl/minecraft-mcp.git"
100
+ },
101
+ "bugs": {
102
+ "url": "https://github.com/lZiMUl/minecraft-mcp/issues",
103
+ "email": "lZiMUl@lzimul.com"
104
+ },
105
+ "publishConfig": {
106
+ "registry": "https://registry.npmjs.org",
107
+ "provenance": true,
108
+ "access": "public",
109
+ "tag": "latest"
110
+ },
111
+ "sideEffects": false,
112
+ "private": false
113
+ }