bc-minecraft-molang 1.1.6 → 1.2.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/Molang/Functions.d.ts +19 -0
- package/lib/src/Molang/Functions.js +89 -0
- package/lib/src/Molang/Functions.js.map +1 -0
- package/lib/src/Molang/MolangSet.js +1 -1
- package/lib/src/Molang/MolangSet.js.map +1 -1
- package/lib/src/Molang/Syntax.d.ts +18 -0
- package/lib/src/Molang/Syntax.js +39 -0
- package/lib/src/Molang/Syntax.js.map +1 -0
- package/lib/src/Molang/{Molang → Types}/Context.d.ts +0 -0
- package/lib/src/Molang/{Molang → Types}/Context.js +0 -0
- package/lib/src/Molang/Types/Context.js.map +1 -0
- package/lib/src/Molang/{Molang → Types}/Geometries.d.ts +0 -0
- package/lib/src/Molang/{Molang → Types}/Geometries.js +0 -0
- package/lib/src/Molang/Types/Geometries.js.map +1 -0
- package/lib/src/Molang/{Molang → Types}/Materials.d.ts +0 -0
- package/lib/src/Molang/{Molang → Types}/Materials.js +0 -0
- package/lib/src/Molang/Types/Materials.js.map +1 -0
- package/lib/src/Molang/{Molang → Types}/Math.d.ts +0 -0
- package/lib/src/Molang/{Molang → Types}/Math.js +0 -0
- package/lib/src/Molang/Types/Math.js.map +1 -0
- package/lib/src/Molang/{Molang → Types}/Queries.d.ts +0 -0
- package/lib/src/Molang/{Molang → Types}/Queries.js +0 -0
- package/lib/src/Molang/Types/Queries.js.map +1 -0
- package/lib/src/Molang/{Molang → Types}/Temps.d.ts +0 -0
- package/lib/src/Molang/{Molang → Types}/Temps.js +0 -0
- package/lib/src/Molang/Types/Temps.js.map +1 -0
- package/lib/src/Molang/{Molang → Types}/Textures.d.ts +0 -0
- package/lib/src/Molang/{Molang → Types}/Textures.js +0 -0
- package/lib/src/Molang/Types/Textures.js.map +1 -0
- package/lib/src/Molang/{Molang → Types}/Variables.d.ts +0 -0
- package/lib/src/Molang/{Molang → Types}/Variables.js +0 -0
- package/lib/src/Molang/Types/Variables.js.map +1 -0
- package/lib/src/Molang/{Molang → Types}/include.d.ts +0 -0
- package/lib/src/Molang/{Molang → Types}/include.js +0 -0
- package/lib/src/Molang/Types/include.js.map +1 -0
- package/lib/src/Molang/include.d.ts +1 -1
- package/lib/src/Molang/include.js +2 -2
- package/lib/src/Molang/include.js.map +1 -1
- package/lib/src/MolangData/General.d.ts +3 -3
- package/lib/src/MolangData/General.js +861 -213
- package/lib/src/MolangData/General.js.map +1 -1
- package/lib/src/MolangData/MolangData.d.ts +46 -0
- package/lib/src/MolangData/MolangData.js +42 -0
- package/lib/src/MolangData/MolangData.js.map +1 -0
- package/lib/src/MolangData/Particles.js.map +1 -1
- package/package.json +3 -3
- package/lib/src/Molang/Molang/Context.js.map +0 -1
- package/lib/src/Molang/Molang/Geometries.js.map +0 -1
- package/lib/src/Molang/Molang/Materials.js.map +0 -1
- package/lib/src/Molang/Molang/Math.js.map +0 -1
- package/lib/src/Molang/Molang/Queries.js.map +0 -1
- package/lib/src/Molang/Molang/Temps.js.map +0 -1
- package/lib/src/Molang/Molang/Textures.js.map +0 -1
- package/lib/src/Molang/Molang/Variables.js.map +0 -1
- package/lib/src/Molang/Molang/include.js.map +0 -1
|
@@ -6,75 +6,204 @@ var General;
|
|
|
6
6
|
(function (General) {
|
|
7
7
|
/**The collection of math functions*/
|
|
8
8
|
General.Math = [
|
|
9
|
-
{
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
{
|
|
15
|
-
|
|
16
|
-
|
|
9
|
+
{
|
|
10
|
+
documentation: "Absolute value of value",
|
|
11
|
+
id: "abs",
|
|
12
|
+
parameters: [{ id: "value" }],
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
documentation: "arccos of value",
|
|
16
|
+
id: "acos",
|
|
17
|
+
parameters: [{ id: "value" }],
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
documentation: "arcsin of value",
|
|
21
|
+
id: "asin",
|
|
22
|
+
parameters: [{ id: "value" }],
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
documentation: "arctan of value",
|
|
26
|
+
id: "atan",
|
|
27
|
+
parameters: [{ id: "value" }],
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
documentation: "arctan of y/x. NOTE: the order of arguments!",
|
|
31
|
+
id: "atan2",
|
|
32
|
+
parameters: [{ id: "y" }, { id: "x" }],
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
documentation: "Round value up to nearest integral number",
|
|
36
|
+
id: "ceil",
|
|
37
|
+
parameters: [{ id: "value" }],
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
documentation: "Clamp value to between min and max inclusive",
|
|
41
|
+
id: "clamp",
|
|
42
|
+
parameters: [{ id: "value" }, { id: "min" }, { id: "max" }],
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
documentation: "Cosine (in degrees) of value",
|
|
46
|
+
id: "cos",
|
|
47
|
+
parameters: [{ id: "value" }],
|
|
48
|
+
},
|
|
17
49
|
{
|
|
18
50
|
documentation: "returns the sum of 'num' random numbers, each with a value from low to high`. Note: the generated random numbers are not integers like normal dice. For that, use die_roll_integer`.",
|
|
19
|
-
id: "die_roll
|
|
51
|
+
id: "die_roll",
|
|
52
|
+
parameters: [{ id: "num" }, { id: "low" }, { id: "high" }],
|
|
20
53
|
},
|
|
21
54
|
{
|
|
22
55
|
documentation: "returns the sum of 'num' random integer numbers, each with a value from low to high`. Note: the generated random numbers are integers like normal dice.",
|
|
23
|
-
id: "die_roll_integer
|
|
56
|
+
id: "die_roll_integer",
|
|
57
|
+
parameters: [{ id: "num" }, { id: "low" }, { id: "high" }],
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
documentation: "Calculates e to the value'th power",
|
|
61
|
+
id: "exp",
|
|
62
|
+
parameters: [{ id: "value" }],
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
documentation: "Round value down to nearest integral number",
|
|
66
|
+
id: "floor",
|
|
67
|
+
parameters: [{ id: "value" }],
|
|
24
68
|
},
|
|
25
|
-
{ documentation: "Calculates e to the value'th power", id: "exp(value)" },
|
|
26
|
-
{ documentation: "Round value down to nearest integral number", id: "floor(value)" },
|
|
27
69
|
{
|
|
28
70
|
documentation: "Useful for simple smooth curve interpolation using one of the Hermite Basis ids: `3t^2 - 2t^3`. Note that while any valid float is a valid input, this id works best in the range [0,1].",
|
|
29
|
-
id: "hermite_blend
|
|
71
|
+
id: "hermite_blend",
|
|
72
|
+
parameters: [{ id: "value" }],
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
documentation: "Lerp from start to end via 0_to_1",
|
|
76
|
+
id: "lerp",
|
|
77
|
+
parameters: [{ id: "start" }, { id: "end" }, { id: "0_to_1" }],
|
|
30
78
|
},
|
|
31
|
-
{ documentation: "Lerp from start to end via 0_to_1", id: "lerp(start, end, 0_to_1)" },
|
|
32
79
|
{
|
|
33
80
|
documentation: "Lerp the shortest direction around a circle from start degrees to end degrees via 0_to_1",
|
|
34
|
-
id: "lerprotate
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
{
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
{
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
{
|
|
48
|
-
|
|
81
|
+
id: "lerprotate",
|
|
82
|
+
parameters: [{ id: "start" }, { id: "end" }, { id: "0_to_1" }],
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
documentation: "Natural logarithm of value",
|
|
86
|
+
id: "ln",
|
|
87
|
+
parameters: [{ id: "value" }],
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
documentation: "Return highest value of A or B",
|
|
91
|
+
id: "max",
|
|
92
|
+
parameters: [{ id: "A" }, { id: "B" }],
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
documentation: "Return lowest value of A or B",
|
|
96
|
+
id: "min",
|
|
97
|
+
parameters: [{ id: "A" }, { id: "B" }],
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
documentation: "Minimize angle magnitude (in degrees) into the range [-180, 180]",
|
|
101
|
+
id: "min_angle",
|
|
102
|
+
parameters: [{ id: "value" }],
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
documentation: "Return the remainder of value / denominator",
|
|
106
|
+
id: "mod",
|
|
107
|
+
parameters: [{ id: "value" }, { id: "denominator" }],
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
documentation: "Returns the float representation of the constant pi.",
|
|
111
|
+
id: "pi",
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
documentation: "Elevates `base` to the `exponent`'th power",
|
|
115
|
+
id: "pow",
|
|
116
|
+
parameters: [{ id: "base" }, { id: "exponent" }],
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
documentation: "Random value between low and high inclusive",
|
|
120
|
+
id: "random",
|
|
121
|
+
parameters: [{ id: "low" }, { id: "high" }],
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
documentation: "Random integer value between low and high inclusive",
|
|
125
|
+
id: "random_integer",
|
|
126
|
+
parameters: [{ id: "low" }, { id: "high" }],
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
documentation: "Round value to nearest integral number",
|
|
130
|
+
id: "round",
|
|
131
|
+
parameters: [{ id: "value" }],
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
documentation: "Sine (in degrees) of value",
|
|
135
|
+
id: "sin",
|
|
136
|
+
parameters: [{ id: "value" }],
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
documentation: "Square root of value",
|
|
140
|
+
id: "sqrt",
|
|
141
|
+
parameters: [{ id: "value" }],
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
documentation: "Round value towards zero",
|
|
145
|
+
id: "trunc",
|
|
146
|
+
parameters: [{ id: "value" }],
|
|
147
|
+
},
|
|
49
148
|
];
|
|
50
149
|
/**The collection of queries*/
|
|
51
150
|
General.Queries = [
|
|
52
|
-
{
|
|
151
|
+
{
|
|
152
|
+
documentation: "Gets specified axis of the specified bone orientation pivot",
|
|
153
|
+
id: "get_default_bone_pivot",
|
|
154
|
+
},
|
|
53
155
|
{
|
|
54
156
|
documentation: "Returns 1.0 if the entity is in contact with any water (water, rain, splash water bottle), else it returns 0.0",
|
|
55
157
|
id: "is_in_contact_with_water",
|
|
56
158
|
},
|
|
57
|
-
{
|
|
58
|
-
|
|
59
|
-
|
|
159
|
+
{
|
|
160
|
+
documentation: "Returns 1.0 if the entity is playing dead, else it returns 0.0",
|
|
161
|
+
id: "is_playing_dead",
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
documentation: "Returns the height of the block immediately above the highest solid block at the input (x,z) position",
|
|
165
|
+
id: "above_top_solid",
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
documentation: "Returns the number of actors rendered in the last frame",
|
|
169
|
+
id: "actor_count",
|
|
170
|
+
},
|
|
60
171
|
{
|
|
61
172
|
documentation: "Only valid in an animation controller. Returns 1.0 if all animations in the current animation controller state have played through at least once, else it returns 0.0",
|
|
62
173
|
id: "all_animations_finished",
|
|
63
174
|
},
|
|
64
|
-
{
|
|
65
|
-
|
|
175
|
+
{
|
|
176
|
+
documentation: "Returns if the item or block has all of the tags specified",
|
|
177
|
+
id: "all_tags",
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
documentation: "Returns the time in seconds since the current animation started, else 0.0 if not called within an animation",
|
|
181
|
+
id: "anim_time",
|
|
182
|
+
},
|
|
66
183
|
{
|
|
67
184
|
documentation: "Only valid in an animation controller. Returns 1.0 if any animation in the current animation controller state has played through at least once, else it returns 0.0",
|
|
68
185
|
id: "any_animation_finished",
|
|
69
186
|
},
|
|
70
|
-
{
|
|
71
|
-
|
|
72
|
-
|
|
187
|
+
{
|
|
188
|
+
documentation: "Returns if the item or block has any of the tags specified",
|
|
189
|
+
id: "any_tag",
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
documentation: "Returns 1.0 if all of the arguments are within 0.000000 of each other, else 0.0",
|
|
193
|
+
id: "approx_eq",
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
documentation: "Takes the armor slot index as a parameter, and returns the color of the armor in the requested slot",
|
|
197
|
+
id: "armor_color_slot",
|
|
198
|
+
},
|
|
73
199
|
{
|
|
74
200
|
documentation: "Takes the armor slot index as a parameter, and returns the armor material type in the requested armor slot",
|
|
75
201
|
id: "armor_material_slot",
|
|
76
202
|
},
|
|
77
|
-
{
|
|
203
|
+
{
|
|
204
|
+
documentation: "Takes the armor slot index as a parameter, and returns the texture type of the requested slot",
|
|
205
|
+
id: "armor_texture_slot",
|
|
206
|
+
},
|
|
78
207
|
{
|
|
79
208
|
documentation: "Returns the time in *seconds* of the average frame time over the last 'n' frames. If an argument is passed, it is assumed to be the number of frames in the past that you wish to query. `query.average_frame_time` (or the equivalent `query.average_frame_time(0)`) will return the frame time of the frame before the current one. `query.average_frame_time(1)` will return the average frame time of the previous two frames. Currently we store the history of the last 30 frames, although note that this may change in the future. Asking for more frames will result in only sampling the number of frames stored.",
|
|
80
209
|
id: "average_frame_time",
|
|
@@ -83,10 +212,22 @@ var General;
|
|
|
83
212
|
documentation: "Returns the block face for this (only valid for certain triggers such as placing blocks, or interacting with block) (Down=0.0, Up=1.0, North=2.0, South=3.0, West=4.0, East=5.0, Undefined=6.0).",
|
|
84
213
|
id: "block_face",
|
|
85
214
|
},
|
|
86
|
-
{
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
215
|
+
{
|
|
216
|
+
documentation: "Returns the value of the associated Blocks Block State",
|
|
217
|
+
id: "block_property",
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
documentation: "Returns 1.0 if the entity is blocking, else it returns 0.0",
|
|
221
|
+
id: "blocking",
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
documentation: "Returns the body pitch rotation if called on an actor, else it returns 0.0",
|
|
225
|
+
id: "body_x_rotation",
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
documentation: "Returns the body yaw rotation if called on an actor, else it returns 0.0",
|
|
229
|
+
id: "body_y_rotation",
|
|
230
|
+
},
|
|
90
231
|
{
|
|
91
232
|
documentation: "Takes two distances (any order) and return a number from 0 to 1 based on the camera distance between the two ranges clamped to that range. For example, `query.camera_distance_range_lerp(10, 20)` will return 0 for any distance less than or equal to 10, 0.2 for a distance of 12, 0.5 for 15, and 1 for 20 or greater. If you pass in (20, 10), a distance of 20 will return 0.0",
|
|
92
233
|
id: "camera_distance_range_lerp",
|
|
@@ -95,26 +236,50 @@ var General;
|
|
|
95
236
|
documentation: "Returns the rotation of the camera. Requires one argument representing the rotation axis you would like (`0 for x`, `1 for y`)",
|
|
96
237
|
id: "camera_rotation",
|
|
97
238
|
},
|
|
98
|
-
{
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
{
|
|
103
|
-
|
|
239
|
+
{
|
|
240
|
+
documentation: "Returns 1.0 if the entity can climb, else it returns 0.0",
|
|
241
|
+
id: "can_climb",
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
documentation: "Returns 1.0 if the entity can damage nearby mobs, else it returns 0.0",
|
|
245
|
+
id: "can_damage_nearby_mobs",
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
documentation: "Returns 1.0 if the entity can fly, else it returns 0.0",
|
|
249
|
+
id: "can_fly",
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
documentation: "Returns 1.0 if the entity can power jump, else it returns 0.0",
|
|
253
|
+
id: "can_power_jump",
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
documentation: "Returns 1.0 if the entity can swim, else it returns 0.0",
|
|
257
|
+
id: "can_swim",
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
documentation: "Returns 1.0 if the entity can walk, else it returns 0.0",
|
|
261
|
+
id: "can_walk",
|
|
262
|
+
},
|
|
104
263
|
{
|
|
105
264
|
documentation: "Returns the axis aligned bounding box of a bone as a struct with members '.min', '.max', along with '.x', '.y', and '.z' values for each.",
|
|
106
265
|
id: "bone_aabb",
|
|
107
266
|
},
|
|
108
|
-
{
|
|
267
|
+
{
|
|
268
|
+
documentation: "Returns the initial (from the .geo) pivot of a bone as a struct with members '.x', '.y', and '.z'.",
|
|
269
|
+
id: "bone_origin",
|
|
270
|
+
},
|
|
109
271
|
{
|
|
110
272
|
documentation: "Returns the initial (from the .geo) rotation of a bone as a struct with members '.x', '.y', and '.z' in degrees.",
|
|
111
273
|
id: "bone_rotation",
|
|
112
274
|
},
|
|
113
|
-
{ documentation: "returns value between 0.0 and 1.0 with 0.0 meaning cape is fully down and 1.0 is cape is fully up", id: "cape_flap_amount" },
|
|
114
275
|
{
|
|
115
|
-
documentation: "
|
|
116
|
-
id: "
|
|
276
|
+
documentation: "returns value between 0.0 and 1.0 with 0.0 meaning cape is fully down and 1.0 is cape is fully up",
|
|
277
|
+
id: "cape_flap_amount",
|
|
117
278
|
},
|
|
279
|
+
/*{
|
|
280
|
+
documentation: "DEPRECATED (please use query.block_face instead) Returns the block face for this (only valid for on_placed_by_player trigger) (Down=0.0, Up=1.0, North=2.0, South=3.0, West=4.0, East=5.0, Undefined=6.0).",
|
|
281
|
+
id: "cardinal_block_face_placed_on",
|
|
282
|
+
},*/
|
|
118
283
|
{
|
|
119
284
|
documentation: "Returns the current facing of the player (Down=0.0, Up=1.0, North=2.0, South=3.0, West=4.0, East=5.0, Undefined=6.0).",
|
|
120
285
|
id: "cardinal_facing",
|
|
@@ -135,15 +300,42 @@ var General;
|
|
|
135
300
|
documentation: "Counts the number of things passed to it (arrays are counted as the number of elements they contain; non-arrays count as 1).",
|
|
136
301
|
id: "count",
|
|
137
302
|
},
|
|
138
|
-
{
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
{
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
{
|
|
303
|
+
{
|
|
304
|
+
documentation: "Returns the squish value for the current entity, or 0.0 if this doesn't make sense",
|
|
305
|
+
id: "current_squish_value",
|
|
306
|
+
},
|
|
307
|
+
{
|
|
308
|
+
documentation: "Returns the day of the current level.",
|
|
309
|
+
id: "day",
|
|
310
|
+
},
|
|
311
|
+
{
|
|
312
|
+
documentation: "debug log a value to the output debug window for builds that have one",
|
|
313
|
+
id: "debug_output",
|
|
314
|
+
},
|
|
315
|
+
{
|
|
316
|
+
documentation: "Returns the elapsed ticks since the mob started dying.",
|
|
317
|
+
id: "death_ticks",
|
|
318
|
+
},
|
|
319
|
+
{
|
|
320
|
+
documentation: "Returns the time in seconds since the previous frame",
|
|
321
|
+
id: "delta_time",
|
|
322
|
+
},
|
|
323
|
+
{
|
|
324
|
+
documentation: "Returns the distance of the root of this actor or particle emitter from the camera",
|
|
325
|
+
id: "distance_from_camera",
|
|
326
|
+
},
|
|
327
|
+
{
|
|
328
|
+
documentation: "Returns the total number of active emitters of the callee's particle effect type",
|
|
329
|
+
id: "effect_emitter_count",
|
|
330
|
+
},
|
|
331
|
+
{
|
|
332
|
+
documentation: "Returns the total number of active particles of the callee's particle effect type",
|
|
333
|
+
id: "effect_particle_count",
|
|
334
|
+
},
|
|
335
|
+
{
|
|
336
|
+
documentation: "returns the equipment count for an actor",
|
|
337
|
+
id: "equipment_count",
|
|
338
|
+
},
|
|
147
339
|
{
|
|
148
340
|
documentation: "takes a slot name followed by any tag you want to check for in the form of 'tag_name' and returns 1 if all of the tags are on that equipped item, 0 otherwise",
|
|
149
341
|
id: "equipped_item_all_tags",
|
|
@@ -156,37 +348,94 @@ var General;
|
|
|
156
348
|
documentation: "Takes the desired hand slot as a parameter (0 or 'main_hand' for main hand, 1 or 'off_hand' for off hand), and returns whether the item is an attachable or not.",
|
|
157
349
|
id: "equipped_item_is_attachable",
|
|
158
350
|
},
|
|
159
|
-
{
|
|
160
|
-
|
|
161
|
-
|
|
351
|
+
{
|
|
352
|
+
documentation: "returns the X eye rotation of the entity if it makes sense, else it returns 0.0",
|
|
353
|
+
id: "eye_target_x_rotation",
|
|
354
|
+
},
|
|
355
|
+
{
|
|
356
|
+
documentation: "returns the Y eye rotation of the entity if it makes sense, else it returns 0.0",
|
|
357
|
+
id: "eye_target_y_rotation",
|
|
358
|
+
},
|
|
359
|
+
{
|
|
360
|
+
documentation: "Returns the ratio (from 0 to 1) of how much between AI ticks this frame is being rendered",
|
|
361
|
+
id: "frame_alpha",
|
|
362
|
+
},
|
|
162
363
|
{
|
|
163
364
|
documentation: "Returns 1.0 if the entity is attacking from range (i.e. minecraft:behavior.ranged_attack), else it returns 0.0",
|
|
164
365
|
id: "facing_target_to_range_attack",
|
|
165
366
|
},
|
|
166
|
-
{
|
|
167
|
-
|
|
367
|
+
{
|
|
368
|
+
documentation: "Returns the integer id of an actor by its string name",
|
|
369
|
+
id: "get_actor_info_id",
|
|
370
|
+
},
|
|
371
|
+
{
|
|
372
|
+
documentation: "Returns the current texture of the item",
|
|
373
|
+
id: "get_animation_frame",
|
|
374
|
+
},
|
|
168
375
|
{
|
|
169
376
|
documentation: "takes one optional hand slot as a parameter (0 or 'main_hand' for main hand, 1 or 'off_hand' for off hand), and a second parameter (0=default) if you would like the equipped item or any non-zero number for the currently rendered item, and returns the name of the item in the requested slot (defaulting to the main hand if no parameter is supplied) if there is one, otherwise returns ''.",
|
|
170
377
|
id: "get_equipped_item_name",
|
|
171
378
|
},
|
|
172
|
-
{
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
{
|
|
379
|
+
{
|
|
380
|
+
documentation: "Gets specified axis of the specified locator offset",
|
|
381
|
+
id: "get_locator_offset",
|
|
382
|
+
},
|
|
383
|
+
{
|
|
384
|
+
documentation: "get the name of the mob if there is one, otherwise return ''",
|
|
385
|
+
id: "get_name",
|
|
386
|
+
},
|
|
387
|
+
{
|
|
388
|
+
documentation: "Gets specified axis of the specified locator offset of the root model",
|
|
389
|
+
id: "get_root_locator_offset",
|
|
390
|
+
},
|
|
391
|
+
{
|
|
392
|
+
documentation: "Returns the ground speed of the entity in metres/second",
|
|
393
|
+
id: "ground_speed",
|
|
394
|
+
},
|
|
395
|
+
{
|
|
396
|
+
documentation: "Returns 1 if the entity has any of the specified families, else 0.",
|
|
397
|
+
id: "has_any_family",
|
|
398
|
+
},
|
|
177
399
|
{
|
|
178
400
|
documentation: "Takes the armor slot index as a parameter, and returns 1.0 if the entity has armor in the requested slot, else it returns 0.0",
|
|
179
401
|
id: "has_armor_slot",
|
|
180
402
|
},
|
|
181
|
-
{
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
{
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
{
|
|
403
|
+
{
|
|
404
|
+
documentation: "Returns whether or not a Block Placement Target has a specific biome tag",
|
|
405
|
+
id: "has_biome_tag",
|
|
406
|
+
},
|
|
407
|
+
{
|
|
408
|
+
documentation: "Returns 1.0 if the associated block has the given block property or 0.0 if not",
|
|
409
|
+
id: "has_block_property",
|
|
410
|
+
},
|
|
411
|
+
{
|
|
412
|
+
documentation: "Returns 1.0 if the player has a cape, else it returns 0.0",
|
|
413
|
+
id: "has_cape",
|
|
414
|
+
},
|
|
415
|
+
{
|
|
416
|
+
documentation: "Returns 1.0 if the entity has collisions enabled, else it returns 0.0",
|
|
417
|
+
id: "has_collision",
|
|
418
|
+
},
|
|
419
|
+
{
|
|
420
|
+
documentation: "Returns 1.0 if the entity is affected by gravity, else it returns 0.0",
|
|
421
|
+
id: "has_gravity",
|
|
422
|
+
},
|
|
423
|
+
{
|
|
424
|
+
documentation: "Returns true if the entity has an owner ID else it returns false",
|
|
425
|
+
id: "has_owner",
|
|
426
|
+
},
|
|
427
|
+
{
|
|
428
|
+
documentation: "Returns 1.0 if the entity has a rider, else it returns 0.0",
|
|
429
|
+
id: "has_rider",
|
|
430
|
+
},
|
|
431
|
+
{
|
|
432
|
+
documentation: "Returns 1.0 if the entity has a target, else it returns 0.0",
|
|
433
|
+
id: "has_target",
|
|
434
|
+
},
|
|
435
|
+
{
|
|
436
|
+
documentation: "returns the roll angle of the head of the entity if it makes sense, else it returns 0.0",
|
|
437
|
+
id: "head_roll_angle",
|
|
438
|
+
},
|
|
190
439
|
{
|
|
191
440
|
documentation: "Takes one argument as a parameter. Returns the nth head x rotation of the entity if it makes sense, else it returns 0.0",
|
|
192
441
|
id: "head_x_rotation",
|
|
@@ -195,100 +444,347 @@ var General;
|
|
|
195
444
|
documentation: "Takes one argument as a parameter. Returns the nth head y rotation of the entity if it makes sense, else it returns 0.0",
|
|
196
445
|
id: "head_y_rotation",
|
|
197
446
|
},
|
|
198
|
-
{
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
447
|
+
{
|
|
448
|
+
documentation: "Returns the health of the entity, or 0.0 if it doesn't make sense to call on this entity.",
|
|
449
|
+
id: "health",
|
|
450
|
+
},
|
|
451
|
+
{
|
|
452
|
+
documentation: "Queries Height Map",
|
|
453
|
+
id: "heightmap",
|
|
454
|
+
},
|
|
455
|
+
{
|
|
456
|
+
documentation: "returns the hurt direction for the actor, otherwise returns 0",
|
|
457
|
+
id: "hurt_direction",
|
|
458
|
+
},
|
|
459
|
+
{
|
|
460
|
+
documentation: "returns the hurt time for the actor, otherwise returns 0",
|
|
461
|
+
id: "hurt_time",
|
|
462
|
+
},
|
|
202
463
|
{
|
|
203
464
|
documentation: "Returns the number of ticks of invulnerability the entity has left if it makes sense, else it returns 0.0",
|
|
204
465
|
id: "invulnerable_ticks",
|
|
205
466
|
},
|
|
206
|
-
{
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
{
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
{
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
{
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
{
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
{
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
{
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
{
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
{
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
{
|
|
467
|
+
{
|
|
468
|
+
documentation: "Returns 1.0 if the entity is admiring, else it returns 0.0",
|
|
469
|
+
id: "is_admiring",
|
|
470
|
+
},
|
|
471
|
+
{
|
|
472
|
+
documentation: "returns 1.0 if the entity is alive, and 0.0 if it's dead",
|
|
473
|
+
id: "is_alive",
|
|
474
|
+
},
|
|
475
|
+
{
|
|
476
|
+
documentation: "Returns 1.0 if the entity is angry, else it returns 0.0",
|
|
477
|
+
id: "is_angry",
|
|
478
|
+
},
|
|
479
|
+
{
|
|
480
|
+
documentation: "Returns 1.0 if the actor is attached to an entity, else it will return 0.0",
|
|
481
|
+
id: "is_attached_to_entity",
|
|
482
|
+
},
|
|
483
|
+
{
|
|
484
|
+
documentation: "Returns 1.0 if the entity is fleeing from a block, else it returns 0.0",
|
|
485
|
+
id: "is_avoiding_block",
|
|
486
|
+
},
|
|
487
|
+
{
|
|
488
|
+
documentation: "Returns 1.0 if the entity is fleeing from mobs, else it returns 0.0",
|
|
489
|
+
id: "is_avoiding_mobs",
|
|
490
|
+
},
|
|
491
|
+
{
|
|
492
|
+
documentation: "Returns 1.0 if the entity is a baby, else it returns 0.0",
|
|
493
|
+
id: "is_baby",
|
|
494
|
+
},
|
|
495
|
+
{
|
|
496
|
+
documentation: "Returns 1.0 if the entity is breathing, else it returns 0.0",
|
|
497
|
+
id: "is_breathing",
|
|
498
|
+
},
|
|
499
|
+
{
|
|
500
|
+
documentation: "Returns 1.0 if the entity has been bribed, else it returns 0.0",
|
|
501
|
+
id: "is_bribed",
|
|
502
|
+
},
|
|
503
|
+
{
|
|
504
|
+
documentation: "Returns 1.0 if the entity is carrying a block, else it returns 0.0",
|
|
505
|
+
id: "is_carrying_block",
|
|
506
|
+
},
|
|
507
|
+
{
|
|
508
|
+
documentation: "Returns 1.0 if the entity is casting, else it returns 0.0",
|
|
509
|
+
id: "is_casting",
|
|
510
|
+
},
|
|
511
|
+
{
|
|
512
|
+
documentation: "Returns 1.0 if the entity is celebrating, else it returns 0.0",
|
|
513
|
+
id: "is_celebrating",
|
|
514
|
+
},
|
|
515
|
+
{
|
|
516
|
+
documentation: "Returns 1.0 if the entity is doing a special celebration, else it returns 0.0",
|
|
517
|
+
id: "is_celebrating_special",
|
|
518
|
+
},
|
|
519
|
+
{
|
|
520
|
+
documentation: "Returns 1.0 if the entity is charged, else it returns 0.0",
|
|
521
|
+
id: "is_charged",
|
|
522
|
+
},
|
|
523
|
+
{
|
|
524
|
+
documentation: "Returns 1.0 if the entity is charging, else it returns 0.0",
|
|
525
|
+
id: "is_charging",
|
|
526
|
+
},
|
|
527
|
+
{
|
|
528
|
+
documentation: "Returns 1.0 if the entity has chests attached to it, else it returns 0.0",
|
|
529
|
+
id: "is_chested",
|
|
530
|
+
},
|
|
531
|
+
{
|
|
532
|
+
documentation: "Returns 1.0 if the entity is critical, else it returns 0.0",
|
|
533
|
+
id: "is_critical",
|
|
534
|
+
},
|
|
535
|
+
{
|
|
536
|
+
documentation: "Returns 1.0 if the entity is dancing, else it returns 0.0",
|
|
537
|
+
id: "is_dancing",
|
|
538
|
+
},
|
|
539
|
+
{
|
|
540
|
+
documentation: "returns 1.0 if the entity is attacking using the delayed attack, else it returns 0.0",
|
|
541
|
+
id: "is_delayed_attacking",
|
|
542
|
+
},
|
|
543
|
+
{
|
|
544
|
+
documentation: "Returns 1.0 if the entity is eating, else it returns 0.0",
|
|
545
|
+
id: "is_eating",
|
|
546
|
+
},
|
|
547
|
+
{
|
|
548
|
+
documentation: "Returns 1.0 if the entity is an elder version of it, else it returns 0.0",
|
|
549
|
+
id: "is_elder",
|
|
550
|
+
},
|
|
551
|
+
{
|
|
552
|
+
documentation: "Returns 1.0 if the entity is emoting, else it returns 0.0",
|
|
553
|
+
id: "is_emoting",
|
|
554
|
+
},
|
|
555
|
+
{
|
|
556
|
+
documentation: "Returns 1.0 if the entity is enchanted, else it returns 0.0",
|
|
557
|
+
id: "is_enchanted",
|
|
558
|
+
},
|
|
559
|
+
{
|
|
560
|
+
documentation: "Returns 1.0 if the entity is immune to fire, else it returns 0.0",
|
|
561
|
+
id: "is_fire_immune",
|
|
562
|
+
},
|
|
563
|
+
{
|
|
564
|
+
documentation: "Returns 1.0 if the entity is being rendered in first person mode, else it returns 0.0",
|
|
565
|
+
id: "is_first_person",
|
|
566
|
+
},
|
|
567
|
+
{
|
|
568
|
+
documentation: "returns 1.0 if an entity is a ghost, else it returns 0.0",
|
|
569
|
+
id: "is_ghost",
|
|
570
|
+
},
|
|
571
|
+
{
|
|
572
|
+
documentation: "Returns 1.0 if the entity is gliding, else it returns 0.0",
|
|
573
|
+
id: "is_gliding",
|
|
574
|
+
},
|
|
575
|
+
{
|
|
576
|
+
documentation: "Returns 1.0 if the entity is grazing, or 0.0 if not",
|
|
577
|
+
id: "is_grazing",
|
|
578
|
+
},
|
|
579
|
+
{
|
|
580
|
+
documentation: "Returns 1.0 if the entity is idling, else it returns 0.0",
|
|
581
|
+
id: "is_idling",
|
|
582
|
+
},
|
|
583
|
+
{
|
|
584
|
+
documentation: "Returns 1.0 if the entity is ignited, else it returns 0.0",
|
|
585
|
+
id: "is_ignited",
|
|
586
|
+
},
|
|
587
|
+
{
|
|
588
|
+
documentation: "Returns 1.0 if the entity is an illager captain, else it returns 0.0",
|
|
589
|
+
id: "is_illager_captain",
|
|
590
|
+
},
|
|
591
|
+
{
|
|
592
|
+
documentation: "Returns 1.0 if the entity is in love, else it returns 0.0",
|
|
593
|
+
id: "is_in_love",
|
|
594
|
+
},
|
|
595
|
+
{
|
|
596
|
+
documentation: "Returns 1.0 if the entity is rendered as part of the UI, else it returns 0.0",
|
|
597
|
+
id: "is_in_ui",
|
|
598
|
+
},
|
|
599
|
+
{
|
|
600
|
+
documentation: "Returns 1.0 if the entity is in water, else it returns 0.0",
|
|
601
|
+
id: "is_in_water",
|
|
602
|
+
},
|
|
603
|
+
{
|
|
604
|
+
documentation: "Returns 1.0 if the entity is in water or rain, else it returns 0.0",
|
|
605
|
+
id: "is_in_water_or_rain",
|
|
606
|
+
},
|
|
607
|
+
{
|
|
608
|
+
documentation: "Returns 1.0 if the entity is interested, else it returns 0.0",
|
|
609
|
+
id: "is_interested",
|
|
610
|
+
},
|
|
611
|
+
{
|
|
612
|
+
documentation: "Returns 1.0 if the entity is invisible, else it returns 0.0",
|
|
613
|
+
id: "is_invisible",
|
|
614
|
+
},
|
|
243
615
|
{
|
|
244
616
|
documentation: "takes one optional hand slot as a parameter (0 or 'main_hand' for main hand, 1 or 'off_hand' for off hand), and returns 1.0 if there is an item in the requested slot (defaulting to the main hand if no parameter is supplied), otherwise returns 0.0.",
|
|
245
617
|
id: "is_item_equipped",
|
|
618
|
+
parameters: [{ id: "slot", documentation: "0 or 'main_hand' for main hand, 1 or 'off_hand' for off hand" }],
|
|
619
|
+
},
|
|
620
|
+
{
|
|
621
|
+
documentation: "Returns 1.0 if the entity is in water or rain, else it returns 0.0",
|
|
622
|
+
id: "is_jumping",
|
|
623
|
+
},
|
|
624
|
+
{
|
|
625
|
+
documentation: "Returns 1.0 if the entity is laying down, else it returns 0.0",
|
|
626
|
+
id: "is_laying_down",
|
|
627
|
+
},
|
|
628
|
+
{
|
|
629
|
+
documentation: "Returns 1.0 if the entity is laying an egg, else it returns 0.0",
|
|
630
|
+
id: "is_laying_egg",
|
|
631
|
+
},
|
|
632
|
+
{
|
|
633
|
+
documentation: "Returns 1.0 if the entity is leashed to something, else it returns 0.0",
|
|
634
|
+
id: "is_leashed",
|
|
635
|
+
},
|
|
636
|
+
{
|
|
637
|
+
documentation: "Returns 1.0 if the entity is levitating, else it returns 0.0",
|
|
638
|
+
id: "is_levitating",
|
|
639
|
+
},
|
|
640
|
+
{
|
|
641
|
+
documentation: "Returns 1.0 if the entity is lingering, else it returns 0.0",
|
|
642
|
+
id: "is_lingering",
|
|
643
|
+
},
|
|
644
|
+
{
|
|
645
|
+
documentation: "Returns 1.0 if the entity is moving, else it returns 0.0",
|
|
646
|
+
id: "is_moving",
|
|
647
|
+
},
|
|
648
|
+
{
|
|
649
|
+
documentation: "returns 1.0 if the entity is on fire, else it returns 0.0",
|
|
650
|
+
id: "is_on_fire",
|
|
651
|
+
},
|
|
652
|
+
{
|
|
653
|
+
documentation: "Returns 1.0 if the entity is on the ground, else it returns 0.0",
|
|
654
|
+
id: "is_on_ground",
|
|
246
655
|
},
|
|
247
|
-
{ documentation: "Returns 1.0 if the entity is in water or rain, else it returns 0.0", id: "is_jumping" },
|
|
248
|
-
{ documentation: "Returns 1.0 if the entity is laying down, else it returns 0.0", id: "is_laying_down" },
|
|
249
|
-
{ documentation: "Returns 1.0 if the entity is laying an egg, else it returns 0.0", id: "is_laying_egg" },
|
|
250
|
-
{ documentation: "Returns 1.0 if the entity is leashed to something, else it returns 0.0", id: "is_leashed" },
|
|
251
|
-
{ documentation: "Returns 1.0 if the entity is levitating, else it returns 0.0", id: "is_levitating" },
|
|
252
|
-
{ documentation: "Returns 1.0 if the entity is lingering, else it returns 0.0", id: "is_lingering" },
|
|
253
|
-
{ documentation: "Returns 1.0 if the entity is moving, else it returns 0.0", id: "is_moving" },
|
|
254
|
-
{ documentation: "returns 1.0 if the entity is on fire, else it returns 0.0", id: "is_on_fire" },
|
|
255
|
-
{ documentation: "Returns 1.0 if the entity is on the ground, else it returns 0.0", id: "is_on_ground" },
|
|
256
656
|
{
|
|
257
657
|
documentation: "returns 1.0 if this is called on an entity at a time when it is known if it is on screen, else it returns 0.0",
|
|
258
658
|
id: "is_on_screen",
|
|
259
659
|
},
|
|
260
|
-
{
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
{
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
{
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
{
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
{
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
{
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
{
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
{
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
660
|
+
{
|
|
661
|
+
documentation: "Returns 1.0 if the entity is on fire, else it returns 0.0",
|
|
662
|
+
id: "is_onfire",
|
|
663
|
+
},
|
|
664
|
+
{
|
|
665
|
+
documentation: "Returns 1.0 if the entity is orphaned, else it returns 0.0",
|
|
666
|
+
id: "is_orphaned",
|
|
667
|
+
},
|
|
668
|
+
{
|
|
669
|
+
documentation: "Returns 1.0 if the player has a persona or permium skin, else it returns 0.0",
|
|
670
|
+
id: "is_persona_or_premium_skin",
|
|
671
|
+
},
|
|
672
|
+
{
|
|
673
|
+
documentation: "Returns 1.0 if the entity is powered, else it returns 0.0",
|
|
674
|
+
id: "is_powered",
|
|
675
|
+
},
|
|
676
|
+
{
|
|
677
|
+
documentation: "Returns 1.0 if the entity is pregnant, else it returns 0.0",
|
|
678
|
+
id: "is_pregnant",
|
|
679
|
+
},
|
|
680
|
+
{
|
|
681
|
+
documentation: "Returns 1.0 if the entity is using a ram attack, else it returns 0.0",
|
|
682
|
+
id: "is_ram_attacking",
|
|
683
|
+
},
|
|
684
|
+
{
|
|
685
|
+
documentation: "Returns 1.0 if the entity is resting, else it returns 0.0",
|
|
686
|
+
id: "is_resting",
|
|
687
|
+
},
|
|
688
|
+
{
|
|
689
|
+
documentation: "Returns 1.0 if the entity is riding, else it returns 0.0",
|
|
690
|
+
id: "is_riding",
|
|
691
|
+
},
|
|
692
|
+
{
|
|
693
|
+
documentation: "returns 1.0 if the entity is currently roaring, else it returns 0.0",
|
|
694
|
+
id: "is_roaring",
|
|
695
|
+
},
|
|
696
|
+
{
|
|
697
|
+
documentation: "Returns 1.0 if the entity is rolling, else it returns 0.0",
|
|
698
|
+
id: "is_rolling",
|
|
699
|
+
},
|
|
700
|
+
{
|
|
701
|
+
documentation: "Returns 1.0 if the entity has a saddle, else it returns 0.0",
|
|
702
|
+
id: "is_saddled",
|
|
703
|
+
},
|
|
704
|
+
{
|
|
705
|
+
documentation: "Returns 1.0 if the entity is scared, else it returns 0.0",
|
|
706
|
+
id: "is_scared",
|
|
707
|
+
},
|
|
708
|
+
{
|
|
709
|
+
documentation: "returns true if the player has selected an item in the inventory, else it returns 0.0",
|
|
710
|
+
id: "is_selected_item",
|
|
711
|
+
},
|
|
712
|
+
{
|
|
713
|
+
documentation: "Returns 1.0 if the entity is casting, else it returns 0.0",
|
|
714
|
+
id: "is_shaking",
|
|
715
|
+
},
|
|
716
|
+
{
|
|
717
|
+
documentation: "returns 1.0 if the entity is shaking water off, else it returns 0.0",
|
|
718
|
+
id: "is_shaking_wetness",
|
|
719
|
+
},
|
|
720
|
+
{
|
|
721
|
+
documentation: "Returns 1.0 if the entity is able to be sheared and is sheared, else it returns 0.0",
|
|
722
|
+
id: "is_sheared",
|
|
723
|
+
},
|
|
724
|
+
{
|
|
725
|
+
documentation: "Returns 1.0f if the entity has an active powered shield if it makes sense, else it returns 0.0",
|
|
726
|
+
id: "is_shield_powered",
|
|
727
|
+
},
|
|
728
|
+
{
|
|
729
|
+
documentation: "Returns 1.0 if the entity is silent, else it returns 0.0",
|
|
730
|
+
id: "is_silent",
|
|
731
|
+
},
|
|
732
|
+
{
|
|
733
|
+
documentation: "Returns 1.0 if the entity is sitting, else it returns 0.0",
|
|
734
|
+
id: "is_sitting",
|
|
735
|
+
},
|
|
736
|
+
{
|
|
737
|
+
documentation: "Returns 1.0 if the entity is sleeping, else it returns 0.0",
|
|
738
|
+
id: "is_sleeping",
|
|
739
|
+
},
|
|
740
|
+
{
|
|
741
|
+
documentation: "Returns 1.0 if the entity is sneaking, else it returns 0.0",
|
|
742
|
+
id: "is_sneaking",
|
|
743
|
+
},
|
|
744
|
+
{
|
|
745
|
+
documentation: "Returns 1.0 if the entity is sneezing, else it returns 0.0",
|
|
746
|
+
id: "is_sneezing",
|
|
747
|
+
},
|
|
748
|
+
{
|
|
749
|
+
documentation: "Returns 1.0 if the entity is sprinting, else it returns 0.0",
|
|
750
|
+
id: "is_sprinting",
|
|
751
|
+
},
|
|
752
|
+
{
|
|
753
|
+
documentation: "Returns 1.0 if the entity is stackable, else it returns 0.0",
|
|
754
|
+
id: "is_stackable",
|
|
755
|
+
},
|
|
756
|
+
{
|
|
757
|
+
documentation: "Returns 1.0 if the entity is stalking, else it returns 0.0",
|
|
758
|
+
id: "is_stalking",
|
|
759
|
+
},
|
|
760
|
+
{
|
|
761
|
+
documentation: "Returns 1.0 if the entity is standing, else it returns 0.0",
|
|
762
|
+
id: "is_standing",
|
|
763
|
+
},
|
|
764
|
+
{
|
|
765
|
+
documentation: "returns 1.0 if the entity is currently stunned, else it returns 0.0",
|
|
766
|
+
id: "is_stunned",
|
|
767
|
+
},
|
|
768
|
+
{
|
|
769
|
+
documentation: "Returns 1.0 if the entity is swimming, else it returns 0.0",
|
|
770
|
+
id: "is_swimming",
|
|
771
|
+
},
|
|
772
|
+
{
|
|
773
|
+
documentation: "Returns 1.0 if the entity is tamed, else it returns 0.0",
|
|
774
|
+
id: "is_tamed",
|
|
775
|
+
},
|
|
776
|
+
{
|
|
777
|
+
documentation: "Returns 1.0 if the entity is transforming, else it returns 0.0",
|
|
778
|
+
id: "is_transforming",
|
|
779
|
+
},
|
|
780
|
+
{
|
|
781
|
+
documentation: "Returns 1.0 if the entity is using an item, else it returns 0.0",
|
|
782
|
+
id: "is_using_item",
|
|
783
|
+
},
|
|
784
|
+
{
|
|
785
|
+
documentation: "Returns 1.0 if the entity is climbing a wall, else it returns 0.0",
|
|
786
|
+
id: "is_wall_climbing",
|
|
787
|
+
},
|
|
292
788
|
{
|
|
293
789
|
documentation: "Returns the amount of time an item has been in use in seconds up to the maximum duration, else 0.0 if it doesn't make sense",
|
|
294
790
|
id: "item_in_use_duration",
|
|
@@ -296,8 +792,12 @@ var General;
|
|
|
296
792
|
{
|
|
297
793
|
documentation: "takes one optional hand slot as a parameter (0 or 'main_hand' for main hand, 1 or `off_hand` for off hand), and returns 1.0 if the item is charged in the requested slot (defaulting to the main hand if no parameter is supplied), otherwise returns 0.0.",
|
|
298
794
|
id: "item_is_charged",
|
|
795
|
+
parameters: [{ id: "slot", documentation: "0 or 'main_hand' for main hand, 1 or 'off_hand' for off hand" }],
|
|
796
|
+
},
|
|
797
|
+
{
|
|
798
|
+
documentation: "Returns the maximum amount of time the item can be used, else 0.0 if it doesn't make sense",
|
|
799
|
+
id: "item_max_use_duration",
|
|
299
800
|
},
|
|
300
|
-
{ documentation: "Returns the maximum amount of time the item can be used, else 0.0 if it doesn't make sense", id: "item_max_use_duration" },
|
|
301
801
|
{
|
|
302
802
|
documentation: "Returns the amount of time an item has left to use, else 0.0 if it doesn't make sense. Item queried is specified by the slot name `main_hand` or `off_hand`. Time remaining is normalized using the normalization value, only if one is given, else it is returned in seconds.",
|
|
303
803
|
id: "item_remaining_use_duration",
|
|
@@ -306,7 +806,10 @@ var General;
|
|
|
306
806
|
documentation: "query.item_slot_to_bone_name requires one parameter: the name of the equipment slot. This id returns the name of the bone this entity has mapped to that slot.",
|
|
307
807
|
id: "item_slot_to_bone_name",
|
|
308
808
|
},
|
|
309
|
-
{
|
|
809
|
+
{
|
|
810
|
+
documentation: "Returns the ratio between the previous and next key frames",
|
|
811
|
+
id: "key_frame_lerp_time",
|
|
812
|
+
},
|
|
310
813
|
{
|
|
311
814
|
documentation: "Returns the time in *seconds* of the last frame. If an argument is passed, it is assumed to be the number of frames in the past that you wish to query. 'query.last_frame_time' (or the equivalent 'query.last_frame_time(0)') will return the frame time of the frame before the current one. 'query.last_frame_time(1)' will return the frame time of two frames ago. Currently we store the history of the last 30 frames, although note that this may change in the future. Passing an index more than the available data will return the oldest frame stored.",
|
|
312
815
|
id: "last_frame_time",
|
|
@@ -315,23 +818,50 @@ var General;
|
|
|
315
818
|
documentation: "Returns 1.0 if the entity was last hit by the player, else it returns 0.0. If called by the client always returns 0.0",
|
|
316
819
|
id: "last_hit_by_player",
|
|
317
820
|
},
|
|
318
|
-
{
|
|
319
|
-
|
|
320
|
-
|
|
821
|
+
{
|
|
822
|
+
documentation: "Returns the lie down amount for the entity",
|
|
823
|
+
id: "lie_amount",
|
|
824
|
+
},
|
|
825
|
+
{
|
|
826
|
+
documentation: "returns the limited life span of an entity, or 0.0 if it lives forever",
|
|
827
|
+
id: "life_span",
|
|
828
|
+
},
|
|
829
|
+
{
|
|
830
|
+
documentation: "Returns the time in seconds since the current animation started, else 0.0 if not called within an animation",
|
|
831
|
+
id: "life_time",
|
|
832
|
+
},
|
|
321
833
|
{
|
|
322
834
|
documentation: "Takes an array of distances and returns the zero - based index of which range the actor is in based on distance from the camera.For example, 'query.lod_index(10, 20, 30)' will return 0, 1, or 2 based on whether the mob is less than 10, 20, or 30 units away from the camera, or it will return 3 if it is greater than 30.",
|
|
323
835
|
id: "lod_index",
|
|
324
836
|
},
|
|
325
|
-
{
|
|
837
|
+
{
|
|
838
|
+
documentation: "debug log a value to the content log",
|
|
839
|
+
id: "log",
|
|
840
|
+
},
|
|
326
841
|
{
|
|
327
842
|
documentation: "Returns the use time maximum duration for the main hand item if it makes sense, else it returns 0.0",
|
|
328
843
|
id: "main_hand_item_max_duration",
|
|
329
844
|
},
|
|
330
|
-
{
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
{
|
|
845
|
+
{
|
|
846
|
+
documentation: "Returns the use time for the main hand item.",
|
|
847
|
+
id: "main_hand_item_use_duration",
|
|
848
|
+
},
|
|
849
|
+
{
|
|
850
|
+
documentation: "Returns the entity's mark variant",
|
|
851
|
+
id: "mark_variant",
|
|
852
|
+
},
|
|
853
|
+
{
|
|
854
|
+
documentation: "Returns the max durability an item can take",
|
|
855
|
+
id: "max_durability",
|
|
856
|
+
},
|
|
857
|
+
{
|
|
858
|
+
documentation: "Returns the maximum health of the entity, or 0.0 if it doesn't make sense to call on this entity.",
|
|
859
|
+
id: "max_health",
|
|
860
|
+
},
|
|
861
|
+
{
|
|
862
|
+
documentation: "Returns the maximum trade tier of the entity if it makes sense, else it returns 0.0",
|
|
863
|
+
id: "max_trade_tier",
|
|
864
|
+
},
|
|
335
865
|
{
|
|
336
866
|
documentation: "Returns the time in *seconds* of the most expensive frame over the last 'n' frames. If an argument is passed, it is assumed to be the number of frames in the past that you wish to query. 'query.maximum_frame_time' (or the equivalent 'query.maximum_frame_time(0)') will return the frame time of the frame before the current one. 'query.maximum_frame_time(1)' will return the maximum frame time of the previous two frames. Currently we store the history of the last 30 frames, although note that this may change in the future. Asking for more frames will result in only sampling the number of frames stored.",
|
|
337
867
|
id: "maximum_frame_time",
|
|
@@ -340,12 +870,18 @@ var General;
|
|
|
340
870
|
documentation: "Returns the time in *seconds* of the least expensive frame over the last 'n' frames. If an argument is passed, it is assumed to be the number of frames in the past that you wish to query. 'query.minimum_frame_time' (or the equivalent 'query.minimum_frame_time(0)') will return the frame time of the frame before the current one. 'query.minimum_frame_time(1)' will return the minimum frame time of the previous two frames. Currently we store the history of the last 30 frames, although note that this may change in the future. Asking for more frames will result in only sampling the number of frames stored.",
|
|
341
871
|
id: "minimum_frame_time",
|
|
342
872
|
},
|
|
343
|
-
{
|
|
873
|
+
{
|
|
874
|
+
documentation: "Returns the scale of the current entity",
|
|
875
|
+
id: "model_scale",
|
|
876
|
+
},
|
|
344
877
|
{
|
|
345
878
|
documentation: "Returns the total distance the entity has moved horizontally in meters (since the entity was last loaded, not necessarily since it was originally created) modified along the way by status flags such as is_baby or on_fire",
|
|
346
879
|
id: "modified_distance_moved",
|
|
347
880
|
},
|
|
348
|
-
{
|
|
881
|
+
{
|
|
882
|
+
documentation: "Returns the current walk speed of the entity modified by status flags such as is_baby or on_fire",
|
|
883
|
+
id: "modified_move_speed",
|
|
884
|
+
},
|
|
349
885
|
{
|
|
350
886
|
documentation: "Returns the brightness of the moon (FULL_MOON=1.0, WANING_GIBBOUS=0.75, FIRST_QUARTER=0.5, WANING_CRESCENT=0.25, NEW_MOON=0.0, WAXING_CRESCENT=0.25, LAST_QUARTER=0.5, WAXING_GIBBOUS=0.75).",
|
|
351
887
|
id: "moon_brightness",
|
|
@@ -354,13 +890,35 @@ var General;
|
|
|
354
890
|
documentation: "Returns the phase of the moon (FULL_MOON=0, WANING_GIBBOUS=1, FIRST_QUARTER=2, WANING_CRESCENT=3, NEW_MOON=4, WAXING_CRESCENT=5, LAST_QUARTER=6, WAXING_GIBBOUS=7).",
|
|
355
891
|
id: "moon_phase",
|
|
356
892
|
},
|
|
357
|
-
{
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
{
|
|
363
|
-
|
|
893
|
+
{
|
|
894
|
+
documentation: "returns the specified axis of the normalized position delta of the entity",
|
|
895
|
+
id: "movement_direction",
|
|
896
|
+
parameters: [{ id: "axis", documentation: "0 for x, 1 for y, 2 for z" }],
|
|
897
|
+
},
|
|
898
|
+
{
|
|
899
|
+
documentation: "Queries Perlin Noise Map",
|
|
900
|
+
id: "noise",
|
|
901
|
+
},
|
|
902
|
+
{
|
|
903
|
+
documentation: "returns the time that the entity is on fire, else it returns 0.0",
|
|
904
|
+
id: "on_fire_time",
|
|
905
|
+
},
|
|
906
|
+
{
|
|
907
|
+
documentation: "Returns 1.0 if the entity is out of control, else it returns 0.0",
|
|
908
|
+
id: "out_of_control",
|
|
909
|
+
},
|
|
910
|
+
{
|
|
911
|
+
documentation: "Do not use - this id is deprecated and will be removed",
|
|
912
|
+
id: "overlay_alpha",
|
|
913
|
+
},
|
|
914
|
+
{
|
|
915
|
+
documentation: "Returns the root actor identifier",
|
|
916
|
+
id: "owner_identifier",
|
|
917
|
+
},
|
|
918
|
+
{
|
|
919
|
+
documentation: "returns the players level if the actor is a player, otherwise returns 0",
|
|
920
|
+
id: "player_level",
|
|
921
|
+
},
|
|
364
922
|
{
|
|
365
923
|
documentation: "Returns the absolute position of an actor. Takes one argument that represents the desired axis (0 for x-axis, 1 for y-axis, 2 for z-axis).",
|
|
366
924
|
id: "position",
|
|
@@ -369,28 +927,82 @@ var General;
|
|
|
369
927
|
documentation: "Returns the position delta for an actor. Takes one argument that represents the desired axis (0 for x-axis, 1 for y-axis, 2 for z-axis).",
|
|
370
928
|
id: "position_delta",
|
|
371
929
|
},
|
|
372
|
-
{
|
|
373
|
-
|
|
374
|
-
|
|
930
|
+
{
|
|
931
|
+
documentation: "Returns the previous squish value for the current entity, or 0.0 if this doesn't make sense",
|
|
932
|
+
id: "previous_squish_value",
|
|
933
|
+
},
|
|
934
|
+
{
|
|
935
|
+
documentation: "Returns the how much durability an item has remaining",
|
|
936
|
+
id: "remaining_durability",
|
|
937
|
+
},
|
|
938
|
+
{
|
|
939
|
+
documentation: "Returns the roll counter of the entity",
|
|
940
|
+
id: "roll_counter",
|
|
941
|
+
},
|
|
375
942
|
{
|
|
376
943
|
documentation: "Returns the rotation required to aim at the camera. Requires one argument representing the rotation axis you would like (0 for x, 1 for y)",
|
|
377
944
|
id: "rotation_to_camera",
|
|
378
945
|
},
|
|
379
|
-
{
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
{
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
{
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
{
|
|
392
|
-
|
|
393
|
-
|
|
946
|
+
{
|
|
947
|
+
documentation: "returns the shaking angle of the entity if it makes sense, else it returns 0.0",
|
|
948
|
+
id: "shake_angle",
|
|
949
|
+
},
|
|
950
|
+
{
|
|
951
|
+
documentation: "Returns the shake time of the entity.",
|
|
952
|
+
id: "shake_time",
|
|
953
|
+
},
|
|
954
|
+
{
|
|
955
|
+
documentation: "Returns the how much the offhand shield should translate down when blocking and being hit.",
|
|
956
|
+
id: "shield_blocking_bob",
|
|
957
|
+
},
|
|
958
|
+
{
|
|
959
|
+
documentation: "Returns the current sit amount of the entity",
|
|
960
|
+
id: "sit_amount",
|
|
961
|
+
},
|
|
962
|
+
{
|
|
963
|
+
documentation: "Returns the entity's skin ID",
|
|
964
|
+
id: "skin_id",
|
|
965
|
+
},
|
|
966
|
+
{
|
|
967
|
+
documentation: "returns the rotation of the bed the player is sleeping on.",
|
|
968
|
+
id: "sleep_rotation",
|
|
969
|
+
},
|
|
970
|
+
{
|
|
971
|
+
documentation: "Returns the sneeze counter of the entity",
|
|
972
|
+
id: "sneeze_counter",
|
|
973
|
+
},
|
|
974
|
+
{
|
|
975
|
+
documentation: "Returns 1.0 if we render the entity's bottom, else it returns 0.0",
|
|
976
|
+
id: "show_bottom",
|
|
977
|
+
},
|
|
978
|
+
{
|
|
979
|
+
documentation: "Returns the entity spell colour if it makes sense, else it returns 0.0",
|
|
980
|
+
id: "spellcolor",
|
|
981
|
+
},
|
|
982
|
+
{
|
|
983
|
+
documentation: "Returns the scale of how standing up the entity is",
|
|
984
|
+
id: "standing_scale",
|
|
985
|
+
},
|
|
986
|
+
{
|
|
987
|
+
documentation: "returns the structural integrity for the actor, otherwise returns 0",
|
|
988
|
+
id: "structural_integrity",
|
|
989
|
+
},
|
|
990
|
+
{
|
|
991
|
+
documentation: "Returns how swollen the entity is",
|
|
992
|
+
id: "swell_amount",
|
|
993
|
+
},
|
|
994
|
+
{
|
|
995
|
+
documentation: "Returns the swelling direction of the entity if it makes sense, else it returns 0.0",
|
|
996
|
+
id: "swelling_dir",
|
|
997
|
+
},
|
|
998
|
+
{
|
|
999
|
+
documentation: "Returns the amount the current entity is swimming",
|
|
1000
|
+
id: "swim_amount",
|
|
1001
|
+
},
|
|
1002
|
+
{
|
|
1003
|
+
documentation: "returns the angle of the tail of the entity if it makes sense, else it returns 0.0",
|
|
1004
|
+
id: "tail_angle",
|
|
1005
|
+
},
|
|
394
1006
|
{
|
|
395
1007
|
documentation: "Returns the x rotation required to aim at the entity's current target if it has one, else it returns 0.0",
|
|
396
1008
|
id: "target_x_rotation",
|
|
@@ -399,22 +1011,58 @@ var General;
|
|
|
399
1011
|
documentation: "Returns the y rotation required to aim at the entity's current target if it has one, else it returns 0.0",
|
|
400
1012
|
id: "target_y_rotation",
|
|
401
1013
|
},
|
|
402
|
-
{
|
|
1014
|
+
{
|
|
1015
|
+
documentation: "Returns the icon index of the experience orb",
|
|
1016
|
+
id: "texture_frame_index",
|
|
1017
|
+
},
|
|
403
1018
|
{
|
|
404
1019
|
documentation: "Returns the time of day (midnight=0.0, sunrise=0.25, noon=0.5, sunset=0.75) of the dimension the entity is in.",
|
|
405
1020
|
id: "time_of_day",
|
|
406
1021
|
},
|
|
407
|
-
{
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
{
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
{
|
|
416
|
-
|
|
417
|
-
|
|
1022
|
+
{
|
|
1023
|
+
documentation: "Returns the current time stamp of the level",
|
|
1024
|
+
id: "time_stamp",
|
|
1025
|
+
},
|
|
1026
|
+
{
|
|
1027
|
+
documentation: "Returns the total number of active emitters in the world",
|
|
1028
|
+
id: "total_emitter_count",
|
|
1029
|
+
},
|
|
1030
|
+
{
|
|
1031
|
+
documentation: "Returns the total number of active particles in the world",
|
|
1032
|
+
id: "total_particle_count",
|
|
1033
|
+
},
|
|
1034
|
+
{
|
|
1035
|
+
documentation: "Returns the trade tier of the entity if it makes sense, else it returns 0.0",
|
|
1036
|
+
id: "trade_tier",
|
|
1037
|
+
},
|
|
1038
|
+
{
|
|
1039
|
+
documentation: "Returns how unhappy the entity is",
|
|
1040
|
+
id: "unhappy_counter",
|
|
1041
|
+
},
|
|
1042
|
+
{
|
|
1043
|
+
documentation: "Returns the entity's variant index",
|
|
1044
|
+
id: "variant",
|
|
1045
|
+
},
|
|
1046
|
+
{
|
|
1047
|
+
documentation: "Returns the speed of the entity up or down in metres/second, where positive is up",
|
|
1048
|
+
id: "vertical_speed",
|
|
1049
|
+
},
|
|
1050
|
+
{
|
|
1051
|
+
documentation: "Returns the walk distance of the entity.",
|
|
1052
|
+
id: "walk_distance",
|
|
1053
|
+
},
|
|
1054
|
+
{
|
|
1055
|
+
documentation: "Returns the wing flap position of the entity, or 0.0 if this doesn't make sense",
|
|
1056
|
+
id: "wing_flap_position",
|
|
1057
|
+
},
|
|
1058
|
+
{
|
|
1059
|
+
documentation: "Returns the wing flap speed of the entity, or 0.0 if this doesn't make sense",
|
|
1060
|
+
id: "wing_flap_speed",
|
|
1061
|
+
},
|
|
1062
|
+
{
|
|
1063
|
+
documentation: "Returns the entity's yaw speed",
|
|
1064
|
+
id: "yaw_speed",
|
|
1065
|
+
},
|
|
418
1066
|
];
|
|
419
1067
|
})(General = exports.General || (exports.General = {}));
|
|
420
1068
|
//# sourceMappingURL=General.js.map
|