bc-minecraft-bedrock-project 1.21.101-0 → 1.21.101-2
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/src/internal/resource-pack/resources.d.ts +10 -0
- package/lib/src/internal/resource-pack/resources.js +32 -0
- package/lib/src/internal/resource-pack/resources.js.map +1 -0
- package/lib/src/project/resource-pack/attachable/process.js +2 -0
- package/lib/src/project/resource-pack/attachable/process.js.map +1 -1
- package/lib/src/project/resource-pack/entity/process.js +2 -0
- package/lib/src/project/resource-pack/entity/process.js.map +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Types } from "bc-minecraft-bedrock-types";
|
|
2
|
+
import { MolangSet } from "bc-minecraft-molang";
|
|
3
|
+
import { TextDocument } from "../../types";
|
|
4
|
+
interface Resources {
|
|
5
|
+
materials?: Types.Definition;
|
|
6
|
+
geometry?: Types.Definition;
|
|
7
|
+
textures?: Types.Definition;
|
|
8
|
+
}
|
|
9
|
+
export declare function getUsingResources(receiver: MolangSet, source: Resources, document: TextDocument): void;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getUsingResources = getUsingResources;
|
|
4
|
+
const bc_minecraft_bedrock_types_1 = require("bc-minecraft-bedrock-types");
|
|
5
|
+
const bc_minecraft_molang_1 = require("bc-minecraft-molang");
|
|
6
|
+
function getUsingResources(receiver, source, document) {
|
|
7
|
+
bc_minecraft_bedrock_types_1.Types.Definition.forEach(source.geometry, (reference) => {
|
|
8
|
+
receiver.assigned.add({
|
|
9
|
+
scope: "geometry",
|
|
10
|
+
names: [reference],
|
|
11
|
+
position: document.getText().indexOf(`"${reference}"`),
|
|
12
|
+
type: bc_minecraft_molang_1.NodeType.ResourceReference,
|
|
13
|
+
});
|
|
14
|
+
});
|
|
15
|
+
bc_minecraft_bedrock_types_1.Types.Definition.forEach(source.materials, (reference) => {
|
|
16
|
+
receiver.assigned.add({
|
|
17
|
+
scope: "material",
|
|
18
|
+
names: [reference],
|
|
19
|
+
position: document.getText().indexOf(`"${reference}"`),
|
|
20
|
+
type: bc_minecraft_molang_1.NodeType.ResourceReference,
|
|
21
|
+
});
|
|
22
|
+
});
|
|
23
|
+
bc_minecraft_bedrock_types_1.Types.Definition.forEach(source.materials, (reference) => {
|
|
24
|
+
receiver.assigned.add({
|
|
25
|
+
scope: "texture",
|
|
26
|
+
names: [reference],
|
|
27
|
+
position: document.getText().indexOf(`"${reference}"`),
|
|
28
|
+
type: bc_minecraft_molang_1.NodeType.ResourceReference,
|
|
29
|
+
});
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=resources.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resources.js","sourceRoot":"","sources":["../../../../src/internal/resource-pack/resources.ts"],"names":[],"mappings":";;AAUA,8CAyBC;AAnCD,2EAAmD;AACnD,6DAA0D;AAS1D,SAAgB,iBAAiB,CAAC,QAAmB,EAAE,MAAiB,EAAE,QAAsB;IAC9F,kCAAK,CAAC,UAAU,CAAC,OAAO,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC,SAAS,EAAE,EAAE;QACtD,QAAQ,CAAC,QAAQ,CAAC,GAAG,CAAC;YACpB,KAAK,EAAE,UAAU;YACjB,KAAK,EAAE,CAAC,SAAS,CAAC;YAClB,QAAQ,EAAE,QAAQ,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,IAAI,SAAS,GAAG,CAAC;YACtD,IAAI,EAAE,8BAAQ,CAAC,iBAAiB;SACjC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IACH,kCAAK,CAAC,UAAU,CAAC,OAAO,CAAC,MAAM,CAAC,SAAS,EAAE,CAAC,SAAS,EAAE,EAAE;QACvD,QAAQ,CAAC,QAAQ,CAAC,GAAG,CAAC;YACpB,KAAK,EAAE,UAAU;YACjB,KAAK,EAAE,CAAC,SAAS,CAAC;YAClB,QAAQ,EAAE,QAAQ,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,IAAI,SAAS,GAAG,CAAC;YACtD,IAAI,EAAE,8BAAQ,CAAC,iBAAiB;SACjC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IACH,kCAAK,CAAC,UAAU,CAAC,OAAO,CAAC,MAAM,CAAC,SAAS,EAAE,CAAC,SAAS,EAAE,EAAE;QACvD,QAAQ,CAAC,QAAQ,CAAC,GAAG,CAAC;YACpB,KAAK,EAAE,SAAS;YAChB,KAAK,EAAE,CAAC,SAAS,CAAC;YAClB,QAAQ,EAAE,QAAQ,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,IAAI,SAAS,GAAG,CAAC;YACtD,IAAI,EAAE,8BAAQ,CAAC,iBAAiB;SACjC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -40,6 +40,7 @@ const Internal = __importStar(require("../../../internal/resource-pack"));
|
|
|
40
40
|
const types_1 = require("../../../types");
|
|
41
41
|
const references_1 = require("../../../types/references");
|
|
42
42
|
const molang_1 = require("../../molang");
|
|
43
|
+
const resources_1 = require("../../../internal/resource-pack/resources");
|
|
43
44
|
/**
|
|
44
45
|
*
|
|
45
46
|
* @param doc
|
|
@@ -61,6 +62,7 @@ function process(doc) {
|
|
|
61
62
|
animations: references_1.References.wrap(description.animation_controllers, undefined),
|
|
62
63
|
documentation: types_1.Documentation.getDoc(doc, () => `Attachable Item: ${id}`),
|
|
63
64
|
};
|
|
65
|
+
(0, resources_1.getUsingResources)(out.molang, imp["minecraft:attachable"].description, doc);
|
|
64
66
|
//process animations
|
|
65
67
|
bc_minecraft_bedrock_types_1.Types.Definition.forEach(description.animations, (reference, id) => {
|
|
66
68
|
out.animations.defined.add(reference);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"process.js","sourceRoot":"","sources":["../../../../../src/project/resource-pack/attachable/process.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"process.js","sourceRoot":"","sources":["../../../../../src/project/resource-pack/attachable/process.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAcA,0BA0BC;AAxCD,2EAAmD;AACnD,gDAAyC;AACzC,0EAA4D;AAC5D,0CAA6D;AAC7D,0DAAuD;AACvD,yCAA6C;AAE7C,yEAA8E;AAE9E;;;;GAIG;AACH,SAAgB,OAAO,CAAC,GAAiB;IACvC,MAAM,GAAG,GAAG,GAAG,CAAC,GAAG,CAAC;IACpB,MAAM,OAAO,GAAG,GAAG,CAAC,OAAO,EAAE,CAAC;IAC9B,MAAM,GAAG,GAAG,eAAI,CAAC,EAAE,CAAsB,GAAG,CAAC,CAAC;IAE9C,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,EAAE,CAAC,GAAG,CAAC;QAAE,OAAO,SAAS,CAAC;IAEnD,MAAM,SAAS,GAAG,GAAG,CAAC,sBAAsB,CAAC,CAAC;IAC9C,MAAM,WAAW,GAAG,SAAS,CAAC,WAAW,CAAC;IAC1C,MAAM,EAAE,GAAG,WAAW,CAAC,UAAU,CAAC;IAClC,MAAM,GAAG,GAAe;QACtB,EAAE,EAAE,EAAE;QACN,QAAQ,EAAE,kCAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,GAAG,EAAE,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;QACzD,MAAM,EAAE,IAAA,sBAAa,EAAC,OAAO,EAAE,SAAS,CAAC;QACzC,UAAU,EAAE,uBAAU,CAAC,IAAI,CAAC,WAAW,CAAC,qBAAqB,EAAE,SAAS,CAAC;QACzE,aAAa,EAAE,qBAAa,CAAC,MAAM,CAAC,GAAG,EAAE,GAAG,EAAE,CAAC,oBAAoB,EAAE,EAAE,CAAC;KACzE,CAAC;IACF,IAAA,6BAAiB,EAAC,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,sBAAsB,CAAC,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC;IAE5E,oBAAoB;IACpB,kCAAK,CAAC,UAAU,CAAC,OAAO,CAAC,WAAW,CAAC,UAAU,EAAE,CAAC,SAAS,EAAE,EAAE,EAAE,EAAE;QACjE,GAAG,CAAC,UAAU,CAAC,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;QACtC,GAAG,CAAC,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAC/B,CAAC,CAAC,CAAC;IAEH,OAAO,GAAG,CAAC;AACb,CAAC"}
|
|
@@ -40,6 +40,7 @@ const Internal = __importStar(require("../../../internal/resource-pack"));
|
|
|
40
40
|
const types_1 = require("../../../types");
|
|
41
41
|
const references_1 = require("../../../types/references");
|
|
42
42
|
const molang_1 = require("../../molang");
|
|
43
|
+
const resources_1 = require("../../../internal/resource-pack/resources");
|
|
43
44
|
/**
|
|
44
45
|
*
|
|
45
46
|
* @param doc
|
|
@@ -61,6 +62,7 @@ function process(doc) {
|
|
|
61
62
|
animations: references_1.References.wrap((_a = description.animation_controllers) === null || _a === void 0 ? void 0 : _a.flatMap((item) => (typeof item === "string" ? item : Object.getOwnPropertyNames(item)[0])).filter((item) => item !== undefined), undefined),
|
|
62
63
|
documentation: types_1.Documentation.getDoc(doc, () => `Entity: ${id}`),
|
|
63
64
|
};
|
|
65
|
+
(0, resources_1.getUsingResources)(out.molang, imp["minecraft:client_entity"].description, doc);
|
|
64
66
|
//process animations
|
|
65
67
|
bc_minecraft_bedrock_types_1.Types.Definition.forEach(description.animations, (reference, id) => {
|
|
66
68
|
out.animations.defined.add(reference);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"process.js","sourceRoot":"","sources":["../../../../../src/project/resource-pack/entity/process.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":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ACD,aAAa,EAAE,qBAAa,CAAC,MAAM,CAAC,GAAG,EAAE,GAAG,EAAE,CAAC,WAAW,EAAE,EAAE,CAAC;KAChE,CAAC;IACF,IAAA,6BAAiB,EAAC,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,yBAAyB,CAAC,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC;IAE/E,oBAAoB;IACpB,kCAAK,CAAC,UAAU,CAAC,OAAO,CAAC,WAAW,CAAC,UAAU,EAAE,CAAC,SAAS,EAAE,EAAE,EAAE,EAAE;QACjE,GAAG,CAAC,UAAU,CAAC,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;QACtC,GAAG,CAAC,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAC/B,CAAC,CAAC,CAAC;IAEH,OAAO,GAAG,CAAC;AACb,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bc-minecraft-bedrock-project",
|
|
3
|
-
"version": "1.21.101-
|
|
3
|
+
"version": "1.21.101-2",
|
|
4
4
|
"description": "The typescript library responsible for reading/parsing minecraft bedrock data",
|
|
5
5
|
"main": "./lib/src/main.js",
|
|
6
6
|
"types": "./lib/src/main.d.ts",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"bc-minecraft-bedrock-command": "^1.21.100-0",
|
|
58
58
|
"bc-minecraft-bedrock-types": "^1.22.1-11",
|
|
59
59
|
"bc-minecraft-bedrock-vanilla-data": "^1.21.80-8",
|
|
60
|
-
"bc-minecraft-molang": "^1.21.100-
|
|
60
|
+
"bc-minecraft-molang": "^1.21.100-2",
|
|
61
61
|
"bc-minecraft-project": "^1.21.73-6",
|
|
62
62
|
"jsonc": "^2.0.0"
|
|
63
63
|
}
|