bc-minecraft-bedrock-project 1.7.49 → 1.7.50

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/README.md CHANGED
@@ -25,3 +25,14 @@ Data.Process(...);
25
25
  //OR
26
26
  packs[0].process(...)
27
27
  ```
28
+
29
+ ## Contributing
30
+
31
+ First, read the [contributing guide](./CONTRIBUTING.md). fork the project, clone it and run the following commands:
32
+
33
+ **Installation**
34
+
35
+ ```cmd
36
+ npm ci
37
+ npm update
38
+ ```
@@ -11,6 +11,7 @@ var SoundDefinitions;
11
11
  */
12
12
  function is(value) {
13
13
  if (typeof value === "object" && typeof value.format_version === "string" && typeof value.sound_definitions === "object") {
14
+ return true;
14
15
  }
15
16
  return false;
16
17
  }
@@ -1 +1 @@
1
- {"version":3,"file":"SoundDefinitions.js","sourceRoot":"","sources":["../../../../../src/Lib/Internal/ResourcePack/SoundDefinitions.ts"],"names":[],"mappings":";;;AAmBA,MAAM;AACN,IAAiB,gBAAgB,CAYhC;AAZD,WAAiB,gBAAgB;IAC/B;;;;OAIG;IACH,SAAgB,EAAE,CAAC,KAAU;QAC3B,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,OAAO,KAAK,CAAC,cAAc,KAAK,QAAQ,IAAI,OAAO,KAAK,CAAC,iBAAiB,KAAK,QAAQ,EAAE;SACzH;QAED,OAAO,KAAK,CAAC;IACf,CAAC;IALe,mBAAE,KAKjB,CAAA;AACH,CAAC,EAZgB,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAYhC"}
1
+ {"version":3,"file":"SoundDefinitions.js","sourceRoot":"","sources":["../../../../../src/Lib/Internal/ResourcePack/SoundDefinitions.ts"],"names":[],"mappings":";;;AAmBA,MAAM;AACN,IAAiB,gBAAgB,CAahC;AAbD,WAAiB,gBAAgB;IAC/B;;;;OAIG;IACH,SAAgB,EAAE,CAAC,KAAU;QAC3B,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,OAAO,KAAK,CAAC,cAAc,KAAK,QAAQ,IAAI,OAAO,KAAK,CAAC,iBAAiB,KAAK,QAAQ,EAAE;YACxH,OAAO,IAAI,CAAC;SACb;QAED,OAAO,KAAK,CAAC;IACf,CAAC;IANe,mBAAE,KAMjB,CAAA;AACH,CAAC,EAbgB,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAahC"}
@@ -0,0 +1,17 @@
1
+ /** */
2
+ export declare enum FileType {
3
+ /** */
4
+ manifest = 0,
5
+ /** */
6
+ skins = 1,
7
+ /** */
8
+ texture = 2,
9
+ /** */
10
+ unknown = 3
11
+ }
12
+ /** */
13
+ export declare namespace FileType {
14
+ /**Detects resource pack resource, already assumed the path belongs to a resource pack
15
+ * @param uri the decoded uri, expects slashes to be '/'*/
16
+ function detect(uri: string): FileType;
17
+ }
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FileType = void 0;
4
+ const path = require("path");
5
+ /** */
6
+ var FileType;
7
+ (function (FileType) {
8
+ /** */
9
+ FileType[FileType["manifest"] = 0] = "manifest";
10
+ /** */
11
+ FileType[FileType["skins"] = 1] = "skins";
12
+ /** */
13
+ FileType[FileType["texture"] = 2] = "texture";
14
+ /** */
15
+ FileType[FileType["unknown"] = 3] = "unknown";
16
+ })(FileType = exports.FileType || (exports.FileType = {}));
17
+ /** */
18
+ (function (FileType) {
19
+ /**Detects resource pack resource, already assumed the path belongs to a resource pack
20
+ * @param uri the decoded uri, expects slashes to be '/'*/
21
+ function detect(uri) {
22
+ //Folders
23
+ if (uri.endsWith('.png'))
24
+ return FileType.texture;
25
+ const filename = path.basename(uri);
26
+ switch (filename) {
27
+ case "manifest.json":
28
+ return FileType.manifest;
29
+ case "skins.json":
30
+ return FileType.skins;
31
+ }
32
+ return FileType.unknown;
33
+ }
34
+ FileType.detect = detect;
35
+ })(FileType = exports.FileType || (exports.FileType = {}));
36
+ //# sourceMappingURL=FileType.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FileType.js","sourceRoot":"","sources":["../../../../../../src/Lib/Project/SkinPack/Enum/FileType.ts"],"names":[],"mappings":";;;AAAA,6BAA8B;AAE9B,MAAM;AACN,IAAY,QASX;AATD,WAAY,QAAQ;IAClB,MAAM;IACN,+CAAQ,CAAA;IACR,MAAM;IACN,yCAAK,CAAA;IACL,MAAM;IACN,6CAAO,CAAA;IACP,MAAM;IACN,6CAAO,CAAA;AACT,CAAC,EATW,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QASnB;AAED,MAAM;AACN,WAAiB,QAAQ;IACvB;8DAC0D;IAC1D,SAAgB,MAAM,CAAC,GAAW;QAChC,SAAS;QACT,IAAI,GAAG,CAAC,QAAQ,CAAC,MAAM,CAAC;YAAE,OAAO,QAAQ,CAAC,OAAO,CAAC;QAElD,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;QAEpC,QAAQ,QAAQ,EAAE;YAChB,KAAK,eAAe;gBAClB,OAAO,QAAQ,CAAC,QAAQ,CAAC;YAE3B,KAAK,YAAY;gBACf,OAAO,QAAQ,CAAC,KAAK,CAAC;SACzB;QAED,OAAO,QAAQ,CAAC,OAAO,CAAC;IAC1B,CAAC;IAfe,eAAM,SAerB,CAAA;AACH,CAAC,EAnBgB,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QAmBxB"}
@@ -0,0 +1 @@
1
+ export * from "./FileType";
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ /* Auto generated */
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
6
+ }) : (function(o, m, k, k2) {
7
+ if (k2 === undefined) k2 = k;
8
+ o[k2] = m[k];
9
+ }));
10
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
11
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
12
+ };
13
+ Object.defineProperty(exports, "__esModule", { value: true });
14
+ __exportStar(require("./FileType"), exports);
15
+ //# sourceMappingURL=include.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"include.js","sourceRoot":"","sources":["../../../../../../src/Lib/Project/SkinPack/Enum/include.ts"],"names":[],"mappings":";AAAA,oBAAoB;;;;;;;;;;;;AAEpB,6CAA2B"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bc-minecraft-bedrock-project",
3
- "version": "1.7.49",
3
+ "version": "1.7.50",
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",
@@ -42,17 +42,17 @@
42
42
  "devDependencies": {
43
43
  "@types/chai": "^4.2.22",
44
44
  "@types/mocha": "^9.0.0",
45
- "@types/node": "^16.11.1",
45
+ "@types/node": "^16.11.4",
46
46
  "chai": "^4.3.4",
47
47
  "mocha": "^9.1.3",
48
48
  "rimraf": "^3.0.2",
49
- "ts-node": "^10.3.0",
49
+ "ts-node": "^10.3.1",
50
50
  "typescript": "^4.4.4"
51
51
  },
52
52
  "dependencies": {
53
- "bc-minecraft-bedrock-command": "^1.2.14",
54
- "bc-minecraft-bedrock-types": "^1.2.11",
55
- "bc-minecraft-molang": "^1.1.3",
53
+ "bc-minecraft-bedrock-command": "^1.2.15",
54
+ "bc-minecraft-bedrock-types": "^1.2.12",
55
+ "bc-minecraft-molang": "^1.1.5",
56
56
  "bc-minecraft-project": "^1.0.12",
57
57
  "jsonc": "^2.0.0"
58
58
  }