@spyglassmc/java-edition 0.1.1 → 0.2.0
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/lib/binder/index.d.ts +3 -3
- package/lib/binder/index.js +11 -17
- package/lib/common/index.js +4 -28
- package/lib/dependency/common.d.ts +8 -5
- package/lib/dependency/common.js +18 -18
- package/lib/dependency/index.d.ts +6 -6
- package/lib/dependency/index.js +21 -48
- package/lib/dependency/mcmeta.d.ts +2 -3
- package/lib/dependency/mcmeta.js +28 -100
- package/lib/index.d.ts +3 -3
- package/lib/index.js +27 -50
- package/lib/json/checker/data/advancement.d.ts +13 -13
- package/lib/json/checker/data/advancement.js +259 -262
- package/lib/json/checker/data/biome.d.ts +3 -3
- package/lib/json/checker/data/biome.js +98 -101
- package/lib/json/checker/data/common.d.ts +2 -2
- package/lib/json/checker/data/common.js +145 -152
- package/lib/json/checker/data/dimension.d.ts +3 -3
- package/lib/json/checker/data/dimension.js +148 -151
- package/lib/json/checker/data/feature.d.ts +8 -8
- package/lib/json/checker/data/feature.js +369 -372
- package/lib/json/checker/data/index.d.ts +2 -2
- package/lib/json/checker/data/index.js +36 -39
- package/lib/json/checker/data/loot_table.d.ts +7 -7
- package/lib/json/checker/data/loot_table.js +125 -128
- package/lib/json/checker/data/recipe.d.ts +1 -1
- package/lib/json/checker/data/recipe.js +25 -28
- package/lib/json/checker/data/structure.d.ts +7 -7
- package/lib/json/checker/data/structure.js +80 -83
- package/lib/json/checker/data/tag.js +23 -26
- package/lib/json/checker/data/text_component.d.ts +1 -1
- package/lib/json/checker/data/text_component.js +61 -64
- package/lib/json/checker/index.js +14 -19
- package/lib/json/checker/util/advancement.d.ts +1 -1
- package/lib/json/checker/util/advancement.js +4 -8
- package/lib/json/checker/util/block_states.d.ts +1 -1
- package/lib/json/checker/util/block_states.js +21 -45
- package/lib/json/checker/util/color.d.ts +1 -1
- package/lib/json/checker/util/color.js +20 -25
- package/lib/json/checker/util/index.d.ts +7 -7
- package/lib/json/checker/util/index.js +7 -19
- package/lib/json/checker/util/nbt.d.ts +2 -3
- package/lib/json/checker/util/nbt.js +17 -22
- package/lib/json/checker/util/recipe.d.ts +1 -1
- package/lib/json/checker/util/recipe.js +4 -8
- package/lib/json/checker/util/uuid.d.ts +1 -1
- package/lib/json/checker/util/uuid.js +4 -7
- package/lib/json/checker/util/version.d.ts +13 -13
- package/lib/json/checker/util/version.js +7 -13
- package/lib/json/index.d.ts +1 -1
- package/lib/json/index.js +4 -27
- package/lib/mcfunction/checker/index.d.ts +1 -1
- package/lib/mcfunction/checker/index.js +79 -103
- package/lib/mcfunction/colorizer/index.d.ts +1 -1
- package/lib/mcfunction/colorizer/index.js +6 -31
- package/lib/mcfunction/common/index.js +7 -29
- package/lib/mcfunction/completer/argument.js +95 -119
- package/lib/mcfunction/completer/index.d.ts +1 -1
- package/lib/mcfunction/completer/index.js +1 -13
- package/lib/mcfunction/index.d.ts +6 -6
- package/lib/mcfunction/index.js +19 -54
- package/lib/mcfunction/inlayHintProvider.js +3 -26
- package/lib/mcfunction/node/argument.d.ts +3 -3
- package/lib/mcfunction/node/argument.js +47 -69
- package/lib/mcfunction/node/index.d.ts +1 -1
- package/lib/mcfunction/node/index.js +1 -13
- package/lib/mcfunction/parser/argument.d.ts +1 -1
- package/lib/mcfunction/parser/argument.js +76 -101
- package/lib/mcfunction/parser/index.d.ts +1 -1
- package/lib/mcfunction/parser/index.js +1 -13
- package/lib/mcfunction/signatureHelpProvider.js +3 -26
- package/lib/mcfunction/tree/argument.js +1 -2
- package/lib/mcfunction/tree/index.d.ts +1 -6
- package/lib/mcfunction/tree/index.js +1 -18
- package/lib/mcfunction/tree/patch.d.ts +4 -0
- package/lib/mcfunction/tree/patch.js +748 -0
- package/package.json +8 -7
- package/lib/mcfunction/tree/1.15.d.ts +0 -9
- package/lib/mcfunction/tree/1.15.js +0 -542
- package/lib/mcfunction/tree/1.16.d.ts +0 -10
- package/lib/mcfunction/tree/1.16.js +0 -77
- package/lib/mcfunction/tree/1.17.d.ts +0 -12
- package/lib/mcfunction/tree/1.17.js +0 -166
- package/lib/mcfunction/tree/1.18.d.ts +0 -26
- package/lib/mcfunction/tree/1.18.js +0 -6
- package/lib/mcfunction/tree/1.19.d.ts +0 -26
- package/lib/mcfunction/tree/1.19.js +0 -6
|
@@ -1,41 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
-
}) : function(o, v) {
|
|
12
|
-
o["default"] = v;
|
|
13
|
-
});
|
|
14
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
-
if (mod && mod.__esModule) return mod;
|
|
16
|
-
var result = {};
|
|
17
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
-
__setModuleDefault(result, mod);
|
|
19
|
-
return result;
|
|
20
|
-
};
|
|
21
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.register = exports.getTypesFromEntity = exports.command = void 0;
|
|
23
|
-
const core = __importStar(require("@spyglassmc/core"));
|
|
24
|
-
const json = __importStar(require("@spyglassmc/json"));
|
|
25
|
-
const lib_1 = require("@spyglassmc/locales/lib");
|
|
26
|
-
const mcf = __importStar(require("@spyglassmc/mcfunction"));
|
|
27
|
-
const nbt = __importStar(require("@spyglassmc/nbt"));
|
|
28
|
-
const nbtdoc = __importStar(require("@spyglassmc/nbtdoc"));
|
|
29
|
-
const common_1 = require("../../common");
|
|
30
|
-
const text_component_1 = require("../../json/checker/data/text_component");
|
|
31
|
-
const node_1 = require("../node");
|
|
32
|
-
const command = (node, ctx) => {
|
|
1
|
+
import * as core from '@spyglassmc/core';
|
|
2
|
+
import * as json from '@spyglassmc/json';
|
|
3
|
+
import { localize } from '@spyglassmc/locales';
|
|
4
|
+
import * as mcf from '@spyglassmc/mcfunction';
|
|
5
|
+
import * as nbt from '@spyglassmc/nbt';
|
|
6
|
+
import { getTagValues } from '../../common/index.js';
|
|
7
|
+
import { text_component } from '../../json/checker/data/text_component.js';
|
|
8
|
+
import { BlockNode, EntityNode, ItemNode, ParticleNode } from '../node/index.js';
|
|
9
|
+
export const command = (node, ctx) => {
|
|
33
10
|
if (node.slash && node.parent && mcf.McfunctionNode.is(node.parent)) {
|
|
34
|
-
ctx.err.report(
|
|
11
|
+
ctx.err.report(localize('unexpected-leading-slash'), node.slash);
|
|
35
12
|
}
|
|
36
13
|
rootCommand(node.children, 0, ctx);
|
|
37
14
|
};
|
|
38
|
-
exports.command = command;
|
|
39
15
|
const getName = (nodes, index) => {
|
|
40
16
|
return nodes[index]?.path[nodes[index].path.length - 1];
|
|
41
17
|
};
|
|
@@ -44,20 +20,20 @@ const getNode = (nodes, index) => {
|
|
|
44
20
|
};
|
|
45
21
|
const rootCommand = (nodes, index, ctx) => {
|
|
46
22
|
for (const { children: [node] } of nodes) {
|
|
47
|
-
if (
|
|
23
|
+
if (BlockNode.is(node)) {
|
|
48
24
|
block(node, ctx);
|
|
49
25
|
}
|
|
50
|
-
else if (
|
|
26
|
+
else if (EntityNode.is(node)) {
|
|
51
27
|
entity(node, ctx);
|
|
52
28
|
}
|
|
53
|
-
else if (
|
|
29
|
+
else if (ItemNode.is(node)) {
|
|
54
30
|
item(node, ctx);
|
|
55
31
|
}
|
|
56
|
-
else if (
|
|
32
|
+
else if (ParticleNode.is(node)) {
|
|
57
33
|
particle(node, ctx);
|
|
58
34
|
}
|
|
59
35
|
else if (json.JsonNode.is(node)) {
|
|
60
|
-
|
|
36
|
+
text_component(node, { ...ctx, context: '' });
|
|
61
37
|
}
|
|
62
38
|
}
|
|
63
39
|
if (getName(nodes, index) === 'data') {
|
|
@@ -70,59 +46,61 @@ const rootCommand = (nodes, index, ctx) => {
|
|
|
70
46
|
else if (getName(nodes, index + 1) === 'modify') {
|
|
71
47
|
nbtPath(nodes, index + 2, ctx);
|
|
72
48
|
const targetPath = getNode(nodes, index + 4);
|
|
73
|
-
if (nbt.NbtPathNode.is(targetPath)) {
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
}
|
|
49
|
+
// if (nbt.NbtPathNode.is(targetPath)) {
|
|
50
|
+
// const operationNode = getNode(nodes, index + 5)
|
|
51
|
+
// const operation = getName(nodes, index + 5) as 'append' | 'insert' | 'merge' | 'prepend' | 'set' | undefined
|
|
52
|
+
// const sourceTypeIndex = operation === 'insert' ? index + 7 : index + 6
|
|
53
|
+
// let targetMcdocType: mcdoc.McdocType | undefined = targetPath.targetType ? mcdoc.simplifyType(targetPath.targetType) : undefined
|
|
54
|
+
// const isType = (type: mcdoc.McdocType['kind']) => !targetMcdocType || targetMcdocType.kind === type || (targetMcdocType.type === 'union' && targetMcdocType.members.some(m => m.type === type))
|
|
55
|
+
// if (operation === 'merge') {
|
|
56
|
+
// if (!(isType('compound') || isType('index'))) {
|
|
57
|
+
// ctx.err.report(
|
|
58
|
+
// localize('mcfunction.checker.command.data-modify-unapplicable-operation', localeQuote(operation), localize('nbt.node.compound'), localeQuote(mcdoc.McdocType.toString(targetMcdocType))),
|
|
59
|
+
// core.Range.span(targetPath, operationNode!),
|
|
60
|
+
// core.ErrorSeverity.Warning
|
|
61
|
+
// )
|
|
62
|
+
// targetMcdocType = undefined
|
|
63
|
+
// }
|
|
64
|
+
// } else if (operation === 'append' || operation === 'insert' || operation === 'prepend') {
|
|
65
|
+
// if (isType('list') || isType('byte_array') || isType('int_array') || isType('long_array')) {
|
|
66
|
+
// if (targetMcdocType?.type === 'list') {
|
|
67
|
+
// targetMcdocType = targetMcdocType.item
|
|
68
|
+
// } else if (targetMcdocType?.type === 'byte_array') {
|
|
69
|
+
// targetMcdocType = { type: 'byte', valueRange: targetMcdocType.valueRange }
|
|
70
|
+
// } else if (targetMcdocType?.type === 'int_array') {
|
|
71
|
+
// targetMcdocType = { type: 'int', valueRange: targetMcdocType.valueRange }
|
|
72
|
+
// } else if (targetMcdocType?.type === 'long_array') {
|
|
73
|
+
// targetMcdocType = { type: 'long', valueRange: targetMcdocType.valueRange }
|
|
74
|
+
// }
|
|
75
|
+
// } else {
|
|
76
|
+
// ctx.err.report(
|
|
77
|
+
// localize('mcfunction.checker.command.data-modify-unapplicable-operation', localeQuote(operation), localize('nbt.node.list'), localeQuote(mcdoc.McdocType.toString(targetMcdocType))),
|
|
78
|
+
// core.Range.span(targetPath, operationNode!),
|
|
79
|
+
// core.ErrorSeverity.Warning
|
|
80
|
+
// )
|
|
81
|
+
// targetMcdocType = undefined
|
|
82
|
+
// }
|
|
83
|
+
// }
|
|
84
|
+
// if (targetMcdocType) {
|
|
85
|
+
// if (getName(nodes, sourceTypeIndex) === 'from') {
|
|
86
|
+
// // `from <$nbtPath$>`
|
|
87
|
+
// nbtPath(nodes, sourceTypeIndex + 1, ctx)
|
|
88
|
+
// const sourcePath = getNode(nodes, sourceTypeIndex + 3)
|
|
89
|
+
// if (nbt.NbtPathNode.is(sourcePath)) {
|
|
90
|
+
// const { errorMessage } = mcdoc.checkAssignability({ source: sourcePath.targetType, target: targetMcdocType })
|
|
91
|
+
// if (errorMessage) {
|
|
92
|
+
// ctx.err.report(errorMessage, core.Range.span(targetPath, sourcePath), core.ErrorSeverity.Warning)
|
|
93
|
+
// }
|
|
94
|
+
// }
|
|
95
|
+
// } else if (getName(nodes, sourceTypeIndex) === 'value') {
|
|
96
|
+
// // `value <value: nbt_tag>`
|
|
97
|
+
// const valueNode = getNode(nodes, sourceTypeIndex + 1)
|
|
98
|
+
// if (nbt.NbtNode.is(valueNode)) {
|
|
99
|
+
// nbt.checker.fieldValue(targetMcdocType, { allowUnknownKey: true })(valueNode, ctx)
|
|
100
|
+
// }
|
|
101
|
+
// }
|
|
102
|
+
// }
|
|
103
|
+
// }
|
|
126
104
|
}
|
|
127
105
|
else if (getName(nodes, index + 1) === 'remove') {
|
|
128
106
|
nbtPath(nodes, index + 2, ctx);
|
|
@@ -157,7 +135,7 @@ const entity = (node, ctx) => {
|
|
|
157
135
|
if (!nbtPair) {
|
|
158
136
|
return;
|
|
159
137
|
}
|
|
160
|
-
const types =
|
|
138
|
+
const types = getTypesFromEntity(node, ctx);
|
|
161
139
|
const nbtValue = nbtPair.value;
|
|
162
140
|
nbt.checker.index('entity_type', types)(nbtValue, ctx);
|
|
163
141
|
};
|
|
@@ -190,8 +168,8 @@ const dataMergeTarget = (nodes, index, ctx) => {
|
|
|
190
168
|
case 'entity': {
|
|
191
169
|
const entityNode = getNode(nodes, index + 1);
|
|
192
170
|
const nbtNode = getNode(nodes, index + 2);
|
|
193
|
-
if (
|
|
194
|
-
const types =
|
|
171
|
+
if (EntityNode.is(entityNode) && nbt.NbtCompoundNode.is(nbtNode)) {
|
|
172
|
+
const types = getTypesFromEntity(entityNode, ctx);
|
|
195
173
|
nbt.checker.index('entity_type', types)(nbtNode, ctx);
|
|
196
174
|
}
|
|
197
175
|
break;
|
|
@@ -224,8 +202,8 @@ const nbtPath = (nodes, index, ctx) => {
|
|
|
224
202
|
case 'entity': {
|
|
225
203
|
const entityNode = getNode(nodes, index + 1);
|
|
226
204
|
const nbtNode = getNode(nodes, index + 2);
|
|
227
|
-
if (
|
|
228
|
-
const types =
|
|
205
|
+
if (EntityNode.is(entityNode) && nbt.NbtPathNode.is(nbtNode)) {
|
|
206
|
+
const types = getTypesFromEntity(entityNode, ctx);
|
|
229
207
|
nbt.checker.path('entity_type', types)(nbtNode, ctx);
|
|
230
208
|
}
|
|
231
209
|
break;
|
|
@@ -251,7 +229,7 @@ const summonNbt = (nodes, index, ctx) => {
|
|
|
251
229
|
}
|
|
252
230
|
};
|
|
253
231
|
//#endregion
|
|
254
|
-
const getTypesFromEntity = (entity, ctx) => {
|
|
232
|
+
export const getTypesFromEntity = (entity, ctx) => {
|
|
255
233
|
if (entity.playerName !== undefined || entity.selector?.playersOnly) {
|
|
256
234
|
return ['minecraft:player'];
|
|
257
235
|
}
|
|
@@ -271,7 +249,7 @@ const getTypesFromEntity = (entity, ctx) => {
|
|
|
271
249
|
}
|
|
272
250
|
const value = core.ResourceLocationNode.toString(valueNode.value, 'full');
|
|
273
251
|
if (value.startsWith(core.ResourceLocation.TagPrefix)) {
|
|
274
|
-
const tagValues =
|
|
252
|
+
const tagValues = getTagValues('tag/entity_type', value.slice(1), ctx);
|
|
275
253
|
types = types.filter(t => tagValues.includes(t));
|
|
276
254
|
}
|
|
277
255
|
else {
|
|
@@ -282,13 +260,11 @@ const getTypesFromEntity = (entity, ctx) => {
|
|
|
282
260
|
}
|
|
283
261
|
return undefined;
|
|
284
262
|
};
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
meta.registerChecker('mcfunction:command', exports.command);
|
|
263
|
+
export function register(meta) {
|
|
264
|
+
meta.registerChecker('mcfunction:command', command);
|
|
288
265
|
meta.registerChecker('mcfunction:block', block);
|
|
289
266
|
meta.registerChecker('mcfunction:entity', entity);
|
|
290
267
|
meta.registerChecker('mcfunction:item', item);
|
|
291
268
|
meta.registerChecker('mcfunction:particle', particle);
|
|
292
269
|
}
|
|
293
|
-
exports.register = register;
|
|
294
270
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as core from '@spyglassmc/core';
|
|
2
|
-
import type { ObjectiveCriteriaNode, VectorNode } from '../node';
|
|
2
|
+
import type { ObjectiveCriteriaNode, VectorNode } from '../node/index.js';
|
|
3
3
|
export declare const objectiveCriterion: core.Colorizer<ObjectiveCriteriaNode>;
|
|
4
4
|
export declare const vector: core.Colorizer<VectorNode>;
|
|
5
5
|
export declare function register(meta: core.MetaRegistry): void;
|
|
@@ -1,38 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
-
}) : function(o, v) {
|
|
12
|
-
o["default"] = v;
|
|
13
|
-
});
|
|
14
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
-
if (mod && mod.__esModule) return mod;
|
|
16
|
-
var result = {};
|
|
17
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
-
__setModuleDefault(result, mod);
|
|
19
|
-
return result;
|
|
20
|
-
};
|
|
21
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.register = exports.vector = exports.objectiveCriterion = void 0;
|
|
23
|
-
const core = __importStar(require("@spyglassmc/core"));
|
|
24
|
-
const objectiveCriterion = node => [
|
|
1
|
+
import * as core from '@spyglassmc/core';
|
|
2
|
+
export const objectiveCriterion = node => [
|
|
25
3
|
core.ColorToken.create(node, 'type'),
|
|
26
4
|
];
|
|
27
|
-
|
|
28
|
-
const vector = node => {
|
|
5
|
+
export const vector = node => {
|
|
29
6
|
return [core.ColorToken.create(node, 'vector')];
|
|
30
7
|
};
|
|
31
|
-
|
|
32
|
-
function register(meta) {
|
|
8
|
+
export function register(meta) {
|
|
33
9
|
meta.registerColorizer('mcfunction:coordinate', core.colorizer.number);
|
|
34
|
-
meta.registerColorizer('mcfunction:vector',
|
|
35
|
-
meta.registerColorizer('mcfunction:objective_criteria',
|
|
10
|
+
meta.registerColorizer('mcfunction:vector', vector);
|
|
11
|
+
meta.registerColorizer('mcfunction:objective_criteria', objectiveCriterion);
|
|
36
12
|
}
|
|
37
|
-
exports.register = register;
|
|
38
13
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,29 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
-
}) : function(o, v) {
|
|
12
|
-
o["default"] = v;
|
|
13
|
-
});
|
|
14
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
-
if (mod && mod.__esModule) return mod;
|
|
16
|
-
var result = {};
|
|
17
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
-
__setModuleDefault(result, mod);
|
|
19
|
-
return result;
|
|
20
|
-
};
|
|
21
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.SwizzleArgumentValues = exports.ScoreboardSlotArgumentValues = exports.OperationArgumentValues = exports.ItemSlotArgumentValues = exports.EntityAnchorArgumentValues = exports.ColorArgumentValues = void 0;
|
|
23
|
-
const core = __importStar(require("@spyglassmc/core"));
|
|
24
|
-
exports.ColorArgumentValues = [...core.Color.ColorNames, 'reset'];
|
|
25
|
-
exports.EntityAnchorArgumentValues = ['feet', 'eyes'];
|
|
26
|
-
exports.ItemSlotArgumentValues = [
|
|
1
|
+
import * as core from '@spyglassmc/core';
|
|
2
|
+
export const ColorArgumentValues = [...core.Color.ColorNames, 'reset'];
|
|
3
|
+
export const EntityAnchorArgumentValues = ['feet', 'eyes'];
|
|
4
|
+
export const ItemSlotArgumentValues = [
|
|
27
5
|
...[...Array(54).keys()].map(n => `container.${n}`),
|
|
28
6
|
...[...Array(27).keys()].map(n => `enderchest.${n}`),
|
|
29
7
|
...[...Array(15).keys()].map(n => `horse.${n}`),
|
|
@@ -34,12 +12,12 @@ exports.ItemSlotArgumentValues = [
|
|
|
34
12
|
'horse.armor', 'horse.chest', 'horse.saddle',
|
|
35
13
|
'weapon', 'weapon.mainhand', 'weapon.offhand',
|
|
36
14
|
];
|
|
37
|
-
|
|
38
|
-
|
|
15
|
+
export const OperationArgumentValues = ['=', '+=', '-=', '*=', '/=', '%=', '<', '>', '><'];
|
|
16
|
+
export const ScoreboardSlotArgumentValues = [
|
|
39
17
|
'belowName', 'list', 'sidebar',
|
|
40
18
|
...core.Color.ColorNames.map(n => `sidebar.team.${n}`),
|
|
41
19
|
];
|
|
42
|
-
|
|
20
|
+
export const SwizzleArgumentValues = [
|
|
43
21
|
'x', 'xy', 'xz', 'xyz', 'xzy',
|
|
44
22
|
'y', 'yx', 'yz', 'yxz', 'yzx',
|
|
45
23
|
'z', 'zx', 'zy', 'zxy', 'zyx',
|