@lzimul/minecraft-mcp 1.0.2 → 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.
- package/README.md +219 -168
- package/SECURITY.md +38 -21
- package/build/config/server-info.js +3 -2
- package/build/config/world-limits.js +4 -1
- package/build/data/entities.js +1581 -0
- package/build/enums/entity-kind.enum.js +5 -0
- package/build/enums/inventory-section.enum.js +5 -0
- package/build/index.js +4 -3
- package/build/interfaces/entity-inventory.interface.js +1 -0
- package/build/interfaces/entity-type.interface.js +1 -0
- package/build/interfaces/entity.interface.js +1 -0
- package/build/resources/dimension-resources.js +23 -6
- package/build/resources/entity-resources.js +17 -0
- package/build/resources/index.js +2 -0
- package/build/schemas/coordinate-schema.js +5 -0
- package/build/schemas/dimension-schema.js +1 -0
- package/build/schemas/entity-schema.js +95 -0
- package/build/tools/block-tools.js +14 -23
- package/build/tools/entity-tools.js +325 -0
- package/build/tools/index.js +4 -0
- package/build/tools/result.js +3 -5
- package/build/tools/world-tools.js +139 -0
- package/build/utils/logger.js +53 -0
- package/build/world/block-spec.js +6 -6
- package/build/world/block-states.js +23 -4
- package/build/world/entity-inventory.js +84 -0
- package/build/world/item-spec.js +25 -0
- package/build/world/simulated-dimension.js +187 -13
- package/build/world/stores/file-world-store.js +67 -20
- package/build/world/stores/memory-world-store.js +13 -5
- package/build/world/stores/serialized-block.js +9 -14
- package/build/world/stores/serialized-entity.js +74 -0
- package/build/world/world.js +33 -1
- package/lib/config/server-info.d.ts.map +1 -1
- package/lib/config/world-limits.d.ts +3 -0
- package/lib/config/world-limits.d.ts.map +1 -1
- package/lib/data/entities.d.ts +5 -0
- package/lib/data/entities.d.ts.map +1 -0
- package/lib/enums/entity-kind.enum.d.ts +5 -0
- package/lib/enums/entity-kind.enum.d.ts.map +1 -0
- package/lib/enums/inventory-section.enum.d.ts +5 -0
- package/lib/enums/inventory-section.enum.d.ts.map +1 -0
- package/lib/interfaces/entity-inventory.interface.d.ts +9 -0
- package/lib/interfaces/entity-inventory.interface.d.ts.map +1 -0
- package/lib/interfaces/entity-type.interface.d.ts +8 -0
- package/lib/interfaces/entity-type.interface.d.ts.map +1 -0
- package/lib/interfaces/entity.interface.d.ts +17 -0
- package/lib/interfaces/entity.interface.d.ts.map +1 -0
- package/lib/interfaces/world-store.interface.d.ts +7 -2
- package/lib/interfaces/world-store.interface.d.ts.map +1 -1
- package/lib/resources/dimension-resources.d.ts.map +1 -1
- package/lib/resources/entity-resources.d.ts +3 -0
- package/lib/resources/entity-resources.d.ts.map +1 -0
- package/lib/resources/index.d.ts.map +1 -1
- package/lib/schemas/coordinate-schema.d.ts +5 -0
- package/lib/schemas/coordinate-schema.d.ts.map +1 -1
- package/lib/schemas/dimension-schema.d.ts +1 -0
- package/lib/schemas/dimension-schema.d.ts.map +1 -1
- package/lib/schemas/entity-schema.d.ts +134 -0
- package/lib/schemas/entity-schema.d.ts.map +1 -0
- package/lib/tools/block-tools.d.ts.map +1 -1
- package/lib/tools/entity-tools.d.ts +4 -0
- package/lib/tools/entity-tools.d.ts.map +1 -0
- package/lib/tools/index.d.ts.map +1 -1
- package/lib/tools/result.d.ts +2 -6
- package/lib/tools/result.d.ts.map +1 -1
- package/lib/tools/world-tools.d.ts +4 -0
- package/lib/tools/world-tools.d.ts.map +1 -0
- package/lib/utils/logger.d.ts +3 -0
- package/lib/utils/logger.d.ts.map +1 -0
- package/lib/world/block-states.d.ts +2 -0
- package/lib/world/block-states.d.ts.map +1 -1
- package/lib/world/entity-inventory.d.ts +16 -0
- package/lib/world/entity-inventory.d.ts.map +1 -0
- package/lib/world/item-spec.d.ts +10 -0
- package/lib/world/item-spec.d.ts.map +1 -0
- package/lib/world/simulated-dimension.d.ts +29 -0
- package/lib/world/simulated-dimension.d.ts.map +1 -1
- package/lib/world/stores/file-world-store.d.ts +3 -3
- package/lib/world/stores/file-world-store.d.ts.map +1 -1
- package/lib/world/stores/memory-world-store.d.ts +3 -4
- package/lib/world/stores/memory-world-store.d.ts.map +1 -1
- package/lib/world/stores/serialized-block.d.ts.map +1 -1
- package/lib/world/stores/serialized-entity.d.ts +24 -0
- package/lib/world/stores/serialized-entity.d.ts.map +1 -0
- package/lib/world/world.d.ts +3 -0
- package/lib/world/world.d.ts.map +1 -1
- 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"}
|
package/lib/world/world.d.ts
CHANGED
|
@@ -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
|
package/lib/world/world.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"world.d.ts","sourceRoot":"","sources":["../../src/world/world.ts"],"names":[],"mappings":"
|
|
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.
|
|
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
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"test
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
"./
|
|
53
|
-
"./
|
|
54
|
-
"./
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
"
|
|
60
|
-
"
|
|
61
|
-
"
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
"
|
|
75
|
-
"
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
"@eslint/
|
|
79
|
-
"@
|
|
80
|
-
"@
|
|
81
|
-
"@
|
|
82
|
-
"eslint": "^
|
|
83
|
-
"
|
|
84
|
-
"eslint-plugin
|
|
85
|
-
"
|
|
86
|
-
"
|
|
87
|
-
"prettier": "^
|
|
88
|
-
"
|
|
89
|
-
"
|
|
90
|
-
"
|
|
91
|
-
"
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
"
|
|
95
|
-
"
|
|
96
|
-
},
|
|
97
|
-
"
|
|
98
|
-
"
|
|
99
|
-
"
|
|
100
|
-
},
|
|
101
|
-
"
|
|
102
|
-
"
|
|
103
|
-
"
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
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
|
+
}
|