bc-minecraft-bedrock-types 1.19.50-0 → 1.19.73-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.
- package/lib/src/Minecraft/Block.js +15 -15
- package/lib/src/Minecraft/Components/Interfaces.d.ts +3 -3
- package/lib/src/Minecraft/Filter/Domain.d.ts +1 -1
- package/lib/src/Minecraft/Filter/Filter.d.ts +2 -2
- package/lib/src/Minecraft/Filter/Operator.d.ts +1 -1
- package/lib/src/Minecraft/Filter/Subject.d.ts +1 -1
- package/lib/src/Minecraft/Filter/TestType.d.ts +1 -1
- package/lib/src/Minecraft/Selector/SelectorTypes.d.ts +1 -1
- package/lib/src/Modes/Modes.d.ts +4 -0
- package/lib/src/Modes/Modes.js +5 -0
- package/lib/src/Modes/Modes.js.map +1 -1
- package/lib/src/Modes/Permissions.d.ts +4 -0
- package/lib/src/Modes/Permissions.js +19 -0
- package/lib/src/Modes/Permissions.js.map +1 -0
- package/lib/src/Types/DocumentLocation.d.ts +2 -2
- package/lib/src/Types/JsonPath.d.ts +1 -1
- package/package.json +2 -1
|
@@ -75,13 +75,13 @@ var Block;
|
|
|
75
75
|
*/
|
|
76
76
|
function getStates(blockDescription) {
|
|
77
77
|
const out = [];
|
|
78
|
-
let
|
|
79
|
-
if (
|
|
80
|
-
|
|
81
|
-
let
|
|
82
|
-
if (
|
|
83
|
-
|
|
84
|
-
const parts = blockDescription.slice(
|
|
78
|
+
let startIndex = blockDescription.indexOf("[");
|
|
79
|
+
if (startIndex > -1) {
|
|
80
|
+
startIndex++;
|
|
81
|
+
let endIndex = blockDescription.indexOf("]", startIndex + 1);
|
|
82
|
+
if (endIndex < startIndex)
|
|
83
|
+
endIndex = blockDescription.length;
|
|
84
|
+
const parts = blockDescription.slice(startIndex, endIndex).split(",");
|
|
85
85
|
for (var I = 0; I < parts.length; I++) {
|
|
86
86
|
const b = BlockState.parse(parts[I]);
|
|
87
87
|
if (b)
|
|
@@ -100,14 +100,14 @@ var Block;
|
|
|
100
100
|
Loc = Location_1.Location.empty();
|
|
101
101
|
const out = [];
|
|
102
102
|
let id;
|
|
103
|
-
let
|
|
104
|
-
if (
|
|
105
|
-
id = blockDescription.slice(0,
|
|
106
|
-
|
|
107
|
-
let
|
|
108
|
-
if (
|
|
109
|
-
|
|
110
|
-
const parts = blockDescription.slice(
|
|
103
|
+
let startIndex = blockDescription.indexOf("[");
|
|
104
|
+
if (startIndex > -1) {
|
|
105
|
+
id = blockDescription.slice(0, startIndex);
|
|
106
|
+
startIndex++;
|
|
107
|
+
let endIndex = blockDescription.indexOf("]", startIndex + 1);
|
|
108
|
+
if (endIndex < startIndex)
|
|
109
|
+
endIndex = blockDescription.length;
|
|
110
|
+
const parts = blockDescription.slice(startIndex, endIndex).split(",");
|
|
111
111
|
for (var I = 0; I < parts.length; I++) {
|
|
112
112
|
const b = BlockState.parse(parts[I]);
|
|
113
113
|
if (b)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
1
|
+
export type Component = any;
|
|
2
|
+
export type ComponentContainer = Record<string, Component>;
|
|
3
|
+
export type ComponentGroups = Record<string, ComponentContainer>;
|
|
4
4
|
export interface ComponentBehavior {
|
|
5
5
|
component_groups?: ComponentGroups;
|
|
6
6
|
components?: ComponentContainer;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** The type of domain */
|
|
2
|
-
export
|
|
2
|
+
export type DomainType = "any" | "armor" | "feet" | "hand" | "head" | "leg" | "torso";
|
|
3
3
|
export declare namespace DomainType {
|
|
4
4
|
function parse(text: string): DomainType;
|
|
5
5
|
}
|
|
@@ -26,8 +26,8 @@ export interface FilterContainerType {
|
|
|
26
26
|
/** any filters to be false */
|
|
27
27
|
none_of?: FilterItemType;
|
|
28
28
|
}
|
|
29
|
-
export
|
|
30
|
-
export
|
|
29
|
+
export type FilterType = FilterItemType | FilterItemType[];
|
|
30
|
+
export type FilterItemType = FilterContainerType | Filter;
|
|
31
31
|
/**
|
|
32
32
|
*
|
|
33
33
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** The operator type */
|
|
2
|
-
export
|
|
2
|
+
export type OperatorType = "!=" | "<" | "<=" | "<>" | "=" | "==" | ">" | ">=" | "equals" | "not";
|
|
3
3
|
/** The operator type */
|
|
4
4
|
export declare namespace OperatorType {
|
|
5
5
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/**
|
|
2
2
|
*
|
|
3
3
|
*/
|
|
4
|
-
export
|
|
4
|
+
export type TestType = "clock_time" | "distance_to_nearest_player" | "has_ability" | "has_biome_tag" | "has_component" | "has_container_open" | "has_damage" | "has_equipment" | "has_mob_effect" | "has_nametag" | "has_ranged_weapon" | "has_silk_touch" | "has_tag" | "has_target" | "has_trade_supply" | "hourly_clock_time" | "in_block" | "in_caravan" | "in_clouds" | "in_contact_with_water" | "in_lava" | "in_nether" | "in_water" | "in_water_or_rain" | "inactivity_timer" | "is_altitude" | "is_avoiding_mobs" | "is_biome" | "is_block" | "is_brightness" | "is_climbing" | "is_color" | "is_daytime" | "is_difficulty" | "is_family" | "is_game_rule" | "is_humid" | "is_immobile" | "is_in_village" | "is_leashed" | "is_leashed_to" | "is_mark_variant" | "is_missing_health" | "is_moving" | "is_owner" | "is_persistent" | "is_riding" | "is_skin_id" | "is_sleeping" | "is_sneaking" | "is_snow_covered" | "is_target" | "is_temperature_type" | "is_temperature_value" | "is_underground" | "is_underwater" | "is_variant" | "is_visible" | "is_waterlogged" | "is_weather" | "light_level" | "moon_intensity" | "moon_phase" | "on_ground" | "on_ladder" | "random_chance" | "rider_count" | "surface_mob" | "trusts" | "weather" | "weather_at_position";
|
package/lib/src/Modes/Modes.d.ts
CHANGED
|
@@ -29,6 +29,10 @@ export declare namespace Modes {
|
|
|
29
29
|
const OldBlock: ModeHandler;
|
|
30
30
|
/** The mode: Operation **/
|
|
31
31
|
const Operation: ModeHandler;
|
|
32
|
+
/** The mode: Permission **/
|
|
33
|
+
const Permission: ModeHandler;
|
|
34
|
+
/** The mode: Permission State **/
|
|
35
|
+
const PermissionState: ModeHandler;
|
|
32
36
|
/** The mode: Replace **/
|
|
33
37
|
const Replace: ModeHandler;
|
|
34
38
|
/** The mode: RideFill **/
|
package/lib/src/Modes/Modes.js
CHANGED
|
@@ -16,6 +16,7 @@ const ModeHandler_1 = require("./ModeHandler");
|
|
|
16
16
|
const MusicRepeat_1 = require("./MusicRepeat");
|
|
17
17
|
const OldBlock_1 = require("./OldBlock");
|
|
18
18
|
const Operation_1 = require("./Operation");
|
|
19
|
+
const Permissions_1 = require("./Permissions");
|
|
19
20
|
const Replace_1 = require("./Replace");
|
|
20
21
|
const RideFill_1 = require("./RideFill");
|
|
21
22
|
const RideRules_1 = require("./RideRules");
|
|
@@ -59,6 +60,10 @@ var Modes;
|
|
|
59
60
|
Modes.OldBlock = new ModeHandler_1.ModeHandler(OldBlock_1.OldBlockMode);
|
|
60
61
|
/** The mode: Operation **/
|
|
61
62
|
Modes.Operation = new ModeHandler_1.ModeHandler(Operation_1.OperationMode);
|
|
63
|
+
/** The mode: Permission **/
|
|
64
|
+
Modes.Permission = new ModeHandler_1.ModeHandler(Permissions_1.PermissionMode);
|
|
65
|
+
/** The mode: Permission State **/
|
|
66
|
+
Modes.PermissionState = new ModeHandler_1.ModeHandler(Permissions_1.PermissionStateMode);
|
|
62
67
|
/** The mode: Replace **/
|
|
63
68
|
Modes.Replace = new ModeHandler_1.ModeHandler(Replace_1.ReplaceMode);
|
|
64
69
|
/** The mode: RideFill **/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Modes.js","sourceRoot":"","sources":["../../../src/Modes/Modes.ts"],"names":[],"mappings":";;;AAAA,+CAAgD;AAChD,2CAA4C;AAC5C,mCAAoC;AACpC,6CAA8C;AAC9C,2CAA4C;AAC5C,iCAAkC;AAClC,yCAAsC;AACtC,yCAA0C;AAC1C,mDAAoD;AACpD,iCAAkC;AA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,yBAAW,CAAC,yCAAqB,CAAC,CAAC;IACxE,+BAA+B;IAClB,kBAAY,GAAG,IAAI,yBAAW,CAAC,+BAAgB,CAAC,CAAC;IAC9D,+BAA+B;IAClB,cAAQ,GAAG,IAAI,yBAAW,CAAC,wBAAa,CAAC,CAAC;IACvD,oCAAoC;IACvB,wBAAkB,GAAG,IAAI,yBAAW,CAAC,2CAAsB,CAAC,CAAC;IAC1E,+BAA+B;IAClB,mBAAa,GAAG,IAAI,yBAAW,CAAC,iCAAiB,CAAC,CAAC;IAChE,sBAAsB;IACT,UAAI,GAAG,IAAI,yBAAW,CAAC,eAAQ,CAAC,CAAC;AAChD,CAAC,EAzDgB,KAAK,GAAL,aAAK,KAAL,aAAK,QAyDrB"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PermissionStateMode = exports.PermissionMode = void 0;
|
|
4
|
+
/** */
|
|
5
|
+
exports.PermissionMode = {
|
|
6
|
+
name: "Permission",
|
|
7
|
+
modes: [
|
|
8
|
+
{ name: "camera", documentation: "The permission that enables/disables the player can use the camera view" },
|
|
9
|
+
{ name: "movement", documentation: "The permission that enables/disables the players movement." },
|
|
10
|
+
],
|
|
11
|
+
};
|
|
12
|
+
exports.PermissionStateMode = {
|
|
13
|
+
name: "Permission State",
|
|
14
|
+
modes: [
|
|
15
|
+
{ name: "enabled", documentation: "Enables the permission" },
|
|
16
|
+
{ name: "disenabled", documentation: "Disables the permission" },
|
|
17
|
+
],
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=Permissions.js.map
|
|
@@ -0,0 +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,YAAY,EAAE,aAAa,EAAE,yBAAyB,EAAE;KACjE;CACF,CAAC"}
|
|
@@ -3,9 +3,9 @@ import { OffsetWord } from './OffsetWord';
|
|
|
3
3
|
import { Position } from "./Position";
|
|
4
4
|
import { Range } from "./Range";
|
|
5
5
|
/**The type of a document location */
|
|
6
|
-
export
|
|
6
|
+
export type DocumentLocation = Position | OffsetWord | JsonPath | number;
|
|
7
7
|
/** */
|
|
8
|
-
export
|
|
8
|
+
export type TextOrDoc = string | {
|
|
9
9
|
getText(): string;
|
|
10
10
|
};
|
|
11
11
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bc-minecraft-bedrock-types",
|
|
3
|
-
"version": "1.19.
|
|
3
|
+
"version": "1.19.73-0",
|
|
4
4
|
"description": "The typescript library that provides default types for minecraft bedrock",
|
|
5
5
|
"main": "./lib/src/main.js",
|
|
6
6
|
"types": "./lib/src/main.d.ts",
|
|
@@ -43,6 +43,7 @@
|
|
|
43
43
|
"@types/node": "^18.6.5",
|
|
44
44
|
"chai": "^4.3.6",
|
|
45
45
|
"mocha": "^10.0.0",
|
|
46
|
+
"mocha-junit-reporter": "^2.2.0",
|
|
46
47
|
"rimraf": "^3.0.2",
|
|
47
48
|
"ts-node": "^10.9.1",
|
|
48
49
|
"typescript": "^4.7.4"
|