bc-minecraft-bedrock-types 1.21.44-1 → 1.21.44-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.
@@ -0,0 +1,24 @@
1
+ /** */
2
+ export declare namespace timeInTicks {
3
+ /**The regex pattern that matches a time value */
4
+ const pattern: RegExp;
5
+ /**Checks if the given text value is a valid time value
6
+ * @param text The valued to check
7
+ * @returns True or false if the text represents an time value*/
8
+ function is(text: string): boolean;
9
+ /**Checks if the time is a value specification
10
+ * @param text The valued to check
11
+ * @returns True or false if the time is not a tick spec*/
12
+ function isTick(text: string): boolean;
13
+ /**Checks if the time is a value specification
14
+ * @param text The valued to check
15
+ * @returns True or false if the time is not a second spec*/
16
+ function isSecond(text: string): boolean;
17
+ /**Checks if the time is a value specification
18
+ * @param text The valued to check
19
+ * @returns True or false if the time is not a day spec*/
20
+ function isDay(text: string): boolean;
21
+ /**Parses the given time into a number
22
+ * @param text The text to convert*/
23
+ function parse(text: string): number;
24
+ }
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.timeInTicks = void 0;
4
+ /** */
5
+ var timeInTicks;
6
+ (function (timeInTicks) {
7
+ /**The regex pattern that matches a time value */
8
+ timeInTicks.pattern = /^([-\d]*|[-\d]*[TDS])$/;
9
+ /**Checks if the given text value is a valid time value
10
+ * @param text The valued to check
11
+ * @returns True or false if the text represents an time value*/
12
+ function is(text) {
13
+ return timeInTicks.pattern.test(text);
14
+ }
15
+ timeInTicks.is = is;
16
+ /**Checks if the time is a value specification
17
+ * @param text The valued to check
18
+ * @returns True or false if the time is not a tick spec*/
19
+ function isTick(text) {
20
+ return text.endsWith("T");
21
+ }
22
+ timeInTicks.isTick = isTick;
23
+ /**Checks if the time is a value specification
24
+ * @param text The valued to check
25
+ * @returns True or false if the time is not a second spec*/
26
+ function isSecond(text) {
27
+ return text.endsWith("S");
28
+ }
29
+ timeInTicks.isSecond = isSecond;
30
+ /**Checks if the time is a value specification
31
+ * @param text The valued to check
32
+ * @returns True or false if the time is not a day spec*/
33
+ function isDay(text) {
34
+ return text.endsWith("D");
35
+ }
36
+ timeInTicks.isDay = isDay;
37
+ /**Parses the given time into a number
38
+ * @param text The text to convert*/
39
+ function parse(text) {
40
+ if (isDay(text)) {
41
+ return Number.parseInt(text.slice(0, text.length - 1)) * 24000;
42
+ }
43
+ if (isSecond(text)) {
44
+ return Number.parseInt(text.slice(0, text.length - 1)) * 20;
45
+ }
46
+ if (isTick(text)) {
47
+ return Number.parseInt(text.slice(0, text.length - 1));
48
+ }
49
+ return Number.parseInt(text);
50
+ }
51
+ timeInTicks.parse = parse;
52
+ })(timeInTicks || (exports.timeInTicks = timeInTicks = {}));
53
+ //# sourceMappingURL=timeInTicks.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"timeInTicks.js","sourceRoot":"","sources":["../../src/minecraft/timeInTicks.ts"],"names":[],"mappings":";;;AAAA,MAAM;AACN,IAAiB,WAAW,CAkD3B;AAlDD,WAAiB,WAAW;IAC1B,iDAAiD;IACpC,mBAAO,GAAW,wBAAwB,CAAC;IAExD;;oEAEgE;IAChE,SAAgB,EAAE,CAAC,IAAY;QAC7B,OAAO,YAAA,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC5B,CAAC;IAFe,cAAE,KAEjB,CAAA;IAED;;8DAE0D;IAC1D,SAAgB,MAAM,CAAC,IAAY;QACjC,OAAO,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;IAC5B,CAAC;IAFe,kBAAM,SAErB,CAAA;IAED;;gEAE4D;IAC5D,SAAgB,QAAQ,CAAC,IAAY;QACnC,OAAO,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;IAC5B,CAAC;IAFe,oBAAQ,WAEvB,CAAA;IAED;;6DAEyD;IACzD,SAAgB,KAAK,CAAC,IAAY;QAChC,OAAO,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;IAC5B,CAAC;IAFe,iBAAK,QAEpB,CAAA;IAED;wCACoC;IACpC,SAAgB,KAAK,CAAC,IAAY;QAEhC,IAAI,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC;YAChB,OAAO,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC;QACjE,CAAC;QAED,IAAI,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;YACnB,OAAO,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC;QAC9D,CAAC;QAED,IAAI,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC;YACjB,OAAO,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC;QACzD,CAAC;QAED,OAAO,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IAC/B,CAAC;IAfe,iBAAK,QAepB,CAAA;AACH,CAAC,EAlDgB,WAAW,2BAAX,WAAW,QAkD3B"}
@@ -6,7 +6,16 @@ exports.PermissionMode = {
6
6
  name: "Permission",
7
7
  modes: [
8
8
  { name: "camera", documentation: "The permission that enables/disables the player can use the camera view" },
9
+ { name: "dismount", documentation: "The permission that enables/disables the player's ability to dismount" },
10
+ { name: "jump", documentation: "The permission that enables/disables the player's ability to jump" },
11
+ { name: "lateral_movement", documentation: "The permission that enables/disables the player's ability to move sideways" },
12
+ { name: "mount", documentation: "The permission that enables/disables the player's ability to mount an entity" },
13
+ { name: "move_backward", documentation: "The permission that enables/disables the player's ability to move backwards" },
14
+ { name: "move_forward", documentation: "The permission that enables/disables the player's ability to move forwards" },
15
+ { name: "move_left", documentation: "The permission that enables/disables the player's ability to move left" },
16
+ { name: "move_right", documentation: "The permission that enables/disables the player's ability to move right" },
9
17
  { name: "movement", documentation: "The permission that enables/disables the players movement." },
18
+ { name: "sneak", documentation: "The permission that enables/disables the player's ability to sneak" },
10
19
  ],
11
20
  };
12
21
  exports.PermissionStateMode = {
@@ -1 +1 @@
1
- {"version":3,"file":"permissions.js","sourceRoot":"","sources":["../../src/modes/permissions.ts"],"names":[],"mappings":";;;AAEA,MAAM;AACO,QAAA,cAAc,GAAmB;IAC5C,IAAI,EAAE,YAAY;IAClB,KAAK,EAAE;QACL,EAAE,IAAI,EAAE,QAAQ,EAAE,aAAa,EAAE,yEAAyE,EAAE;QAC5G,EAAE,IAAI,EAAE,UAAU,EAAE,aAAa,EAAE,4DAA4D,EAAE;KAClG;CACF,CAAC;AAEW,QAAA,mBAAmB,GAAmB;IACjD,IAAI,EAAE,kBAAkB;IACxB,KAAK,EAAE;QACL,EAAE,IAAI,EAAE,SAAS,EAAE,aAAa,EAAE,wBAAwB,EAAE;QAC5D,EAAE,IAAI,EAAE,UAAU,EAAE,aAAa,EAAE,yBAAyB,EAAE;KAC/D;CACF,CAAC"}
1
+ {"version":3,"file":"permissions.js","sourceRoot":"","sources":["../../src/modes/permissions.ts"],"names":[],"mappings":";;;AAEA,MAAM;AACO,QAAA,cAAc,GAAmB;IAC5C,IAAI,EAAE,YAAY;IAClB,KAAK,EAAE;QACL,EAAE,IAAI,EAAE,QAAQ,EAAE,aAAa,EAAE,yEAAyE,EAAE;QAC5G,EAAE,IAAI,EAAE,UAAU,EAAE,aAAa,EAAE,uEAAuE,EAAE;QAC5G,EAAE,IAAI,EAAE,MAAM,EAAE,aAAa,EAAE,mEAAmE,EAAE;QACpG,EAAE,IAAI,EAAE,kBAAkB,EAAE,aAAa,EAAE,4EAA4E,EAAE;QACzH,EAAE,IAAI,EAAE,OAAO,EAAE,aAAa,EAAE,8EAA8E,EAAE;QAChH,EAAE,IAAI,EAAE,eAAe,EAAE,aAAa,EAAE,6EAA6E,EAAE;QACvH,EAAE,IAAI,EAAE,cAAc,EAAE,aAAa,EAAE,4EAA4E,EAAE;QACrH,EAAE,IAAI,EAAE,WAAW,EAAE,aAAa,EAAE,wEAAwE,EAAE;QAC9G,EAAE,IAAI,EAAE,YAAY,EAAE,aAAa,EAAE,yEAAyE,EAAE;QAChH,EAAE,IAAI,EAAE,UAAU,EAAE,aAAa,EAAE,4DAA4D,EAAE;QACjG,EAAE,IAAI,EAAE,OAAO,EAAE,aAAa,EAAE,oEAAoE,EAAE;KACvG;CACF,CAAC;AAEW,QAAA,mBAAmB,GAAmB;IACjD,IAAI,EAAE,kBAAkB;IACxB,KAAK,EAAE;QACL,EAAE,IAAI,EAAE,SAAS,EAAE,aAAa,EAAE,wBAAwB,EAAE;QAC5D,EAAE,IAAI,EAAE,UAAU,EAAE,aAAa,EAAE,yBAAyB,EAAE;KAC/D;CACF,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bc-minecraft-bedrock-types",
3
- "version": "1.21.44-1",
3
+ "version": "1.21.44-2",
4
4
  "description": "The typescript library that provides default types for minecraft bedrock",
5
5
  "main": "./lib/main.js",
6
6
  "types": "./lib/main.d.ts",