bc-minecraft-bedrock-types 1.4.10 → 1.19.40-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.
|
@@ -3,13 +3,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.hasGroup = exports.getUsedGroups = exports.getUsedComponents = void 0;
|
|
4
4
|
function getUsedComponents(data) {
|
|
5
5
|
const out = [];
|
|
6
|
-
if (data.components) {
|
|
6
|
+
if (data === null || data === void 0 ? void 0 : data.components) {
|
|
7
7
|
Object.getOwnPropertyNames(data.components).forEach((c) => {
|
|
8
8
|
if (!out.includes(c))
|
|
9
9
|
out.push(c);
|
|
10
10
|
});
|
|
11
11
|
}
|
|
12
|
-
const groups = data.component_groups;
|
|
12
|
+
const groups = data === null || data === void 0 ? void 0 : data.component_groups;
|
|
13
13
|
if (groups) {
|
|
14
14
|
Object.entries(groups).forEach(([name, group]) => {
|
|
15
15
|
Object.getOwnPropertyNames(group).forEach((c) => {
|
|
@@ -22,7 +22,7 @@ function getUsedComponents(data) {
|
|
|
22
22
|
}
|
|
23
23
|
exports.getUsedComponents = getUsedComponents;
|
|
24
24
|
function getUsedGroups(data) {
|
|
25
|
-
const groups = data.component_groups;
|
|
25
|
+
const groups = data === null || data === void 0 ? void 0 : data.component_groups;
|
|
26
26
|
if (groups) {
|
|
27
27
|
return Object.getOwnPropertyNames(groups);
|
|
28
28
|
}
|
|
@@ -36,8 +36,8 @@ exports.getUsedGroups = getUsedGroups;
|
|
|
36
36
|
* @returns
|
|
37
37
|
*/
|
|
38
38
|
function hasGroup(data, group) {
|
|
39
|
-
if (data.component_groups) {
|
|
40
|
-
if (data.component_groups[group]) {
|
|
39
|
+
if (data === null || data === void 0 ? void 0 : data.component_groups) {
|
|
40
|
+
if (data === null || data === void 0 ? void 0 : data.component_groups[group]) {
|
|
41
41
|
return true;
|
|
42
42
|
}
|
|
43
43
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Used.js","sourceRoot":"","sources":["../../../../src/Minecraft/Components/Used.ts"],"names":[],"mappings":";;;AAEA,SAAgB,iBAAiB,CAAC,IAAuB;IACvD,MAAM,GAAG,GAAa,EAAE,CAAC;IAEzB,IAAI,IAAI,
|
|
1
|
+
{"version":3,"file":"Used.js","sourceRoot":"","sources":["../../../../src/Minecraft/Components/Used.ts"],"names":[],"mappings":";;;AAEA,SAAgB,iBAAiB,CAAC,IAAuB;IACvD,MAAM,GAAG,GAAa,EAAE,CAAC;IAEzB,IAAI,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,UAAU,EAAE;QACpB,MAAM,CAAC,mBAAmB,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE;YACxD,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC;gBAAE,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QACpC,CAAC,CAAC,CAAC;KACJ;IAED,MAAM,MAAM,GAAG,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,gBAAgB,CAAC;IAEtC,IAAI,MAAM,EAAE;QACV,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE,EAAE;YAC/C,MAAM,CAAC,mBAAmB,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE;gBAC9C,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC;oBAAE,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YACpC,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;KACJ;IAED,OAAO,GAAG,CAAC;AACb,CAAC;AApBD,8CAoBC;AAED,SAAgB,aAAa,CAAC,IAAuB;IACnD,MAAM,MAAM,GAAG,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,gBAAgB,CAAC;IAEtC,IAAI,MAAM,EAAE;QACV,OAAO,MAAM,CAAC,mBAAmB,CAAC,MAAM,CAAC,CAAC;KAC3C;IAED,OAAO,EAAE,CAAC;AACZ,CAAC;AARD,sCAQC;AAED;;;;;GAKG;AACH,SAAgB,QAAQ,CAAC,IAAuB,EAAE,KAAa;IAC7D,IAAI,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,gBAAgB,EAAE;QAC1B,IAAI,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,gBAAgB,CAAC,KAAK,CAAC,EAAE;YACjC,OAAO,IAAI,CAAC;SACb;KACF;IAED,OAAO,KAAK,CAAC;AACf,CAAC;AARD,4BAQC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**A conditional object
|
|
2
2
|
* @example { "walk.anim": "query.random" }*/
|
|
3
3
|
export interface Conditional {
|
|
4
|
-
/**The id is an animation / controller that is to be activated if the string value is
|
|
4
|
+
/**The id is an animation / controller that is to be activated if the string value is evaluated to be 1.0 or higher*/
|
|
5
5
|
[id: string]: string | number;
|
|
6
6
|
}
|
|
7
7
|
/**
|
package/package.json
CHANGED