@mbler/mcx-core 0.1.1 → 0.1.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.
- package/dist/chunk-DEq-mXcV.js +15 -0
- package/dist/index.d.ts +4861 -5024
- package/dist/index.js +6384 -12177
- package/dist/index.js.map +1 -1
- package/package.json +14 -6
- package/dist/types/ast/index.d.ts +0 -7
- package/dist/types/ast/prop.d.ts +0 -8
- package/dist/types/ast/tag.d.ts +0 -66
- package/dist/types/compile-mcx/compiler/compileData.d.ts +0 -20
- package/dist/types/compile-mcx/compiler/index.d.ts +0 -36
- package/dist/types/compile-mcx/compiler/main.d.ts +0 -6
- package/dist/types/compile-mcx/compiler/utils.d.ts +0 -11
- package/dist/types/compile-mcx/index.d.ts +0 -1
- package/dist/types/compile-mcx/types.d.ts +0 -52
- package/dist/types/compile-mcx/utils.node.d.ts +0 -14
- package/dist/types/index.d.ts +0 -10
- package/dist/types/mcx-component/components/block.d.ts +0 -4
- package/dist/types/mcx-component/components/entity.d.ts +0 -1266
- package/dist/types/mcx-component/components/item.d.ts +0 -520
- package/dist/types/mcx-component/index.d.ts +0 -17
- package/dist/types/mcx-component/lib.d.ts +0 -32
- package/dist/types/mcx-component/types/AttackCriticalHitChoices.d.ts +0 -3
- package/dist/types/mcx-component/types/EnchantableSlot.d.ts +0 -9
- package/dist/types/mcx-component/types/ParticleType.d.ts +0 -8
- package/dist/types/mcx-component/types/SoundEvent.d.ts +0 -8
- package/dist/types/mcx-component/types/StartSoundChoices.d.ts +0 -3
- package/dist/types/mcx-component/types.d.ts +0 -3053
- package/dist/types/mcx-component/utils.d.ts +0 -2
- package/dist/types/mcx-component/vm.d.ts +0 -28
- package/dist/types/transforms/config.d.ts +0 -8
- package/dist/types/transforms/file_id.d.ts +0 -1
- package/dist/types/transforms/index.d.ts +0 -5
- package/dist/types/transforms/main.d.ts +0 -2
- package/dist/types/transforms/utils.d.ts +0 -22
- package/dist/types/transforms/x-comp/index.d.ts +0 -3
- package/dist/types/transforms/x-comp/x-app.d.ts +0 -2
- package/dist/types/transforms/x-comp/x-event.d.ts +0 -2
- package/dist/types/transforms/x-comp/x-ui.d.ts +0 -2
- package/dist/types/types.d.ts +0 -100
- package/dist/types/utils.d.ts +0 -18
|
@@ -1,1266 +0,0 @@
|
|
|
1
|
-
import * as t from './../types';
|
|
2
|
-
declare class EntityComponent {
|
|
3
|
-
#private;
|
|
4
|
-
constructor(opt: t.EntityComponentOptions);
|
|
5
|
-
toJSON(): t.EntityJson;
|
|
6
|
-
setId(newValue: string): void;
|
|
7
|
-
setFormat(newValue: string): void;
|
|
8
|
-
setIsSpawnable(value: boolean): void;
|
|
9
|
-
setIsSummonable(value: boolean): void;
|
|
10
|
-
setAddrider(config: {
|
|
11
|
-
entity_type?: string;
|
|
12
|
-
riders?: Array<{
|
|
13
|
-
entity_type: string;
|
|
14
|
-
spawn_event?: string;
|
|
15
|
-
}>;
|
|
16
|
-
spawn_event?: string;
|
|
17
|
-
}): void;
|
|
18
|
-
setAdmireItem(config: {
|
|
19
|
-
cooldown_after_being_attacked?: number;
|
|
20
|
-
duration?: number;
|
|
21
|
-
}): void;
|
|
22
|
-
setAgeable(config: {
|
|
23
|
-
drop_items?: string[];
|
|
24
|
-
duration?: number;
|
|
25
|
-
feed_items?: string | string[] | Array<{
|
|
26
|
-
growth?: number;
|
|
27
|
-
item: string;
|
|
28
|
-
}>;
|
|
29
|
-
grow_up?: string | {
|
|
30
|
-
event: string;
|
|
31
|
-
target: string;
|
|
32
|
-
};
|
|
33
|
-
interact_filters?: any;
|
|
34
|
-
pause_growth_items?: string[];
|
|
35
|
-
reset_growth_items?: string[];
|
|
36
|
-
}): void;
|
|
37
|
-
setAngerLevel(config: {
|
|
38
|
-
anger_decrement_interval?: number;
|
|
39
|
-
angry_boost?: number;
|
|
40
|
-
angry_threshold?: number;
|
|
41
|
-
broadcast_anger?: boolean;
|
|
42
|
-
broadcast_anger_on_attack?: boolean;
|
|
43
|
-
broadcast_filters?: any;
|
|
44
|
-
broadcast_range?: number;
|
|
45
|
-
broadcast_targets?: string[];
|
|
46
|
-
calm_event?: string;
|
|
47
|
-
default_annoyingness?: number;
|
|
48
|
-
default_projectile_annoyingness?: number;
|
|
49
|
-
duration?: number;
|
|
50
|
-
duration_delta?: number;
|
|
51
|
-
filters?: any;
|
|
52
|
-
max_anger?: number;
|
|
53
|
-
nuisance_filter?: any;
|
|
54
|
-
on_increase_sounds?: Array<{
|
|
55
|
-
condition?: string;
|
|
56
|
-
sound?: string;
|
|
57
|
-
}>;
|
|
58
|
-
remove_targets_below_angry_threshold?: boolean;
|
|
59
|
-
sound_interval?: {
|
|
60
|
-
min: number;
|
|
61
|
-
max: number;
|
|
62
|
-
};
|
|
63
|
-
}): void;
|
|
64
|
-
setAngry(config: {
|
|
65
|
-
angry_sound?: string;
|
|
66
|
-
broadcast_anger?: boolean;
|
|
67
|
-
broadcast_anger_on_attack?: boolean;
|
|
68
|
-
broadcast_anger_on_being_attacked?: boolean;
|
|
69
|
-
broadcast_anger_when_dying?: boolean;
|
|
70
|
-
broadcast_filters?: any;
|
|
71
|
-
broadcast_range?: number;
|
|
72
|
-
broadcast_targets?: string[];
|
|
73
|
-
calm_event?: string | {
|
|
74
|
-
event: string;
|
|
75
|
-
target: string;
|
|
76
|
-
};
|
|
77
|
-
duration?: number;
|
|
78
|
-
duration_delta?: number;
|
|
79
|
-
filters?: any;
|
|
80
|
-
sound_interval?: {
|
|
81
|
-
min: number;
|
|
82
|
-
max: number;
|
|
83
|
-
};
|
|
84
|
-
}): void;
|
|
85
|
-
setAnnotationBreakDoor(config: {
|
|
86
|
-
break_time?: number;
|
|
87
|
-
min_difficulty?: 'hard' | 'normal' | 'easy' | 'peaceful';
|
|
88
|
-
}): void;
|
|
89
|
-
setAnnotationOpenDoor(): void;
|
|
90
|
-
setAttack(config: {
|
|
91
|
-
damage?: number | [number, number] | {
|
|
92
|
-
range_min: number;
|
|
93
|
-
range_max: number;
|
|
94
|
-
};
|
|
95
|
-
effect_duration?: number;
|
|
96
|
-
effect_name?: string;
|
|
97
|
-
}): void;
|
|
98
|
-
setAreaAttack(config: {
|
|
99
|
-
cause?: string;
|
|
100
|
-
damage_cooldown?: number;
|
|
101
|
-
damage_per_tick?: number;
|
|
102
|
-
damage_range?: number;
|
|
103
|
-
entity_filter?: any;
|
|
104
|
-
play_attack_sound?: boolean;
|
|
105
|
-
}): void;
|
|
106
|
-
setAttackCooldown(config: {
|
|
107
|
-
attack_cooldown_complete_event?: string | {
|
|
108
|
-
event: string;
|
|
109
|
-
target?: string;
|
|
110
|
-
};
|
|
111
|
-
attack_cooldown_time?: number | {
|
|
112
|
-
min: number;
|
|
113
|
-
max: number;
|
|
114
|
-
};
|
|
115
|
-
}): void;
|
|
116
|
-
setBalloonable(config: {
|
|
117
|
-
mass?: number;
|
|
118
|
-
max_distance?: number;
|
|
119
|
-
on_balloon?: any;
|
|
120
|
-
on_unballoon?: any;
|
|
121
|
-
soft_distance?: number;
|
|
122
|
-
}): void;
|
|
123
|
-
setBarter(config: {
|
|
124
|
-
barter_table?: string;
|
|
125
|
-
cooldown_after_being_attacked?: {
|
|
126
|
-
min: number;
|
|
127
|
-
max: number;
|
|
128
|
-
};
|
|
129
|
-
}): void;
|
|
130
|
-
setBlockClimber(): void;
|
|
131
|
-
setBlockSensor(config: {
|
|
132
|
-
on_break?: Array<{
|
|
133
|
-
block_list?: string[];
|
|
134
|
-
on_block_broken?: string;
|
|
135
|
-
}>;
|
|
136
|
-
sensor_radius?: number;
|
|
137
|
-
sources?: any;
|
|
138
|
-
}): void;
|
|
139
|
-
setBodyRotationAxisAligned(): void;
|
|
140
|
-
setBodyRotationAlwaysFollowsHead(): void;
|
|
141
|
-
setBodyRotationBlocked(): void;
|
|
142
|
-
setBodyRotationLockedToVehicle(): void;
|
|
143
|
-
setBoostable(config: {
|
|
144
|
-
boost_items?: Array<{
|
|
145
|
-
damage?: number;
|
|
146
|
-
item: string;
|
|
147
|
-
replace_item?: string;
|
|
148
|
-
}>;
|
|
149
|
-
duration?: number;
|
|
150
|
-
speed_multiplier?: number;
|
|
151
|
-
}): void;
|
|
152
|
-
setBoss(config: {
|
|
153
|
-
hud_range?: number;
|
|
154
|
-
name?: string;
|
|
155
|
-
should_darken_sky?: boolean;
|
|
156
|
-
}): void;
|
|
157
|
-
setBreakBlocks(config: {
|
|
158
|
-
breakable_blocks?: string[];
|
|
159
|
-
}): void;
|
|
160
|
-
setBreathable(config: {
|
|
161
|
-
breathe_blocks?: string[];
|
|
162
|
-
breathes_air?: boolean;
|
|
163
|
-
breathes_lava?: boolean;
|
|
164
|
-
breathes_solids?: boolean;
|
|
165
|
-
breathes_water?: boolean;
|
|
166
|
-
generates_bubbles?: boolean;
|
|
167
|
-
inhale_time?: number;
|
|
168
|
-
non_breathe_blocks?: string[];
|
|
169
|
-
suffocate_time?: number;
|
|
170
|
-
suffocateTime?: number;
|
|
171
|
-
total_supply?: number;
|
|
172
|
-
totalSupply?: number;
|
|
173
|
-
}): void;
|
|
174
|
-
setBribeable(config: {
|
|
175
|
-
bribe_cooldown?: number;
|
|
176
|
-
bribe_items?: string[] | string;
|
|
177
|
-
}): void;
|
|
178
|
-
setBreedable(config: {
|
|
179
|
-
allow_sitting?: boolean;
|
|
180
|
-
blend_attributes?: boolean;
|
|
181
|
-
breed_cooldown?: number;
|
|
182
|
-
breed_items?: string[] | string;
|
|
183
|
-
breeds_with?: Array<{
|
|
184
|
-
baby_type?: string;
|
|
185
|
-
breed_event?: string | {
|
|
186
|
-
event: string;
|
|
187
|
-
filters?: any;
|
|
188
|
-
};
|
|
189
|
-
mate_type?: string;
|
|
190
|
-
}> | {
|
|
191
|
-
baby_type?: string;
|
|
192
|
-
breed_event?: string | {
|
|
193
|
-
event: string;
|
|
194
|
-
filters?: any;
|
|
195
|
-
};
|
|
196
|
-
mate_type?: string;
|
|
197
|
-
};
|
|
198
|
-
causes_pregnancy?: boolean;
|
|
199
|
-
deny_parents_variant?: {
|
|
200
|
-
chance?: number;
|
|
201
|
-
max_variant?: string;
|
|
202
|
-
min_variant?: string;
|
|
203
|
-
};
|
|
204
|
-
environment_requirements?: Array<{
|
|
205
|
-
block_types?: string[];
|
|
206
|
-
count?: number;
|
|
207
|
-
radius?: number;
|
|
208
|
-
}>;
|
|
209
|
-
extra_baby_chance?: {
|
|
210
|
-
min: number;
|
|
211
|
-
max: number;
|
|
212
|
-
};
|
|
213
|
-
inherit_tamed?: boolean;
|
|
214
|
-
love_filters?: any;
|
|
215
|
-
mutation_factor?: {
|
|
216
|
-
color?: {
|
|
217
|
-
min: number;
|
|
218
|
-
max: number;
|
|
219
|
-
} | number;
|
|
220
|
-
extra_variant?: {
|
|
221
|
-
min: number;
|
|
222
|
-
max: number;
|
|
223
|
-
} | number;
|
|
224
|
-
variant?: {
|
|
225
|
-
min: number;
|
|
226
|
-
max: number;
|
|
227
|
-
} | number;
|
|
228
|
-
};
|
|
229
|
-
require_full_health?: boolean;
|
|
230
|
-
require_tame?: boolean;
|
|
231
|
-
}): void;
|
|
232
|
-
setBuoyant(config: {
|
|
233
|
-
apply_gravity?: boolean;
|
|
234
|
-
base_buoyancy?: number;
|
|
235
|
-
big_wave_probability?: number;
|
|
236
|
-
big_wave_speed?: number;
|
|
237
|
-
can_auto_step_from_liquid?: boolean;
|
|
238
|
-
drag_down_on_buoyancy_removed?: number;
|
|
239
|
-
liquid_blocks?: string[];
|
|
240
|
-
movement_type?: 'waves' | 'bobbing' | 'none';
|
|
241
|
-
}): void;
|
|
242
|
-
setBurnsInDaylight(config?: {
|
|
243
|
-
protection_slot?: 'slot.armor.body' | 'slot.armor.chest' | 'slot.armor.feet' | 'slot.armor.head' | 'slot.armor.legs' | 'slot.weapon.mainhand' | 'slot.weapon.offhand';
|
|
244
|
-
}): void;
|
|
245
|
-
setCannotBeAttacked(): void;
|
|
246
|
-
setCanClimb(): void;
|
|
247
|
-
setCanFly(): void;
|
|
248
|
-
setCanJoinRaid(): void;
|
|
249
|
-
setCanPowerJump(): void;
|
|
250
|
-
setCelebrateHunt(config: {
|
|
251
|
-
broadcast?: boolean;
|
|
252
|
-
celeberation_targets?: any;
|
|
253
|
-
celebrate_sound?: string;
|
|
254
|
-
duration?: number;
|
|
255
|
-
radius?: number;
|
|
256
|
-
sound_interval?: {
|
|
257
|
-
min: number;
|
|
258
|
-
max: number;
|
|
259
|
-
};
|
|
260
|
-
}): void;
|
|
261
|
-
setCollisionBox(config?: {
|
|
262
|
-
height?: number;
|
|
263
|
-
width?: number;
|
|
264
|
-
}): void;
|
|
265
|
-
setColor(config?: {
|
|
266
|
-
value?: number;
|
|
267
|
-
}): void;
|
|
268
|
-
setColor2(config?: {
|
|
269
|
-
value?: number;
|
|
270
|
-
}): void;
|
|
271
|
-
setCombatRegeneration(config?: {
|
|
272
|
-
apply_to_family?: boolean;
|
|
273
|
-
apply_to_self?: boolean;
|
|
274
|
-
regeneration_duration?: number | 'infinite';
|
|
275
|
-
}): void;
|
|
276
|
-
setConditionalBandwidthOptimization(config?: {
|
|
277
|
-
conditional_values?: Array<{
|
|
278
|
-
conditional_values?: any;
|
|
279
|
-
max_dropped_ticks?: number;
|
|
280
|
-
max_optimized_distance?: number;
|
|
281
|
-
use_motion_prediction_hints?: boolean;
|
|
282
|
-
}>;
|
|
283
|
-
default_values?: {
|
|
284
|
-
max_dropped_ticks?: number;
|
|
285
|
-
max_optimized_distance?: number;
|
|
286
|
-
use_motion_prediction_hints?: boolean;
|
|
287
|
-
};
|
|
288
|
-
}): void;
|
|
289
|
-
setCustomHitTest(config?: {
|
|
290
|
-
hitboxes?: Array<{
|
|
291
|
-
height?: number;
|
|
292
|
-
pivot?: [number, number, number];
|
|
293
|
-
width?: number;
|
|
294
|
-
}>;
|
|
295
|
-
}): void;
|
|
296
|
-
setDamageOverTime(config?: {
|
|
297
|
-
damage_per_hurt?: number;
|
|
298
|
-
time_between_hurt?: number;
|
|
299
|
-
}): void;
|
|
300
|
-
setDamageSensor(config?: {
|
|
301
|
-
deals_damage?: boolean | 'yes' | 'no' | 'no_but_side_effects_apply';
|
|
302
|
-
triggers?: Array<{
|
|
303
|
-
cause?: string;
|
|
304
|
-
damage_modifier?: number;
|
|
305
|
-
damage_multiplier?: number;
|
|
306
|
-
deals_damage?: boolean | string;
|
|
307
|
-
event?: string;
|
|
308
|
-
filters?: any;
|
|
309
|
-
on_damage?: {
|
|
310
|
-
filters?: any;
|
|
311
|
-
};
|
|
312
|
-
on_damage_sound_event?: string;
|
|
313
|
-
}> | {
|
|
314
|
-
cause?: string;
|
|
315
|
-
damage_modifier?: number;
|
|
316
|
-
damage_multiplier?: number;
|
|
317
|
-
deals_damage?: boolean | string;
|
|
318
|
-
event?: string;
|
|
319
|
-
filters?: any;
|
|
320
|
-
on_damage?: {
|
|
321
|
-
filters?: any;
|
|
322
|
-
};
|
|
323
|
-
on_damage_sound_event?: string;
|
|
324
|
-
};
|
|
325
|
-
}): void;
|
|
326
|
-
setDash(config?: {
|
|
327
|
-
cooldown_time?: number;
|
|
328
|
-
horizontal_momentum?: number;
|
|
329
|
-
vertical_momentum?: number;
|
|
330
|
-
}): void;
|
|
331
|
-
setDashAction(config?: {
|
|
332
|
-
can_dash_underwater?: boolean;
|
|
333
|
-
cooldown_time?: number;
|
|
334
|
-
direction?: 'entity' | 'passenger';
|
|
335
|
-
horizontal_momentum?: number;
|
|
336
|
-
vertical_momentum?: number;
|
|
337
|
-
}): void;
|
|
338
|
-
setDefaultLookAngle(config?: {
|
|
339
|
-
value?: number;
|
|
340
|
-
}): void;
|
|
341
|
-
setDespawn(config?: {
|
|
342
|
-
despawn_from_chance?: boolean;
|
|
343
|
-
despawn_from_distance?: {
|
|
344
|
-
max_distance?: number;
|
|
345
|
-
min_distance?: number;
|
|
346
|
-
};
|
|
347
|
-
despawn_from_inactivity?: boolean;
|
|
348
|
-
despawn_from_simulation_edge?: boolean;
|
|
349
|
-
filters?: any;
|
|
350
|
-
min_range_inactivity_timer?: number;
|
|
351
|
-
min_range_random_chance?: number;
|
|
352
|
-
remove_child_entities?: boolean;
|
|
353
|
-
}): void;
|
|
354
|
-
setDimensionBound(): void;
|
|
355
|
-
setDryingOutTimer(config?: {
|
|
356
|
-
dried_out_event?: string | {
|
|
357
|
-
event: string;
|
|
358
|
-
target?: string;
|
|
359
|
-
};
|
|
360
|
-
recover_after_dried_out_event?: string | {
|
|
361
|
-
event: string;
|
|
362
|
-
target?: string;
|
|
363
|
-
};
|
|
364
|
-
stopped_drying_out_event?: string | {
|
|
365
|
-
event: string;
|
|
366
|
-
target?: string;
|
|
367
|
-
};
|
|
368
|
-
total_time?: number;
|
|
369
|
-
water_bottle_refill_time?: number;
|
|
370
|
-
}): void;
|
|
371
|
-
setDweller(config?: {
|
|
372
|
-
can_find_poi?: boolean;
|
|
373
|
-
can_migrate?: boolean;
|
|
374
|
-
dweller_role?: string;
|
|
375
|
-
dwelling_bounds_tolerance?: number;
|
|
376
|
-
dwelling_role?: string;
|
|
377
|
-
dwelling_type?: string;
|
|
378
|
-
first_founding_reward?: number;
|
|
379
|
-
preferred_profession?: string;
|
|
380
|
-
update_interval_base?: number;
|
|
381
|
-
update_interval_variant?: number;
|
|
382
|
-
}): void;
|
|
383
|
-
setEconomyTradeTable(config?: {
|
|
384
|
-
convert_trades_economy?: boolean;
|
|
385
|
-
cured_discount?: number | [number, number];
|
|
386
|
-
display_name?: string;
|
|
387
|
-
hero_demand_discount?: number;
|
|
388
|
-
max_cured_discount?: number | [number, number];
|
|
389
|
-
max_nearby_cured_discount?: number;
|
|
390
|
-
nearby_cured_discount?: number;
|
|
391
|
-
new_screen?: boolean;
|
|
392
|
-
persist_trades?: boolean;
|
|
393
|
-
show_trade_screen?: boolean;
|
|
394
|
-
table?: string;
|
|
395
|
-
use_legacy_price_formula?: boolean;
|
|
396
|
-
}): void;
|
|
397
|
-
setEntityArmorEquipmentSlotMapping(config?: {
|
|
398
|
-
armor_slot?: string;
|
|
399
|
-
}): void;
|
|
400
|
-
setEntitySensor(config?: {
|
|
401
|
-
find_players_only?: boolean;
|
|
402
|
-
relative_range?: boolean;
|
|
403
|
-
subsensors?: Array<{
|
|
404
|
-
cooldown?: number;
|
|
405
|
-
event?: string | {
|
|
406
|
-
event: string;
|
|
407
|
-
target?: string;
|
|
408
|
-
};
|
|
409
|
-
event_filters?: any;
|
|
410
|
-
maximum_count?: number;
|
|
411
|
-
minimum_count?: number;
|
|
412
|
-
range?: [number, number] | [number, number, number];
|
|
413
|
-
require_all?: boolean;
|
|
414
|
-
y_offset?: number;
|
|
415
|
-
}>;
|
|
416
|
-
}): void;
|
|
417
|
-
setEnvironmentSensor(config?: {
|
|
418
|
-
triggers?: {
|
|
419
|
-
event?: string | {
|
|
420
|
-
event: string;
|
|
421
|
-
target?: string;
|
|
422
|
-
};
|
|
423
|
-
filters?: any;
|
|
424
|
-
} | Array<{
|
|
425
|
-
event?: string | {
|
|
426
|
-
event: string;
|
|
427
|
-
target?: string;
|
|
428
|
-
};
|
|
429
|
-
filters?: any;
|
|
430
|
-
}>;
|
|
431
|
-
}): void;
|
|
432
|
-
/**
|
|
433
|
-
* Sets the Equipment table to use for this Entity
|
|
434
|
-
* @param config Equipment configuration
|
|
435
|
-
*/
|
|
436
|
-
setEquipment(config?: {
|
|
437
|
-
slot_drop_chance?: Array<string | {
|
|
438
|
-
drop_chance?: number;
|
|
439
|
-
slot?: string;
|
|
440
|
-
}>;
|
|
441
|
-
table?: string;
|
|
442
|
-
}): void;
|
|
443
|
-
/**
|
|
444
|
-
* Defines an entity's behavior for having items equipped to it
|
|
445
|
-
* @param config Equippable configuration
|
|
446
|
-
*/
|
|
447
|
-
setEquippable(config?: {
|
|
448
|
-
slots?: Array<{
|
|
449
|
-
accepted_items?: string[];
|
|
450
|
-
interact_text?: string;
|
|
451
|
-
item?: string;
|
|
452
|
-
on_equip?: any;
|
|
453
|
-
on_unequip?: any;
|
|
454
|
-
slot?: number;
|
|
455
|
-
[key: string]: any;
|
|
456
|
-
}>;
|
|
457
|
-
}): void;
|
|
458
|
-
/**
|
|
459
|
-
* The entity puts on the desired equipment
|
|
460
|
-
* @param config Equip Item configuration
|
|
461
|
-
*/
|
|
462
|
-
setEquipItem(config?: {
|
|
463
|
-
can_wear_armor?: boolean;
|
|
464
|
-
excluded_items?: Array<{
|
|
465
|
-
item?: string;
|
|
466
|
-
[key: string]: any;
|
|
467
|
-
}>;
|
|
468
|
-
}): void;
|
|
469
|
-
/**
|
|
470
|
-
* Defines how much exhaustion each player action should take
|
|
471
|
-
* @param config Exhaustion values configuration
|
|
472
|
-
*/
|
|
473
|
-
setExhaustionValues(config?: {
|
|
474
|
-
attack?: number;
|
|
475
|
-
damage?: number;
|
|
476
|
-
heal?: number;
|
|
477
|
-
jump?: number;
|
|
478
|
-
lunge?: number;
|
|
479
|
-
mine?: number;
|
|
480
|
-
sprint?: number;
|
|
481
|
-
sprint_jump?: number;
|
|
482
|
-
swim?: number;
|
|
483
|
-
walk?: number;
|
|
484
|
-
[key: string]: any;
|
|
485
|
-
}): void;
|
|
486
|
-
/**
|
|
487
|
-
* Defines experience rewards for entity interactions
|
|
488
|
-
* @param config Experience reward configuration
|
|
489
|
-
*/
|
|
490
|
-
setExperienceReward(config?: {
|
|
491
|
-
on_bred?: string | number | {
|
|
492
|
-
expression?: string;
|
|
493
|
-
version?: number;
|
|
494
|
-
};
|
|
495
|
-
on_death?: string | number | {
|
|
496
|
-
expression?: string;
|
|
497
|
-
version?: number;
|
|
498
|
-
};
|
|
499
|
-
[key: string]: any;
|
|
500
|
-
}): void;
|
|
501
|
-
/**
|
|
502
|
-
* Defines how the entity explodes
|
|
503
|
-
* @param config Explode configuration
|
|
504
|
-
*/
|
|
505
|
-
setExplode(config?: {
|
|
506
|
-
add?: {
|
|
507
|
-
component_groups?: string[];
|
|
508
|
-
[key: string]: any;
|
|
509
|
-
};
|
|
510
|
-
allow_underwater?: boolean;
|
|
511
|
-
breaks_blocks?: boolean;
|
|
512
|
-
causes_fire?: boolean;
|
|
513
|
-
damage_scaling?: number;
|
|
514
|
-
destroy_affected_by_griefing?: boolean;
|
|
515
|
-
fire_affected_by_griefing?: boolean;
|
|
516
|
-
fuse_length?: number | [number, number];
|
|
517
|
-
fuse_lit?: boolean;
|
|
518
|
-
knockback_scaling?: number;
|
|
519
|
-
max_resistance?: number;
|
|
520
|
-
negates_fall_damage?: boolean;
|
|
521
|
-
particle_effect?: string;
|
|
522
|
-
power?: number;
|
|
523
|
-
sound_effect?: string;
|
|
524
|
-
toggles_blocks?: boolean;
|
|
525
|
-
[key: string]: any;
|
|
526
|
-
}): void;
|
|
527
|
-
/**
|
|
528
|
-
* Sets that this entity doesn't take damage from fire
|
|
529
|
-
*/
|
|
530
|
-
setFireImmune(config?: {}): void;
|
|
531
|
-
/**
|
|
532
|
-
* Sets that this entity can float in liquid blocks
|
|
533
|
-
*/
|
|
534
|
-
setFloatsInLiquid(config?: {}): void;
|
|
535
|
-
/**
|
|
536
|
-
* Allows entities to flock in groups in water or not
|
|
537
|
-
*/
|
|
538
|
-
setFlocking(config?: {
|
|
539
|
-
block_distance?: number;
|
|
540
|
-
block_weight?: number;
|
|
541
|
-
breach_influence?: number;
|
|
542
|
-
cohesion_threshold?: number;
|
|
543
|
-
cohesion_weight?: number;
|
|
544
|
-
goal_weight?: number;
|
|
545
|
-
high_flock_limit?: number;
|
|
546
|
-
in_water?: boolean;
|
|
547
|
-
influence_radius?: number;
|
|
548
|
-
innner_cohesion_threshold?: number;
|
|
549
|
-
loner_chance?: number;
|
|
550
|
-
low_flock_limit?: number;
|
|
551
|
-
match_variants?: boolean;
|
|
552
|
-
max_height?: number;
|
|
553
|
-
min_height?: number;
|
|
554
|
-
separation_threshold?: number;
|
|
555
|
-
separation_weight?: number;
|
|
556
|
-
use_center_of_mass?: boolean;
|
|
557
|
-
}): void;
|
|
558
|
-
/**
|
|
559
|
-
* Sets the flying speed in blocks that this entity flies at
|
|
560
|
-
*/
|
|
561
|
-
setFlyingSpeed(config?: {
|
|
562
|
-
value?: number;
|
|
563
|
-
}): void;
|
|
564
|
-
/**
|
|
565
|
-
* Defines the maximum range, in blocks, that a mob will pursue a target
|
|
566
|
-
*/
|
|
567
|
-
setFollowRange(config?: {
|
|
568
|
-
max?: number;
|
|
569
|
-
value?: number;
|
|
570
|
-
}): void;
|
|
571
|
-
/**
|
|
572
|
-
* When configured as a rideable entity, the entity will be controlled using WASD controls
|
|
573
|
-
*/
|
|
574
|
-
setFreeCameraControlled(config?: {
|
|
575
|
-
backwards_movement_modifier?: number;
|
|
576
|
-
strafe_speed_modifier?: number;
|
|
577
|
-
}): void;
|
|
578
|
-
/**
|
|
579
|
-
* Defines how much friction affects this entity
|
|
580
|
-
*/
|
|
581
|
-
setFrictionModifier(config?: {
|
|
582
|
-
value?: number;
|
|
583
|
-
}): void;
|
|
584
|
-
/**
|
|
585
|
-
* Allows an entity to emit entityMove, swim and flap game events
|
|
586
|
-
*/
|
|
587
|
-
setGameEventMovementTracking(config?: {
|
|
588
|
-
emit_flap?: boolean;
|
|
589
|
-
emit_move?: boolean;
|
|
590
|
-
emit_swim?: boolean;
|
|
591
|
-
}): void;
|
|
592
|
-
/**
|
|
593
|
-
* Defines the way a mob's genes and alleles are passed on to its offspring
|
|
594
|
-
*/
|
|
595
|
-
setGenetics(config?: {
|
|
596
|
-
mutation_rate?: number;
|
|
597
|
-
genes?: Array<{
|
|
598
|
-
name: string;
|
|
599
|
-
use_simplified_breeding?: boolean;
|
|
600
|
-
mutation_rate?: number;
|
|
601
|
-
allele_range?: number | {
|
|
602
|
-
range_min: number;
|
|
603
|
-
range_max: number;
|
|
604
|
-
};
|
|
605
|
-
genetic_variants?: Array<{
|
|
606
|
-
birth_event?: string | {
|
|
607
|
-
event: string;
|
|
608
|
-
target?: string;
|
|
609
|
-
};
|
|
610
|
-
main_allele?: number | {
|
|
611
|
-
range_min: number;
|
|
612
|
-
range_max: number;
|
|
613
|
-
};
|
|
614
|
-
hidden_allele?: number | {
|
|
615
|
-
range_min: number;
|
|
616
|
-
range_max: number;
|
|
617
|
-
};
|
|
618
|
-
both_allele?: number | {
|
|
619
|
-
range_min: number;
|
|
620
|
-
range_max: number;
|
|
621
|
-
};
|
|
622
|
-
either_allele?: number | {
|
|
623
|
-
range_min: number;
|
|
624
|
-
range_max: number;
|
|
625
|
-
};
|
|
626
|
-
}>;
|
|
627
|
-
}>;
|
|
628
|
-
}): void;
|
|
629
|
-
/**
|
|
630
|
-
* Defines sets of items that can be used to trigger events when used on this entity
|
|
631
|
-
*/
|
|
632
|
-
setGiveable(config?: {
|
|
633
|
-
cooldown?: number;
|
|
634
|
-
items?: string | string[];
|
|
635
|
-
on_give?: string | {
|
|
636
|
-
event: string;
|
|
637
|
-
target?: string;
|
|
638
|
-
};
|
|
639
|
-
}): void;
|
|
640
|
-
/**
|
|
641
|
-
* Sets the offset from the ground that the entity is actually at
|
|
642
|
-
*/
|
|
643
|
-
setGroundOffset(config?: {
|
|
644
|
-
value?: number;
|
|
645
|
-
}): void;
|
|
646
|
-
/**
|
|
647
|
-
* Keeps track of entity group size in the given radius
|
|
648
|
-
*/
|
|
649
|
-
setGroupSize(config?: {
|
|
650
|
-
radius?: number;
|
|
651
|
-
filters?: any;
|
|
652
|
-
}): void;
|
|
653
|
-
/**
|
|
654
|
-
* Could increase crop growth when entity walks over crop
|
|
655
|
-
*/
|
|
656
|
-
setGrowsCrop(config?: {
|
|
657
|
-
chance?: number;
|
|
658
|
-
charges?: number;
|
|
659
|
-
}): void;
|
|
660
|
-
/**
|
|
661
|
-
* Defines the health pool for an entity, measured in health points (1 point = half a heart)
|
|
662
|
-
*/
|
|
663
|
-
setHealth(config?: {
|
|
664
|
-
max?: number;
|
|
665
|
-
value?: number | {
|
|
666
|
-
range_min?: number;
|
|
667
|
-
range_max?: number;
|
|
668
|
-
};
|
|
669
|
-
}): void;
|
|
670
|
-
/**
|
|
671
|
-
* Defines the entity's heartbeat
|
|
672
|
-
*/
|
|
673
|
-
setHeartbeat(config?: {
|
|
674
|
-
interval?: string;
|
|
675
|
-
sound_event?: string;
|
|
676
|
-
}): void;
|
|
677
|
-
/**
|
|
678
|
-
* Moves to and hides at their owned POI or the closest nearby
|
|
679
|
-
*/
|
|
680
|
-
setHide(): void;
|
|
681
|
-
/**
|
|
682
|
-
* Saves a home position for when the entity is spawned
|
|
683
|
-
*/
|
|
684
|
-
setHome(config?: {
|
|
685
|
-
home_block_list?: string[];
|
|
686
|
-
restriction_radius?: number;
|
|
687
|
-
restriction_type?: 'none' | 'random_movement' | 'all_movement';
|
|
688
|
-
}): void;
|
|
689
|
-
/**
|
|
690
|
-
* Determines the jump height for a horse or similar entity
|
|
691
|
-
*/
|
|
692
|
-
setHorseJumpStrength(config?: {
|
|
693
|
-
value?: number | {
|
|
694
|
-
range_min?: number;
|
|
695
|
-
range_max?: number;
|
|
696
|
-
};
|
|
697
|
-
}): void;
|
|
698
|
-
/**
|
|
699
|
-
* Defines a set of conditions under which an entity should take damage
|
|
700
|
-
*/
|
|
701
|
-
setHurtOnCondition(config?: {
|
|
702
|
-
damage_conditions?: Array<{
|
|
703
|
-
cause?: string;
|
|
704
|
-
damage_per_tick?: number;
|
|
705
|
-
filters?: {
|
|
706
|
-
subject?: string;
|
|
707
|
-
test?: string;
|
|
708
|
-
value?: any;
|
|
709
|
-
operator?: string;
|
|
710
|
-
[key: string]: any;
|
|
711
|
-
};
|
|
712
|
-
}>;
|
|
713
|
-
}): void;
|
|
714
|
-
/**
|
|
715
|
-
* Prevents entities from attacking the owner entity unless explicitly allowed
|
|
716
|
-
*/
|
|
717
|
-
setIgnoreCannotBeAttacked(config?: {
|
|
718
|
-
filters?: {
|
|
719
|
-
subject?: string;
|
|
720
|
-
test?: string;
|
|
721
|
-
value?: any;
|
|
722
|
-
operator?: string;
|
|
723
|
-
[key: string]: any;
|
|
724
|
-
};
|
|
725
|
-
}): void;
|
|
726
|
-
/**
|
|
727
|
-
* Applies WASD controls for rideable entities in air (3D movement control)
|
|
728
|
-
*/
|
|
729
|
-
setInputAirControlled(config?: Record<string, any>): void;
|
|
730
|
-
/**
|
|
731
|
-
* Applies WASD controls for rideable entities on ground
|
|
732
|
-
*/
|
|
733
|
-
setInputGroundControlled(): void;
|
|
734
|
-
/**
|
|
735
|
-
* Monitors when the entity enters or exits specific blocks and triggers events
|
|
736
|
-
*/
|
|
737
|
-
setInsideBlockNotifier(config?: {
|
|
738
|
-
block_list?: Array<{
|
|
739
|
-
block?: {
|
|
740
|
-
name?: string;
|
|
741
|
-
states?: {
|
|
742
|
-
[key: string]: string | number | boolean;
|
|
743
|
-
};
|
|
744
|
-
};
|
|
745
|
-
entered_block_event?: {
|
|
746
|
-
event?: string;
|
|
747
|
-
target?: string;
|
|
748
|
-
};
|
|
749
|
-
exited_block_event?: {
|
|
750
|
-
event?: string;
|
|
751
|
-
target?: string;
|
|
752
|
-
};
|
|
753
|
-
}>;
|
|
754
|
-
}): void;
|
|
755
|
-
/**
|
|
756
|
-
* Adds a timer since last rested to see if phantoms should spawn
|
|
757
|
-
*/
|
|
758
|
-
setInsomnia(config?: {
|
|
759
|
-
days_until_insomnia?: number;
|
|
760
|
-
}): void;
|
|
761
|
-
/**
|
|
762
|
-
* Despawns the Actor immediately
|
|
763
|
-
*/
|
|
764
|
-
setInstantDespawn(config?: {
|
|
765
|
-
remove_child_entities?: boolean;
|
|
766
|
-
}): void;
|
|
767
|
-
/**
|
|
768
|
-
* Defines interactions with this entity
|
|
769
|
-
*/
|
|
770
|
-
setInteract(config?: {
|
|
771
|
-
cooldown?: number;
|
|
772
|
-
cooldown_after_being_attacked?: number;
|
|
773
|
-
drop_item_slot?: string | number;
|
|
774
|
-
drop_item_y_offset?: number;
|
|
775
|
-
equip_item_slot?: string | number;
|
|
776
|
-
health_amount?: number;
|
|
777
|
-
hurt_item?: number;
|
|
778
|
-
interact_text?: string;
|
|
779
|
-
interactions?: Array<{
|
|
780
|
-
give_item?: boolean;
|
|
781
|
-
hurt_item?: number;
|
|
782
|
-
interact_text?: string;
|
|
783
|
-
on_interact?: string | {
|
|
784
|
-
filters?: {
|
|
785
|
-
subject?: string;
|
|
786
|
-
test?: string;
|
|
787
|
-
value?: any;
|
|
788
|
-
operator?: string;
|
|
789
|
-
[key: string]: any;
|
|
790
|
-
};
|
|
791
|
-
};
|
|
792
|
-
particle_on_start?: Array<{
|
|
793
|
-
particle_offset_towards_interactor?: boolean;
|
|
794
|
-
particle_type?: string;
|
|
795
|
-
particle_y_offset?: number;
|
|
796
|
-
}>;
|
|
797
|
-
play_sounds?: string;
|
|
798
|
-
repair_entity_item?: Array<{
|
|
799
|
-
amount?: number;
|
|
800
|
-
slot?: string | number;
|
|
801
|
-
}>;
|
|
802
|
-
spawn_entities?: string;
|
|
803
|
-
spawn_items?: Array<{
|
|
804
|
-
table?: string;
|
|
805
|
-
y_offset?: number;
|
|
806
|
-
}>;
|
|
807
|
-
swing?: boolean;
|
|
808
|
-
take_item?: boolean;
|
|
809
|
-
transform_to_item?: string;
|
|
810
|
-
use_item?: boolean;
|
|
811
|
-
vibration?: 'none' | 'shear' | 'entity_die' | 'entity_act' | 'entity_interact';
|
|
812
|
-
}>;
|
|
813
|
-
}): void;
|
|
814
|
-
setInventory(config?: {
|
|
815
|
-
additional_slots_per_strength?: number;
|
|
816
|
-
can_be_siphoned_from?: boolean;
|
|
817
|
-
container_type?: string;
|
|
818
|
-
inventory_size?: number;
|
|
819
|
-
private?: boolean;
|
|
820
|
-
restrict_to_owner?: boolean;
|
|
821
|
-
}): void;
|
|
822
|
-
setIsBaby(): void;
|
|
823
|
-
setIsCharged(): void;
|
|
824
|
-
setIsChested(): void;
|
|
825
|
-
setIsDyeable(config?: {
|
|
826
|
-
interact_text?: string;
|
|
827
|
-
}): void;
|
|
828
|
-
setIsIgnited(): void;
|
|
829
|
-
setIsPregnant(): void;
|
|
830
|
-
setItemControllable(config?: {
|
|
831
|
-
control_items?: string | string[];
|
|
832
|
-
}): void;
|
|
833
|
-
/**
|
|
834
|
-
* Makes the entity leashable with customized spring behavior
|
|
835
|
-
*/
|
|
836
|
-
setLeashable(config?: {
|
|
837
|
-
can_be_cut?: boolean;
|
|
838
|
-
can_be_stolen?: boolean;
|
|
839
|
-
hard_distance?: number;
|
|
840
|
-
max_distance?: number;
|
|
841
|
-
on_leash?: string | {
|
|
842
|
-
event: string;
|
|
843
|
-
target?: string;
|
|
844
|
-
};
|
|
845
|
-
on_unleash?: string | {
|
|
846
|
-
event: string;
|
|
847
|
-
target?: string;
|
|
848
|
-
};
|
|
849
|
-
soft_distance?: number;
|
|
850
|
-
presets?: Array<{
|
|
851
|
-
filter?: {
|
|
852
|
-
subject?: string;
|
|
853
|
-
test?: string;
|
|
854
|
-
value?: any;
|
|
855
|
-
operator?: string;
|
|
856
|
-
[key: string]: any;
|
|
857
|
-
};
|
|
858
|
-
spring_type?: 'bouncy' | 'dampened' | 'quad_dampened';
|
|
859
|
-
}>;
|
|
860
|
-
}): void;
|
|
861
|
-
/**
|
|
862
|
-
* Allows entities to be leashed to this entity with retrieval option
|
|
863
|
-
*/
|
|
864
|
-
setLeashableTo(config?: {
|
|
865
|
-
can_retrieve_from?: boolean;
|
|
866
|
-
}): void;
|
|
867
|
-
/**
|
|
868
|
-
* Defines behavior when entities look at the owner entity
|
|
869
|
-
*/
|
|
870
|
-
setLookedAt(config?: {
|
|
871
|
-
field_of_view?: number;
|
|
872
|
-
filters?: {
|
|
873
|
-
subject?: string;
|
|
874
|
-
test?: string;
|
|
875
|
-
value?: any;
|
|
876
|
-
operator?: string;
|
|
877
|
-
[key: string]: any;
|
|
878
|
-
};
|
|
879
|
-
find_players_only?: boolean;
|
|
880
|
-
line_of_sight_obstruction_type?: 'outline' | 'collision' | 'collision_for_camera';
|
|
881
|
-
look_at_locations?: string[];
|
|
882
|
-
looked_at_cooldown?: {
|
|
883
|
-
min: number;
|
|
884
|
-
max: number;
|
|
885
|
-
};
|
|
886
|
-
looked_at_event?: string | {
|
|
887
|
-
event: string;
|
|
888
|
-
target?: string;
|
|
889
|
-
};
|
|
890
|
-
min_looked_at_duration?: number;
|
|
891
|
-
not_looked_at_event?: string | {
|
|
892
|
-
event: string;
|
|
893
|
-
target?: string;
|
|
894
|
-
};
|
|
895
|
-
scale_fov_by_distance?: boolean;
|
|
896
|
-
search_radius?: number;
|
|
897
|
-
set_target?: boolean | 'never' | 'once_and_stop_scanning' | 'once_and_keep_scanning';
|
|
898
|
-
}): void;
|
|
899
|
-
/**
|
|
900
|
-
* Sets the loot table for the entity
|
|
901
|
-
*/
|
|
902
|
-
setLoot(config: {
|
|
903
|
-
table: string;
|
|
904
|
-
}): void;
|
|
905
|
-
/**
|
|
906
|
-
* Enables wandering trader management for the entity
|
|
907
|
-
*/
|
|
908
|
-
setManagedWanderingTrader(): void;
|
|
909
|
-
/**
|
|
910
|
-
* Sets the mark variant for the entity (visual differentiation)
|
|
911
|
-
*/
|
|
912
|
-
setMarkVariant(value: number): void;
|
|
913
|
-
/**
|
|
914
|
-
* Applies a mob effect to entities within range
|
|
915
|
-
*/
|
|
916
|
-
setMobEffect(config: {
|
|
917
|
-
ambient?: boolean;
|
|
918
|
-
cooldown_time?: number;
|
|
919
|
-
effect_range?: number;
|
|
920
|
-
effect_time?: number | 'infinite';
|
|
921
|
-
entity_filter?: {
|
|
922
|
-
subject?: string;
|
|
923
|
-
test?: string;
|
|
924
|
-
value?: any;
|
|
925
|
-
operator?: string;
|
|
926
|
-
[key: string]: any;
|
|
927
|
-
};
|
|
928
|
-
mob_effect: string;
|
|
929
|
-
}): void;
|
|
930
|
-
/**
|
|
931
|
-
* Sets mob effect immunity for the entity
|
|
932
|
-
*/
|
|
933
|
-
setMobEffectImmunity(mob_effects: string[]): void;
|
|
934
|
-
setItemHopper(): void;
|
|
935
|
-
/**
|
|
936
|
-
* Sets the base movement speed for the entity
|
|
937
|
-
*/
|
|
938
|
-
setMovement(config?: {
|
|
939
|
-
max?: number;
|
|
940
|
-
value?: number | {
|
|
941
|
-
range_min: number;
|
|
942
|
-
range_max: number;
|
|
943
|
-
};
|
|
944
|
-
}): void;
|
|
945
|
-
/**
|
|
946
|
-
* Sets amphibious movement control (swim in water and walk on land)
|
|
947
|
-
*/
|
|
948
|
-
setMovementAmphibious(max_turn?: number): void;
|
|
949
|
-
/**
|
|
950
|
-
* Sets basic movement control
|
|
951
|
-
*/
|
|
952
|
-
setMovementBasic(max_turn?: number): void;
|
|
953
|
-
/**
|
|
954
|
-
* Note: This component is not currently being used in game
|
|
955
|
-
*/
|
|
956
|
-
setMovementDolphin(): void;
|
|
957
|
-
/**
|
|
958
|
-
* Sets fly movement control
|
|
959
|
-
*/
|
|
960
|
-
setMovementFly(config?: {
|
|
961
|
-
max_turn?: number;
|
|
962
|
-
speed_when_turning?: number;
|
|
963
|
-
start_speed?: number;
|
|
964
|
-
}): void;
|
|
965
|
-
/**
|
|
966
|
-
* Sets generic movement control (fly, swim, climb, etc.)
|
|
967
|
-
*/
|
|
968
|
-
setMovementGeneric(max_turn?: number): void;
|
|
969
|
-
/**
|
|
970
|
-
* Sets glide movement control
|
|
971
|
-
*/
|
|
972
|
-
setMovementGlide(config?: {
|
|
973
|
-
max_turn?: number;
|
|
974
|
-
speed_when_turning?: number;
|
|
975
|
-
}): void;
|
|
976
|
-
/**
|
|
977
|
-
* Sets hover movement control
|
|
978
|
-
*/
|
|
979
|
-
setMovementHover(max_turn?: number): void;
|
|
980
|
-
/**
|
|
981
|
-
* Sets jump movement control (requires minecraft:behavior.slime_attack for target following)
|
|
982
|
-
*/
|
|
983
|
-
setMovementJump(config?: {
|
|
984
|
-
jump_delay?: number | [number, number] | {
|
|
985
|
-
range_min: number;
|
|
986
|
-
range_max: number;
|
|
987
|
-
};
|
|
988
|
-
max_turn?: number;
|
|
989
|
-
}): void;
|
|
990
|
-
/**
|
|
991
|
-
* Sets skip movement control
|
|
992
|
-
*/
|
|
993
|
-
setMovementSkip(max_turn?: number): void;
|
|
994
|
-
/**
|
|
995
|
-
* Sets movement sound distance offset
|
|
996
|
-
*/
|
|
997
|
-
setMovementSoundDistanceOffset(value?: number): void;
|
|
998
|
-
/**
|
|
999
|
-
* Sets sway movement control
|
|
1000
|
-
*/
|
|
1001
|
-
setMovementSway(config?: {
|
|
1002
|
-
max_turn?: number;
|
|
1003
|
-
sway_amplitude?: number;
|
|
1004
|
-
sway_frequency?: number;
|
|
1005
|
-
}): void;
|
|
1006
|
-
/**
|
|
1007
|
-
* Makes the entity nameable with customization options
|
|
1008
|
-
*/
|
|
1009
|
-
setNameable(config?: {
|
|
1010
|
-
allow_name_tag_renaming?: boolean;
|
|
1011
|
-
always_show?: boolean;
|
|
1012
|
-
default_trigger?: string;
|
|
1013
|
-
name_actions?: Array<{
|
|
1014
|
-
name_filter?: string[];
|
|
1015
|
-
on_named?: string | {
|
|
1016
|
-
event: string;
|
|
1017
|
-
target?: string;
|
|
1018
|
-
};
|
|
1019
|
-
}>;
|
|
1020
|
-
}): void;
|
|
1021
|
-
/**
|
|
1022
|
-
* Sets climb navigation for the entity (like vanilla spiders)
|
|
1023
|
-
*/
|
|
1024
|
-
setNavigationClimb(config?: {
|
|
1025
|
-
avoid_damage_blocks?: boolean;
|
|
1026
|
-
avoid_portals?: boolean;
|
|
1027
|
-
avoid_sun?: boolean;
|
|
1028
|
-
avoid_water?: boolean;
|
|
1029
|
-
blocks_to_avoid?: string[];
|
|
1030
|
-
can_breach?: boolean;
|
|
1031
|
-
can_break_doors?: boolean;
|
|
1032
|
-
can_jump?: boolean;
|
|
1033
|
-
can_open_doors?: boolean;
|
|
1034
|
-
can_open_iron_doors?: boolean;
|
|
1035
|
-
can_pass_doors?: boolean;
|
|
1036
|
-
can_path_from_air?: boolean;
|
|
1037
|
-
can_path_over_lava?: boolean;
|
|
1038
|
-
can_path_over_water?: boolean;
|
|
1039
|
-
can_sink?: boolean;
|
|
1040
|
-
can_swim?: boolean;
|
|
1041
|
-
can_walk?: boolean;
|
|
1042
|
-
can_walk_in_lava?: boolean;
|
|
1043
|
-
is_amphibious?: boolean;
|
|
1044
|
-
}): void;
|
|
1045
|
-
/**
|
|
1046
|
-
* Sets float navigation for the entity
|
|
1047
|
-
*/
|
|
1048
|
-
setNavigationFloat(config: {
|
|
1049
|
-
avoid_damage_blocks?: boolean;
|
|
1050
|
-
avoid_portals?: boolean;
|
|
1051
|
-
avoid_sun?: boolean;
|
|
1052
|
-
avoid_water?: boolean;
|
|
1053
|
-
blocks_to_avoid?: string[];
|
|
1054
|
-
can_breach?: boolean;
|
|
1055
|
-
can_break_doors?: boolean;
|
|
1056
|
-
can_jump?: boolean;
|
|
1057
|
-
can_open_doors?: boolean;
|
|
1058
|
-
can_open_iron_doors?: boolean;
|
|
1059
|
-
can_pass_doors?: boolean;
|
|
1060
|
-
can_path_from_air?: boolean;
|
|
1061
|
-
can_path_over_water?: boolean;
|
|
1062
|
-
can_sink?: boolean;
|
|
1063
|
-
can_swim?: boolean;
|
|
1064
|
-
can_walk?: boolean;
|
|
1065
|
-
can_walk_in_lava?: boolean;
|
|
1066
|
-
is_amphibious?: boolean;
|
|
1067
|
-
using_door_annotation?: boolean;
|
|
1068
|
-
}): void;
|
|
1069
|
-
/**
|
|
1070
|
-
* Sets fly navigation for the entity
|
|
1071
|
-
*/
|
|
1072
|
-
setNavigationFly(config: {
|
|
1073
|
-
avoid_damage_blocks?: boolean;
|
|
1074
|
-
avoid_portals?: boolean;
|
|
1075
|
-
avoid_sun?: boolean;
|
|
1076
|
-
avoid_water?: boolean;
|
|
1077
|
-
blocks_to_avoid?: string[];
|
|
1078
|
-
can_breach?: boolean;
|
|
1079
|
-
can_break_doors?: boolean;
|
|
1080
|
-
can_jump?: boolean;
|
|
1081
|
-
can_open_doors?: boolean;
|
|
1082
|
-
can_open_iron_doors?: boolean;
|
|
1083
|
-
can_pass_doors?: boolean;
|
|
1084
|
-
can_path_from_air?: boolean;
|
|
1085
|
-
can_path_over_water?: boolean;
|
|
1086
|
-
can_sink?: boolean;
|
|
1087
|
-
can_swim?: boolean;
|
|
1088
|
-
can_walk?: boolean;
|
|
1089
|
-
can_walk_in_lava?: boolean;
|
|
1090
|
-
is_amphibious?: boolean;
|
|
1091
|
-
using_door_annotation?: boolean;
|
|
1092
|
-
}): void;
|
|
1093
|
-
/**
|
|
1094
|
-
* Sets generic navigation for the entity
|
|
1095
|
-
*/
|
|
1096
|
-
setNavigationGeneric(config: {
|
|
1097
|
-
avoid_damage_blocks?: boolean;
|
|
1098
|
-
avoid_portals?: boolean;
|
|
1099
|
-
avoid_sun?: boolean;
|
|
1100
|
-
avoid_water?: boolean;
|
|
1101
|
-
blocks_to_avoid?: string[];
|
|
1102
|
-
can_breach?: boolean;
|
|
1103
|
-
can_break_doors?: boolean;
|
|
1104
|
-
can_jump?: boolean;
|
|
1105
|
-
can_open_doors?: boolean;
|
|
1106
|
-
can_open_iron_doors?: boolean;
|
|
1107
|
-
can_pass_doors?: boolean;
|
|
1108
|
-
can_path_from_air?: boolean;
|
|
1109
|
-
can_path_over_water?: boolean;
|
|
1110
|
-
can_sink?: boolean;
|
|
1111
|
-
can_swim?: boolean;
|
|
1112
|
-
can_walk?: boolean;
|
|
1113
|
-
can_walk_in_lava?: boolean;
|
|
1114
|
-
is_amphibious?: boolean;
|
|
1115
|
-
using_door_annotation?: boolean;
|
|
1116
|
-
}): void;
|
|
1117
|
-
/**
|
|
1118
|
-
* Sets hover navigation for the entity
|
|
1119
|
-
*/
|
|
1120
|
-
setNavigationHover(config: {
|
|
1121
|
-
avoid_damage_blocks?: boolean;
|
|
1122
|
-
avoid_portals?: boolean;
|
|
1123
|
-
avoid_sun?: boolean;
|
|
1124
|
-
avoid_water?: boolean;
|
|
1125
|
-
blocks_to_avoid?: string[];
|
|
1126
|
-
can_breach?: boolean;
|
|
1127
|
-
can_break_doors?: boolean;
|
|
1128
|
-
can_jump?: boolean;
|
|
1129
|
-
can_open_doors?: boolean;
|
|
1130
|
-
can_open_iron_doors?: boolean;
|
|
1131
|
-
can_pass_doors?: boolean;
|
|
1132
|
-
can_path_from_air?: boolean;
|
|
1133
|
-
can_path_over_water?: boolean;
|
|
1134
|
-
can_sink?: boolean;
|
|
1135
|
-
can_swim?: boolean;
|
|
1136
|
-
can_walk?: boolean;
|
|
1137
|
-
can_walk_in_lava?: boolean;
|
|
1138
|
-
is_amphibious?: boolean;
|
|
1139
|
-
using_door_annotation?: boolean;
|
|
1140
|
-
}): void;
|
|
1141
|
-
/**
|
|
1142
|
-
* Sets swim navigation for the entity
|
|
1143
|
-
*/
|
|
1144
|
-
setNavigationSwim(config: {
|
|
1145
|
-
avoid_damage_blocks?: boolean;
|
|
1146
|
-
avoid_portals?: boolean;
|
|
1147
|
-
avoid_sun?: boolean;
|
|
1148
|
-
avoid_water?: boolean;
|
|
1149
|
-
blocks_to_avoid?: string[] | Array<{
|
|
1150
|
-
name?: string;
|
|
1151
|
-
tags?: string;
|
|
1152
|
-
}>;
|
|
1153
|
-
can_breach?: boolean;
|
|
1154
|
-
can_break_doors?: boolean;
|
|
1155
|
-
can_jump?: boolean;
|
|
1156
|
-
can_open_doors?: boolean;
|
|
1157
|
-
can_open_iron_doors?: boolean;
|
|
1158
|
-
can_pass_doors?: boolean;
|
|
1159
|
-
can_path_from_air?: boolean;
|
|
1160
|
-
can_path_over_lava?: boolean;
|
|
1161
|
-
can_path_over_water?: boolean;
|
|
1162
|
-
can_sink?: boolean;
|
|
1163
|
-
can_swim?: boolean;
|
|
1164
|
-
can_walk?: boolean;
|
|
1165
|
-
can_walk_in_lava?: boolean;
|
|
1166
|
-
is_amphibious?: boolean;
|
|
1167
|
-
}): void;
|
|
1168
|
-
/**
|
|
1169
|
-
* Sets walk navigation for the entity
|
|
1170
|
-
*/
|
|
1171
|
-
setNavigationWalk(config: {
|
|
1172
|
-
avoid_damage_blocks?: boolean;
|
|
1173
|
-
avoid_portals?: boolean;
|
|
1174
|
-
avoid_sun?: boolean;
|
|
1175
|
-
avoid_water?: boolean;
|
|
1176
|
-
blocks_to_avoid?: string[] | Array<{
|
|
1177
|
-
name?: string;
|
|
1178
|
-
tags?: string;
|
|
1179
|
-
}>;
|
|
1180
|
-
can_breach?: boolean;
|
|
1181
|
-
can_break_doors?: boolean;
|
|
1182
|
-
can_float?: boolean;
|
|
1183
|
-
can_jump?: boolean;
|
|
1184
|
-
can_open_doors?: boolean;
|
|
1185
|
-
can_open_iron_doors?: boolean;
|
|
1186
|
-
can_pass_doors?: boolean;
|
|
1187
|
-
can_path_from_air?: boolean;
|
|
1188
|
-
can_path_over_lava?: boolean;
|
|
1189
|
-
can_path_over_water?: boolean;
|
|
1190
|
-
can_sink?: boolean;
|
|
1191
|
-
can_swim?: boolean;
|
|
1192
|
-
can_walk?: boolean;
|
|
1193
|
-
can_walk_in_lava?: boolean;
|
|
1194
|
-
is_amphibious?: boolean;
|
|
1195
|
-
using_door_annotation?: boolean;
|
|
1196
|
-
}): void;
|
|
1197
|
-
/**
|
|
1198
|
-
* Sets out_of_control configuration for the entity, defining the entity's 'out of control' state
|
|
1199
|
-
*/
|
|
1200
|
-
setOutOfControl(): void;
|
|
1201
|
-
/**
|
|
1202
|
-
* Sets peek configuration for the entity, defining the events that should be called during it
|
|
1203
|
-
*/
|
|
1204
|
-
setPeek(config: {
|
|
1205
|
-
on_close?: {
|
|
1206
|
-
event?: string;
|
|
1207
|
-
};
|
|
1208
|
-
on_open?: {
|
|
1209
|
-
event?: string;
|
|
1210
|
-
};
|
|
1211
|
-
on_target_open?: {
|
|
1212
|
-
event?: string;
|
|
1213
|
-
};
|
|
1214
|
-
}): void;
|
|
1215
|
-
/**
|
|
1216
|
-
* Sets persistent configuration for the entity, defining whether an entity should be persistent
|
|
1217
|
-
*/
|
|
1218
|
-
setPersistent(): void;
|
|
1219
|
-
/**
|
|
1220
|
-
* Sets physics configuration for the entity, defining physics properties
|
|
1221
|
-
*/
|
|
1222
|
-
setPhysics(config: {
|
|
1223
|
-
has_collision?: boolean;
|
|
1224
|
-
has_gravity?: boolean;
|
|
1225
|
-
push_towards_closest_space?: boolean;
|
|
1226
|
-
}): void;
|
|
1227
|
-
/**
|
|
1228
|
-
* Sets player.exhaustion configuration for the player, defining the player's exhaustion level
|
|
1229
|
-
*/
|
|
1230
|
-
setPlayerExhaustion(config: {
|
|
1231
|
-
max?: number;
|
|
1232
|
-
value?: number;
|
|
1233
|
-
}): void;
|
|
1234
|
-
/**
|
|
1235
|
-
* Sets offspring configuration for the entity
|
|
1236
|
-
*/
|
|
1237
|
-
setOffspring(config: {
|
|
1238
|
-
blend_attributes?: boolean;
|
|
1239
|
-
deny_parents_variant?: Array<{
|
|
1240
|
-
chance?: number;
|
|
1241
|
-
max_variant?: number;
|
|
1242
|
-
min_variant?: number;
|
|
1243
|
-
}>;
|
|
1244
|
-
inherit_tamed?: boolean;
|
|
1245
|
-
mutation_factor?: {
|
|
1246
|
-
color?: number;
|
|
1247
|
-
extra_variant?: number;
|
|
1248
|
-
variant?: number;
|
|
1249
|
-
};
|
|
1250
|
-
offspring_pairs?: Record<string, string>;
|
|
1251
|
-
parent_centric_attribute_blending?: {
|
|
1252
|
-
attribute?: string;
|
|
1253
|
-
dampening?: number;
|
|
1254
|
-
};
|
|
1255
|
-
property_inheritance?: Record<string, any>;
|
|
1256
|
-
random_extra_variant_mutation_interval?: {
|
|
1257
|
-
range_max?: number;
|
|
1258
|
-
range_min?: number;
|
|
1259
|
-
};
|
|
1260
|
-
random_variant_mutation_interval?: {
|
|
1261
|
-
range_max?: number;
|
|
1262
|
-
range_min?: number;
|
|
1263
|
-
};
|
|
1264
|
-
}): void;
|
|
1265
|
-
}
|
|
1266
|
-
export { EntityComponent };
|