bc-minecraft-bedrock-project 1.20.71-0 → 1.20.71-3
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/Lib/Internal/ResourcePack/Attachable.d.ts +12 -12
- package/lib/src/Lib/Internal/ResourcePack/Attachable.js +4 -1
- package/lib/src/Lib/Internal/ResourcePack/Attachable.js.map +1 -1
- package/lib/src/Lib/Project/ResourcePack/Attachable/Process.js +8 -5
- package/lib/src/Lib/Project/ResourcePack/Attachable/Process.js.map +1 -1
- package/package.json +1 -1
|
@@ -12,18 +12,6 @@ export interface Attachable extends FormatVersion {
|
|
|
12
12
|
export interface AttachableContainer extends ScriptContainer {
|
|
13
13
|
/** */
|
|
14
14
|
description: AttachableDescription;
|
|
15
|
-
/** */
|
|
16
|
-
animations?: Types.Definition;
|
|
17
|
-
/** */
|
|
18
|
-
animation_controllers?: string[];
|
|
19
|
-
/** */
|
|
20
|
-
particle_effects?: Types.Definition;
|
|
21
|
-
/** */
|
|
22
|
-
geometry?: Types.Definition;
|
|
23
|
-
/** */
|
|
24
|
-
sound_effects?: Types.Definition;
|
|
25
|
-
/** */
|
|
26
|
-
textures?: Types.Definition;
|
|
27
15
|
}
|
|
28
16
|
/** */
|
|
29
17
|
export interface AttachableDescription {
|
|
@@ -36,6 +24,18 @@ export interface AttachableDescription {
|
|
|
36
24
|
/** */
|
|
37
25
|
enchanted?: string;
|
|
38
26
|
};
|
|
27
|
+
/** */
|
|
28
|
+
animations?: Types.Definition;
|
|
29
|
+
/** */
|
|
30
|
+
animation_controllers?: string[];
|
|
31
|
+
/** */
|
|
32
|
+
particle_effects?: Types.Definition;
|
|
33
|
+
/** */
|
|
34
|
+
geometry?: Types.Definition;
|
|
35
|
+
/** */
|
|
36
|
+
sound_effects?: Types.Definition;
|
|
37
|
+
/** */
|
|
38
|
+
textures?: Types.Definition;
|
|
39
39
|
}
|
|
40
40
|
/** */
|
|
41
41
|
export declare namespace Attachable {
|
|
@@ -10,7 +10,10 @@ var Attachable;
|
|
|
10
10
|
* @returns
|
|
11
11
|
*/
|
|
12
12
|
function is(value) {
|
|
13
|
-
if (value &&
|
|
13
|
+
if (value &&
|
|
14
|
+
typeof value === "object" &&
|
|
15
|
+
typeof value.format_version === "string" &&
|
|
16
|
+
typeof value["minecraft:attachable"] === "object") {
|
|
14
17
|
const desc = value["minecraft:attachable"].description;
|
|
15
18
|
if (typeof desc === "object" && typeof desc.identifier === "string")
|
|
16
19
|
return true;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Attachable.js","sourceRoot":"","sources":["../../../../../src/Lib/Internal/ResourcePack/Attachable.ts"],"names":[],"mappings":";;;AA2CA,MAAM;AACN,IAAiB,UAAU,
|
|
1
|
+
{"version":3,"file":"Attachable.js","sourceRoot":"","sources":["../../../../../src/Lib/Internal/ResourcePack/Attachable.ts"],"names":[],"mappings":";;;AA2CA,MAAM;AACN,IAAiB,UAAU,CAoB1B;AApBD,WAAiB,UAAU;IACzB;;;;OAIG;IACH,SAAgB,EAAE,CAAC,KAAU;QAC3B,IACE,KAAK;YACL,OAAO,KAAK,KAAK,QAAQ;YACzB,OAAO,KAAK,CAAC,cAAc,KAAK,QAAQ;YACxC,OAAO,KAAK,CAAC,sBAAsB,CAAC,KAAK,QAAQ,EACjD,CAAC;YACD,MAAM,IAAI,GAAG,KAAK,CAAC,sBAAsB,CAAC,CAAC,WAAW,CAAC;YAEvD,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,OAAO,IAAI,CAAC,UAAU,KAAK,QAAQ;gBAAE,OAAO,IAAI,CAAC;QACnF,CAAC;QAED,OAAO,KAAK,CAAC;IACf,CAAC;IAbe,aAAE,KAajB,CAAA;AACH,CAAC,EApBgB,UAAU,0BAAV,UAAU,QAoB1B"}
|
|
@@ -42,7 +42,8 @@ function Process(doc) {
|
|
|
42
42
|
if (!Internal.Attachable.is(imp))
|
|
43
43
|
return undefined;
|
|
44
44
|
const container = imp["minecraft:attachable"];
|
|
45
|
-
const
|
|
45
|
+
const description = container.description;
|
|
46
|
+
const id = description.identifier;
|
|
46
47
|
const out = {
|
|
47
48
|
id: id,
|
|
48
49
|
location: bc_minecraft_bedrock_types_1.Types.Location.create(uri, content.indexOf(id)),
|
|
@@ -50,13 +51,15 @@ function Process(doc) {
|
|
|
50
51
|
animations: bc_minecraft_molang_2.DefinedUsing.create(),
|
|
51
52
|
documentation: Documentation_1.Documentation.getDoc(doc, () => `Attachable Item: ${id}`),
|
|
52
53
|
};
|
|
53
|
-
if (
|
|
54
|
-
bc_minecraft_bedrock_types_1.Types.Definition.forEach(
|
|
54
|
+
if (description.animations) {
|
|
55
|
+
bc_minecraft_bedrock_types_1.Types.Definition.forEach(description.animations, (value, key) => {
|
|
55
56
|
out.animations.defined.push(key);
|
|
56
57
|
out.animations.using.push(value);
|
|
57
58
|
});
|
|
58
|
-
|
|
59
|
-
|
|
59
|
+
}
|
|
60
|
+
if (description.animation_controllers) {
|
|
61
|
+
description.animation_controllers.forEach((item) => out.animations.using.push(item));
|
|
62
|
+
}
|
|
60
63
|
return out;
|
|
61
64
|
}
|
|
62
65
|
exports.Process = Process;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Process.js","sourceRoot":"","sources":["../../../../../../src/Lib/Project/ResourcePack/Attachable/Process.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yEAA2D;AAC3D,gDAAyC;AACzC,6DAA6C;AAG7C,6DAAmD;AACnD,gEAA6D;AAC7D,2EAAmD;AAEnD;;;;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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