@adhisang/minecraft-modding-mcp 4.0.0 → 4.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/CHANGELOG.md +61 -0
- package/README.md +40 -23
- package/dist/build-suggested-call.d.ts +29 -0
- package/dist/build-suggested-call.js +58 -0
- package/dist/cache-registry.d.ts +3 -1
- package/dist/cache-registry.js +50 -6
- package/dist/entry-tools/analyze-symbol-service.d.ts +16 -16
- package/dist/entry-tools/batch-class-members-service.d.ts +34 -0
- package/dist/entry-tools/batch-class-members-service.js +97 -0
- package/dist/entry-tools/batch-class-source-service.d.ts +37 -0
- package/dist/entry-tools/batch-class-source-service.js +100 -0
- package/dist/entry-tools/batch-mappings-service.d.ts +36 -0
- package/dist/entry-tools/batch-mappings-service.js +66 -0
- package/dist/entry-tools/batch-runner.d.ts +72 -0
- package/dist/entry-tools/batch-runner.js +90 -0
- package/dist/entry-tools/batch-symbol-exists-service.d.ts +46 -0
- package/dist/entry-tools/batch-symbol-exists-service.js +113 -0
- package/dist/entry-tools/compare-minecraft-service.d.ts +6 -6
- package/dist/entry-tools/inspect-minecraft/handlers/artifact.d.ts +5 -0
- package/dist/entry-tools/inspect-minecraft/handlers/artifact.js +83 -0
- package/dist/entry-tools/inspect-minecraft/handlers/class-members.d.ts +6 -0
- package/dist/entry-tools/inspect-minecraft/handlers/class-members.js +80 -0
- package/dist/entry-tools/inspect-minecraft/handlers/class-overview.d.ts +5 -0
- package/dist/entry-tools/inspect-minecraft/handlers/class-overview.js +248 -0
- package/dist/entry-tools/inspect-minecraft/handlers/class-source.d.ts +5 -0
- package/dist/entry-tools/inspect-minecraft/handlers/class-source.js +60 -0
- package/dist/entry-tools/inspect-minecraft/handlers/file.d.ts +5 -0
- package/dist/entry-tools/inspect-minecraft/handlers/file.js +54 -0
- package/dist/entry-tools/inspect-minecraft/handlers/list-files.d.ts +5 -0
- package/dist/entry-tools/inspect-minecraft/handlers/list-files.js +100 -0
- package/dist/entry-tools/inspect-minecraft/handlers/search.d.ts +5 -0
- package/dist/entry-tools/inspect-minecraft/handlers/search.js +155 -0
- package/dist/entry-tools/inspect-minecraft/handlers/versions.d.ts +6 -0
- package/dist/entry-tools/inspect-minecraft/handlers/versions.js +49 -0
- package/dist/entry-tools/inspect-minecraft/internal.d.ts +1042 -0
- package/dist/entry-tools/inspect-minecraft/internal.js +448 -0
- package/dist/entry-tools/inspect-minecraft-service.d.ts +193 -308
- package/dist/entry-tools/inspect-minecraft-service.js +20 -1244
- package/dist/entry-tools/manage-cache-service.d.ts +16 -16
- package/dist/entry-tools/validate-project/cases/access-transformer.d.ts +6 -0
- package/dist/entry-tools/validate-project/cases/access-transformer.js +106 -0
- package/dist/entry-tools/validate-project/cases/access-widener.d.ts +6 -0
- package/dist/entry-tools/validate-project/cases/access-widener.js +86 -0
- package/dist/entry-tools/validate-project/cases/mixin.d.ts +6 -0
- package/dist/entry-tools/validate-project/cases/mixin.js +90 -0
- package/dist/entry-tools/validate-project/cases/project-summary.d.ts +102 -0
- package/dist/entry-tools/validate-project/cases/project-summary.js +415 -0
- package/dist/entry-tools/validate-project/internal.d.ts +142 -0
- package/dist/entry-tools/validate-project/internal.js +303 -0
- package/dist/entry-tools/validate-project-service.d.ts +67 -47
- package/dist/entry-tools/validate-project-service.js +13 -563
- package/dist/entry-tools/verify-mixin-target-service.d.ts +133 -0
- package/dist/entry-tools/verify-mixin-target-service.js +323 -0
- package/dist/error-mapping.d.ts +40 -0
- package/dist/error-mapping.js +139 -0
- package/dist/errors.d.ts +6 -0
- package/dist/errors.js +6 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +147 -1354
- package/dist/mapping/internal-types.d.ts +54 -0
- package/dist/mapping/internal-types.js +14 -0
- package/dist/mapping/loaders/mojang.d.ts +2 -0
- package/dist/mapping/loaders/mojang.js +64 -0
- package/dist/mapping/loaders/tiny-loom.d.ts +2 -0
- package/dist/mapping/loaders/tiny-loom.js +73 -0
- package/dist/mapping/loaders/tiny-maven.d.ts +2 -0
- package/dist/mapping/loaders/tiny-maven.js +104 -0
- package/dist/mapping/loaders/types.d.ts +14 -0
- package/dist/mapping/loaders/types.js +2 -0
- package/dist/mapping/lookup.d.ts +52 -0
- package/dist/mapping/lookup.js +496 -0
- package/dist/mapping/parsers/normalize.d.ts +10 -0
- package/dist/mapping/parsers/normalize.js +52 -0
- package/dist/mapping/parsers/proguard.d.ts +20 -0
- package/dist/mapping/parsers/proguard.js +138 -0
- package/dist/mapping/parsers/symbol-records.d.ts +27 -0
- package/dist/mapping/parsers/symbol-records.js +216 -0
- package/dist/mapping/parsers/tiny.d.ts +9 -0
- package/dist/mapping/parsers/tiny.js +96 -0
- package/dist/mapping/types.d.ts +147 -0
- package/dist/mapping/types.js +2 -0
- package/dist/mapping-pipeline-service.js +3 -2
- package/dist/mapping-service.d.ts +8 -145
- package/dist/mapping-service.js +30 -1207
- package/dist/mixin/access-validators.d.ts +9 -0
- package/dist/mixin/access-validators.js +257 -0
- package/dist/mixin/annotation-validators.d.ts +5 -0
- package/dist/mixin/annotation-validators.js +162 -0
- package/dist/mixin/helpers.d.ts +28 -0
- package/dist/mixin/helpers.js +315 -0
- package/dist/mixin/parsed-validator.d.ts +8 -0
- package/dist/mixin/parsed-validator.js +337 -0
- package/dist/mixin/types.d.ts +208 -0
- package/dist/mixin/types.js +28 -0
- package/dist/mixin-validator.d.ts +9 -201
- package/dist/mixin-validator.js +8 -1020
- package/dist/source/access-validate.d.ts +4 -0
- package/dist/source/access-validate.js +254 -0
- package/dist/source/artifact-resolver.d.ts +111 -0
- package/dist/source/artifact-resolver.js +1271 -0
- package/dist/source/cache-metrics.d.ts +26 -0
- package/dist/source/cache-metrics.js +172 -0
- package/dist/source/class-source/members-builder.d.ts +34 -0
- package/dist/source/class-source/members-builder.js +46 -0
- package/dist/source/class-source/snippet-builder.d.ts +19 -0
- package/dist/source/class-source/snippet-builder.js +46 -0
- package/dist/source/class-source-helpers.d.ts +34 -0
- package/dist/source/class-source-helpers.js +140 -0
- package/dist/source/class-source.d.ts +42 -0
- package/dist/source/class-source.js +883 -0
- package/dist/source/descriptor-utils.d.ts +6 -0
- package/dist/source/descriptor-utils.js +37 -0
- package/dist/source/file-access.d.ts +4 -0
- package/dist/source/file-access.js +102 -0
- package/dist/source/indexer.d.ts +82 -0
- package/dist/source/indexer.js +522 -0
- package/dist/source/lifecycle/diff-utils.d.ts +9 -0
- package/dist/source/lifecycle/diff-utils.js +107 -0
- package/dist/source/lifecycle/diff.d.ts +2 -0
- package/dist/source/lifecycle/diff.js +265 -0
- package/dist/source/lifecycle/mapping-helpers.d.ts +22 -0
- package/dist/source/lifecycle/mapping-helpers.js +327 -0
- package/dist/source/lifecycle/runtime-check.d.ts +2 -0
- package/dist/source/lifecycle/runtime-check.js +142 -0
- package/dist/source/lifecycle/trace.d.ts +2 -0
- package/dist/source/lifecycle/trace.js +231 -0
- package/dist/source/lifecycle.d.ts +4 -0
- package/dist/source/lifecycle.js +5 -0
- package/dist/source/search.d.ts +51 -0
- package/dist/source/search.js +676 -0
- package/dist/source/shared-utils.d.ts +6 -0
- package/dist/source/shared-utils.js +55 -0
- package/dist/source/state.d.ts +26 -0
- package/dist/source/state.js +24 -0
- package/dist/source/symbol-resolver.d.ts +3 -0
- package/dist/source/symbol-resolver.js +212 -0
- package/dist/source/validate-mixin/pipeline/mapping-health.d.ts +3 -0
- package/dist/source/validate-mixin/pipeline/mapping-health.js +41 -0
- package/dist/source/validate-mixin/pipeline/parse.d.ts +2 -0
- package/dist/source/validate-mixin/pipeline/parse.js +10 -0
- package/dist/source/validate-mixin/pipeline/resolve.d.ts +3 -0
- package/dist/source/validate-mixin/pipeline/resolve.js +78 -0
- package/dist/source/validate-mixin/pipeline/target-lookup.d.ts +6 -0
- package/dist/source/validate-mixin/pipeline/target-lookup.js +260 -0
- package/dist/source/validate-mixin/pipeline-context.d.ts +72 -0
- package/dist/source/validate-mixin/pipeline-context.js +93 -0
- package/dist/source/validate-mixin.d.ts +22 -0
- package/dist/source/validate-mixin.js +799 -0
- package/dist/source/workspace-target.d.ts +18 -0
- package/dist/source/workspace-target.js +305 -0
- package/dist/source-resolver.d.ts +1 -0
- package/dist/source-resolver.js +1 -1
- package/dist/source-service.d.ts +164 -170
- package/dist/source-service.js +70 -6116
- package/dist/stage-emitter.d.ts +13 -0
- package/dist/stage-emitter.js +30 -0
- package/dist/stdio-supervisor.d.ts +61 -0
- package/dist/stdio-supervisor.js +326 -9
- package/dist/tool-contract-manifest.d.ts +1 -1
- package/dist/tool-contract-manifest.js +23 -6
- package/dist/tool-guidance.d.ts +82 -0
- package/dist/tool-guidance.js +734 -0
- package/dist/tool-schema-registry.d.ts +16 -0
- package/dist/tool-schema-registry.js +37 -0
- package/dist/tool-schemas.d.ts +3518 -0
- package/dist/tool-schemas.js +813 -0
- package/dist/types.d.ts +36 -0
- package/dist/version-service.js +7 -6
- package/dist/workspace-context-cache.d.ts +32 -0
- package/dist/workspace-context-cache.js +66 -0
- package/dist/workspace-mapping-service.d.ts +16 -0
- package/dist/workspace-mapping-service.js +173 -1
- package/docs/README-ja.md +416 -0
- package/docs/examples.md +483 -0
- package/docs/tool-reference.md +462 -0
- package/package.json +17 -4
package/docs/examples.md
ADDED
|
@@ -0,0 +1,483 @@
|
|
|
1
|
+
# Example Requests
|
|
2
|
+
|
|
3
|
+
Start with these top-level workflow tools when possible. They cover the common workflows and are the best default starting points for MCP clients and agents.
|
|
4
|
+
|
|
5
|
+
## Workflow Starting Points
|
|
6
|
+
|
|
7
|
+
### Inspect Minecraft source from a version
|
|
8
|
+
|
|
9
|
+
```json
|
|
10
|
+
{
|
|
11
|
+
"tool": "inspect-minecraft",
|
|
12
|
+
"arguments": {
|
|
13
|
+
"task": "class-source",
|
|
14
|
+
"subject": {
|
|
15
|
+
"kind": "class",
|
|
16
|
+
"className": "net.minecraft.server.Main",
|
|
17
|
+
"artifact": {
|
|
18
|
+
"type": "resolve-target",
|
|
19
|
+
"target": {
|
|
20
|
+
"kind": "version",
|
|
21
|
+
"value": "1.21.10"
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
### Map or check a symbol
|
|
30
|
+
|
|
31
|
+
```json
|
|
32
|
+
{
|
|
33
|
+
"tool": "analyze-symbol",
|
|
34
|
+
"arguments": {
|
|
35
|
+
"task": "map",
|
|
36
|
+
"subject": {
|
|
37
|
+
"kind": "method",
|
|
38
|
+
"owner": "net.minecraft.server.Main",
|
|
39
|
+
"name": "tickServer"
|
|
40
|
+
},
|
|
41
|
+
"version": "1.21.10",
|
|
42
|
+
"sourceMapping": "mojang",
|
|
43
|
+
"targetMapping": "intermediary",
|
|
44
|
+
"signatureMode": "name-only"
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### Summarize a mod JAR
|
|
50
|
+
|
|
51
|
+
```json
|
|
52
|
+
{
|
|
53
|
+
"tool": "analyze-mod",
|
|
54
|
+
"arguments": {
|
|
55
|
+
"task": "summary",
|
|
56
|
+
"subject": {
|
|
57
|
+
"kind": "jar",
|
|
58
|
+
"jarPath": "/path/to/mymod-1.0.0.jar"
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### Validate a workspace
|
|
65
|
+
|
|
66
|
+
```json
|
|
67
|
+
{
|
|
68
|
+
"tool": "validate-project",
|
|
69
|
+
"arguments": {
|
|
70
|
+
"task": "project-summary",
|
|
71
|
+
"subject": {
|
|
72
|
+
"kind": "workspace",
|
|
73
|
+
"projectPath": "/workspace/modid",
|
|
74
|
+
"discover": ["mixins", "access-wideners", "access-transformers"]
|
|
75
|
+
},
|
|
76
|
+
"preferProjectVersion": true,
|
|
77
|
+
"preferProjectMapping": true
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
## Source Exploration
|
|
83
|
+
|
|
84
|
+
### Resolve from a Minecraft version
|
|
85
|
+
|
|
86
|
+
```json
|
|
87
|
+
{
|
|
88
|
+
"tool": "resolve-artifact",
|
|
89
|
+
"arguments": {
|
|
90
|
+
"target": {
|
|
91
|
+
"kind": "version",
|
|
92
|
+
"value": "1.21.10"
|
|
93
|
+
},
|
|
94
|
+
"mapping": "obfuscated",
|
|
95
|
+
"allowDecompile": true,
|
|
96
|
+
"projectPath": "/path/to/mod/workspace"
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
### Get class source with a line window
|
|
102
|
+
|
|
103
|
+
```json
|
|
104
|
+
{
|
|
105
|
+
"tool": "get-class-source",
|
|
106
|
+
"arguments": {
|
|
107
|
+
"target": {
|
|
108
|
+
"type": "artifact",
|
|
109
|
+
"artifactId": "<artifact-id>"
|
|
110
|
+
},
|
|
111
|
+
"className": "net.minecraft.server.Main",
|
|
112
|
+
"startLine": 50,
|
|
113
|
+
"endLine": 180,
|
|
114
|
+
"maxLines": 80
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
### Search by method symbol
|
|
120
|
+
|
|
121
|
+
```json
|
|
122
|
+
{
|
|
123
|
+
"tool": "search-class-source",
|
|
124
|
+
"arguments": {
|
|
125
|
+
"artifactId": "<artifact-id>",
|
|
126
|
+
"query": "tickServer",
|
|
127
|
+
"intent": "symbol",
|
|
128
|
+
"match": "exact"
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
### Get class member list
|
|
134
|
+
|
|
135
|
+
```json
|
|
136
|
+
{
|
|
137
|
+
"tool": "get-class-members",
|
|
138
|
+
"arguments": {
|
|
139
|
+
"target": {
|
|
140
|
+
"type": "artifact",
|
|
141
|
+
"artifactId": "<artifact-id>"
|
|
142
|
+
},
|
|
143
|
+
"className": "net.minecraft.server.Main",
|
|
144
|
+
"mapping": "obfuscated",
|
|
145
|
+
"access": "all",
|
|
146
|
+
"includeInherited": true,
|
|
147
|
+
"maxMembers": 300
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
### List artifact files with a prefix filter
|
|
153
|
+
|
|
154
|
+
```json
|
|
155
|
+
{
|
|
156
|
+
"tool": "list-artifact-files",
|
|
157
|
+
"arguments": {
|
|
158
|
+
"artifactId": "<artifact-id>",
|
|
159
|
+
"prefix": "net/minecraft/world/level/",
|
|
160
|
+
"limit": 50
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
## Version Comparison and Symbol Tracking
|
|
166
|
+
|
|
167
|
+
### Trace `Class.method` lifecycle
|
|
168
|
+
|
|
169
|
+
```json
|
|
170
|
+
{
|
|
171
|
+
"tool": "trace-symbol-lifecycle",
|
|
172
|
+
"arguments": {
|
|
173
|
+
"symbol": "net.minecraft.server.Main.tickServer",
|
|
174
|
+
"descriptor": "()V",
|
|
175
|
+
"fromVersion": "1.20.1",
|
|
176
|
+
"toVersion": "1.21.10",
|
|
177
|
+
"includeTimeline": true
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
### Diff one class across two versions
|
|
183
|
+
|
|
184
|
+
```json
|
|
185
|
+
{
|
|
186
|
+
"tool": "diff-class-signatures",
|
|
187
|
+
"arguments": {
|
|
188
|
+
"className": "net.minecraft.server.Main",
|
|
189
|
+
"fromVersion": "1.20.1",
|
|
190
|
+
"toVersion": "1.21.10",
|
|
191
|
+
"mapping": "obfuscated",
|
|
192
|
+
"includeFullDiff": false
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
## Mapping and Symbols
|
|
198
|
+
|
|
199
|
+
### Lookup mapping candidates
|
|
200
|
+
|
|
201
|
+
```json
|
|
202
|
+
{
|
|
203
|
+
"tool": "find-mapping",
|
|
204
|
+
"arguments": {
|
|
205
|
+
"version": "1.21.10",
|
|
206
|
+
"kind": "class",
|
|
207
|
+
"name": "a.b.C",
|
|
208
|
+
"sourceMapping": "obfuscated",
|
|
209
|
+
"targetMapping": "mojang",
|
|
210
|
+
"sourcePriority": "loom-first",
|
|
211
|
+
"maxCandidates": 10,
|
|
212
|
+
"disambiguation": {
|
|
213
|
+
"ownerHint": "net.minecraft"
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
### Resolve exact method mapping
|
|
220
|
+
|
|
221
|
+
```json
|
|
222
|
+
{
|
|
223
|
+
"tool": "resolve-method-mapping-exact",
|
|
224
|
+
"arguments": {
|
|
225
|
+
"version": "1.21.10",
|
|
226
|
+
"name": "f",
|
|
227
|
+
"owner": "a.b.C",
|
|
228
|
+
"descriptor": "(Ljava/lang/String;)V",
|
|
229
|
+
"sourceMapping": "obfuscated",
|
|
230
|
+
"targetMapping": "mojang"
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
### Show class API mapping matrix
|
|
236
|
+
|
|
237
|
+
```json
|
|
238
|
+
{
|
|
239
|
+
"tool": "get-class-api-matrix",
|
|
240
|
+
"arguments": {
|
|
241
|
+
"version": "1.21.10",
|
|
242
|
+
"className": "a.b.C",
|
|
243
|
+
"classNameMapping": "obfuscated",
|
|
244
|
+
"includeKinds": "class,field,method",
|
|
245
|
+
"maxRows": 100
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
### Resolve workspace compile-visible symbol
|
|
251
|
+
|
|
252
|
+
```json
|
|
253
|
+
{
|
|
254
|
+
"tool": "resolve-workspace-symbol",
|
|
255
|
+
"arguments": {
|
|
256
|
+
"projectPath": "/path/to/mod/workspace",
|
|
257
|
+
"version": "1.21.10",
|
|
258
|
+
"kind": "method",
|
|
259
|
+
"name": "f",
|
|
260
|
+
"owner": "a.b.C",
|
|
261
|
+
"descriptor": "(Ljava/lang/String;)V",
|
|
262
|
+
"sourceMapping": "obfuscated"
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
### Check symbol existence
|
|
268
|
+
|
|
269
|
+
```json
|
|
270
|
+
{
|
|
271
|
+
"tool": "check-symbol-exists",
|
|
272
|
+
"arguments": {
|
|
273
|
+
"version": "1.21.10",
|
|
274
|
+
"kind": "method",
|
|
275
|
+
"name": "f",
|
|
276
|
+
"owner": "a.b.C",
|
|
277
|
+
"descriptor": "(I)V",
|
|
278
|
+
"sourceMapping": "obfuscated"
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
## NBT Utilities
|
|
284
|
+
|
|
285
|
+
### Decode Java NBT base64 to typed JSON
|
|
286
|
+
|
|
287
|
+
```json
|
|
288
|
+
{
|
|
289
|
+
"tool": "nbt-to-json",
|
|
290
|
+
"arguments": {
|
|
291
|
+
"nbtBase64": "<base64-nbt>",
|
|
292
|
+
"compression": "auto"
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
```
|
|
296
|
+
|
|
297
|
+
### Patch typed NBT JSON
|
|
298
|
+
|
|
299
|
+
```json
|
|
300
|
+
{
|
|
301
|
+
"tool": "nbt-apply-json-patch",
|
|
302
|
+
"arguments": {
|
|
303
|
+
"typedJson": {
|
|
304
|
+
"rootName": "Level",
|
|
305
|
+
"root": { "type": "compound", "value": {} }
|
|
306
|
+
},
|
|
307
|
+
"patch": [
|
|
308
|
+
{ "op": "add", "path": "/root/value/name", "value": { "type": "string", "value": "Alex" } }
|
|
309
|
+
]
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
```
|
|
313
|
+
|
|
314
|
+
### Encode typed JSON back to NBT base64
|
|
315
|
+
|
|
316
|
+
```json
|
|
317
|
+
{
|
|
318
|
+
"tool": "json-to-nbt",
|
|
319
|
+
"arguments": {
|
|
320
|
+
"typedJson": {
|
|
321
|
+
"rootName": "Level",
|
|
322
|
+
"root": { "type": "compound", "value": {} }
|
|
323
|
+
},
|
|
324
|
+
"compression": "gzip"
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
```
|
|
328
|
+
|
|
329
|
+
## Mod Analysis
|
|
330
|
+
|
|
331
|
+
### Analyze mod metadata
|
|
332
|
+
|
|
333
|
+
```json
|
|
334
|
+
{
|
|
335
|
+
"tool": "analyze-mod-jar",
|
|
336
|
+
"arguments": {
|
|
337
|
+
"jarPath": "/path/to/mymod-1.0.0.jar",
|
|
338
|
+
"includeClasses": true
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
```
|
|
342
|
+
|
|
343
|
+
### Decompile the mod JAR
|
|
344
|
+
|
|
345
|
+
```json
|
|
346
|
+
{
|
|
347
|
+
"tool": "decompile-mod-jar",
|
|
348
|
+
"arguments": {
|
|
349
|
+
"jarPath": "/path/to/mymod-1.0.0.jar",
|
|
350
|
+
"includeFiles": false,
|
|
351
|
+
"className": "com.example.mymod.MyMod"
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
```
|
|
355
|
+
|
|
356
|
+
### Read a specific class from decompiled source
|
|
357
|
+
|
|
358
|
+
```json
|
|
359
|
+
{
|
|
360
|
+
"tool": "get-mod-class-source",
|
|
361
|
+
"arguments": {
|
|
362
|
+
"jarPath": "/path/to/mymod-1.0.0.jar",
|
|
363
|
+
"className": "com.example.mymod.mixin.PlayerMixin",
|
|
364
|
+
"maxLines": 120
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
```
|
|
368
|
+
|
|
369
|
+
### Search across decompiled mod source
|
|
370
|
+
|
|
371
|
+
```json
|
|
372
|
+
{
|
|
373
|
+
"tool": "search-mod-source",
|
|
374
|
+
"arguments": {
|
|
375
|
+
"jarPath": "/path/to/mymod-1.0.0.jar",
|
|
376
|
+
"query": "onPlayerTick",
|
|
377
|
+
"searchType": "method",
|
|
378
|
+
"limit": 50
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
```
|
|
382
|
+
|
|
383
|
+
### Remap a mod JAR to readable names
|
|
384
|
+
|
|
385
|
+
```json
|
|
386
|
+
{
|
|
387
|
+
"tool": "remap-mod-jar",
|
|
388
|
+
"arguments": {
|
|
389
|
+
"inputJar": "/path/to/mymod-1.0.0.jar",
|
|
390
|
+
"targetMapping": "yarn",
|
|
391
|
+
"mcVersion": "1.21.10"
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
```
|
|
395
|
+
|
|
396
|
+
If the input JAR was already built with Mojang mappings, use `targetMapping: "mojang"` to get a copied output JAR and a `fromMapping: "mojang"` result.
|
|
397
|
+
|
|
398
|
+
## Validation
|
|
399
|
+
|
|
400
|
+
### Validate Mixin source
|
|
401
|
+
|
|
402
|
+
```json
|
|
403
|
+
{
|
|
404
|
+
"tool": "validate-mixin",
|
|
405
|
+
"arguments": {
|
|
406
|
+
"input": {
|
|
407
|
+
"mode": "inline",
|
|
408
|
+
"source": "@Mixin(PlayerEntity.class)\npublic abstract class PlayerMixin {\n @Inject(method = \"tick\", at = @At(\"HEAD\"))\n private void onTick(CallbackInfo ci) {}\n}"
|
|
409
|
+
},
|
|
410
|
+
"version": "1.21.10",
|
|
411
|
+
"mapping": "yarn",
|
|
412
|
+
"reportMode": "compact",
|
|
413
|
+
"warningMode": "aggregated",
|
|
414
|
+
"includeIssues": false
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
```
|
|
418
|
+
|
|
419
|
+
### Validate Access Widener content
|
|
420
|
+
|
|
421
|
+
```json
|
|
422
|
+
{
|
|
423
|
+
"tool": "validate-access-widener",
|
|
424
|
+
"arguments": {
|
|
425
|
+
"content": "accessWidener v2 named\naccessible class net/minecraft/server/Main\naccessible method net/minecraft/server/Main tick ()V",
|
|
426
|
+
"version": "1.21.10",
|
|
427
|
+
"mapping": "yarn"
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
```
|
|
431
|
+
|
|
432
|
+
### Validate Access Widener content against a Loom runtime jar
|
|
433
|
+
|
|
434
|
+
```json
|
|
435
|
+
{
|
|
436
|
+
"tool": "validate-access-widener",
|
|
437
|
+
"arguments": {
|
|
438
|
+
"content": "accessWidener v2 named\naccessible class net/minecraft/server/Main\naccessible method net/minecraft/server/Main tick ()V",
|
|
439
|
+
"version": "1.21.10",
|
|
440
|
+
"projectPath": "/workspace/example-mod",
|
|
441
|
+
"scope": "loader",
|
|
442
|
+
"preferProjectVersion": true
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
```
|
|
446
|
+
|
|
447
|
+
### Validate Access Transformer content against a Forge or NeoForge runtime jar
|
|
448
|
+
|
|
449
|
+
```json
|
|
450
|
+
{
|
|
451
|
+
"tool": "validate-access-transformer",
|
|
452
|
+
"arguments": {
|
|
453
|
+
"content": "public net.minecraft.server.MinecraftServer\nprotected net.minecraft.server.MinecraftServer tickServer()V",
|
|
454
|
+
"version": "1.21.10",
|
|
455
|
+
"projectPath": "/workspace/example-neoforge-mod",
|
|
456
|
+
"scope": "loader",
|
|
457
|
+
"preferProjectVersion": true
|
|
458
|
+
}
|
|
459
|
+
}
|
|
460
|
+
```
|
|
461
|
+
|
|
462
|
+
## Registry and Diagnostics
|
|
463
|
+
|
|
464
|
+
### Get all registries for a version
|
|
465
|
+
|
|
466
|
+
```json
|
|
467
|
+
{
|
|
468
|
+
"tool": "get-registry-data",
|
|
469
|
+
"arguments": {
|
|
470
|
+
"version": "1.21.10",
|
|
471
|
+
"includeData": false
|
|
472
|
+
}
|
|
473
|
+
}
|
|
474
|
+
```
|
|
475
|
+
|
|
476
|
+
### Inspect runtime metrics
|
|
477
|
+
|
|
478
|
+
```json
|
|
479
|
+
{
|
|
480
|
+
"tool": "get-runtime-metrics",
|
|
481
|
+
"arguments": {}
|
|
482
|
+
}
|
|
483
|
+
```
|