@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.
Files changed (40) hide show
  1. package/dist/chunk-DEq-mXcV.js +15 -0
  2. package/dist/index.d.ts +4861 -5024
  3. package/dist/index.js +6384 -12177
  4. package/dist/index.js.map +1 -1
  5. package/package.json +14 -6
  6. package/dist/types/ast/index.d.ts +0 -7
  7. package/dist/types/ast/prop.d.ts +0 -8
  8. package/dist/types/ast/tag.d.ts +0 -66
  9. package/dist/types/compile-mcx/compiler/compileData.d.ts +0 -20
  10. package/dist/types/compile-mcx/compiler/index.d.ts +0 -36
  11. package/dist/types/compile-mcx/compiler/main.d.ts +0 -6
  12. package/dist/types/compile-mcx/compiler/utils.d.ts +0 -11
  13. package/dist/types/compile-mcx/index.d.ts +0 -1
  14. package/dist/types/compile-mcx/types.d.ts +0 -52
  15. package/dist/types/compile-mcx/utils.node.d.ts +0 -14
  16. package/dist/types/index.d.ts +0 -10
  17. package/dist/types/mcx-component/components/block.d.ts +0 -4
  18. package/dist/types/mcx-component/components/entity.d.ts +0 -1266
  19. package/dist/types/mcx-component/components/item.d.ts +0 -520
  20. package/dist/types/mcx-component/index.d.ts +0 -17
  21. package/dist/types/mcx-component/lib.d.ts +0 -32
  22. package/dist/types/mcx-component/types/AttackCriticalHitChoices.d.ts +0 -3
  23. package/dist/types/mcx-component/types/EnchantableSlot.d.ts +0 -9
  24. package/dist/types/mcx-component/types/ParticleType.d.ts +0 -8
  25. package/dist/types/mcx-component/types/SoundEvent.d.ts +0 -8
  26. package/dist/types/mcx-component/types/StartSoundChoices.d.ts +0 -3
  27. package/dist/types/mcx-component/types.d.ts +0 -3053
  28. package/dist/types/mcx-component/utils.d.ts +0 -2
  29. package/dist/types/mcx-component/vm.d.ts +0 -28
  30. package/dist/types/transforms/config.d.ts +0 -8
  31. package/dist/types/transforms/file_id.d.ts +0 -1
  32. package/dist/types/transforms/index.d.ts +0 -5
  33. package/dist/types/transforms/main.d.ts +0 -2
  34. package/dist/types/transforms/utils.d.ts +0 -22
  35. package/dist/types/transforms/x-comp/index.d.ts +0 -3
  36. package/dist/types/transforms/x-comp/x-app.d.ts +0 -2
  37. package/dist/types/transforms/x-comp/x-event.d.ts +0 -2
  38. package/dist/types/transforms/x-comp/x-ui.d.ts +0 -2
  39. package/dist/types/types.d.ts +0 -100
  40. package/dist/types/utils.d.ts +0 -18
@@ -1,3053 +0,0 @@
1
- import ParticleType from './types/ParticleType';
2
- import SoundEvent from './types/SoundEvent';
3
- import EnchantableSlot from './types/EnchantableSlot';
4
- import type { PNGImageComponent } from './lib';
5
- export interface FilePoint {
6
- /**
7
- * Edit file path base
8
- */
9
- base: 'behavior' | 'resources' | 'root';
10
- /**
11
- * <BASE>/$file
12
- */
13
- file: string;
14
- }
15
- export interface FileBindSource {
16
- /**
17
- * Bind some value
18
- * Mcx can write to file
19
- */
20
- bind: 'item_texture';
21
- /**
22
- * Set bind value mode
23
- * @example type = "append"; bind value => array (append expression return)
24
- * @example type = "all_replace" bind value => unknown (all replace)
25
- */
26
- type: 'append' | 'all_replace';
27
- }
28
- export type DefineEntry = {
29
- from: 'var';
30
- data: string;
31
- } | {
32
- from: 'read_file';
33
- data: FilePoint;
34
- default?: string;
35
- };
36
- export type FileEditExpression<T extends Record<string, DefineEntry> = Record<string, DefineEntry>> = {
37
- define: T;
38
- run: (define: {
39
- [K in keyof T]: string;
40
- }) => Promise<string | string[] | [string, string][]>;
41
- };
42
- export declare function createFileEdit<T extends Record<string, DefineEntry>>(expression: {
43
- define: T;
44
- run: (define: {
45
- [K in keyof T]: string;
46
- }) => Promise<string | string[] | [string, string][]>;
47
- }): FileEditExpression<T>;
48
- export type FileEditOption = {
49
- type: 'edit';
50
- id?: string;
51
- source: FilePoint | FileBindSource;
52
- expression: FileEditExpression<any>;
53
- } | {
54
- type: 'copy_assets';
55
- id?: string;
56
- source: FilePoint;
57
- output: FilePoint;
58
- };
59
- export interface BaseJson {
60
- format_version: string;
61
- _meta: {
62
- type: 'item' | 'entity';
63
- file_edit?: (FileEditOption | {
64
- type: 'batch';
65
- options: FileEditOption[];
66
- id?: string;
67
- })[];
68
- };
69
- }
70
- interface ItemComponentOptions {
71
- id: string;
72
- name: string;
73
- format: string;
74
- components: Partial<{
75
- offHand: boolean;
76
- damage: number;
77
- canDestroyInCreative: boolean;
78
- icon: string | PNGImageComponent;
79
- block_placer?: {
80
- aligned_placement?: boolean;
81
- block: string;
82
- replace_block_item?: boolean;
83
- use_on?: Array<string | {
84
- name: string;
85
- states?: Record<string, number | string | boolean>;
86
- tags?: string;
87
- }>;
88
- };
89
- cooldown?: {
90
- category: string;
91
- duration: number;
92
- type?: 'use' | 'attack';
93
- };
94
- compostable?: {
95
- composting_chance: number;
96
- };
97
- bundle_interaction?: {
98
- num_viewable_slots?: number;
99
- };
100
- /**
101
- * Enables an item to store data of the dynamic container associated with it.
102
- * A dynamic container is a container for storing items that is linked to an item instead of a block or an entity.
103
- *
104
- * Tip:While this component can be defined on its own, to be able to interact with the item's storage container
105
- * the item must have a minecraft:bundle_interaction item component defined.
106
- *
107
- * Tip:This item requires a format version of at least 1.21.40.
108
- *
109
- * @example {
110
- * "max_slots": 64,
111
- * "max_weight_limit": 64,
112
- * "weight_in_storage_item": 4,
113
- * "allow_nested_storage_items": true,
114
- * "banned_items": ["minecraft:shulker_box", "minecraft:undyed_shulker_box"]
115
- * }
116
- */
117
- 'minecraft:storage_item'?: {
118
- /**
119
- * Determines whether another Storage Item is allowed inside of this item.
120
- * @default true
121
- */
122
- allow_nested_storage_items?: boolean;
123
- /**
124
- * List of items that are exclusively allowed in this Storage Item.
125
- * If empty all items are allowed.
126
- * @default []
127
- */
128
- allowed_items?: string[];
129
- /**
130
- * List of items that are not allowed in this Storage Item.
131
- * @default []
132
- * @example ["minecraft:shulker_box", "minecraft:undyed_shulker_box"]
133
- */
134
- banned_items?: string[];
135
- /**
136
- * The maximum number of slots in the storage container.
137
- * Maximum is 64. Default is 64. Value must be <= 64.
138
- * @default 64
139
- * @type Integer number
140
- */
141
- max_slots?: number;
142
- /**
143
- * The maximum allowed weight of the sum of all contained items.
144
- * Maximum is 64. Default is 64. Value must be <= 64.
145
- * @default 64
146
- * @type Decimal number
147
- */
148
- max_weight_limit?: number;
149
- /**
150
- * The weight of this item when inside another Storage Item.
151
- * Default is 4. 0 means item is not allowed in another Storage Item.
152
- * @default 4
153
- * @type Decimal number
154
- */
155
- weight_in_storage_item?: number;
156
- };
157
- /**
158
- * Specifies the weight of an item when stored inside another storage item.
159
- * Controls how much weight this item contributes to storage's total weight.
160
- *
161
- * @example {"weight_in_storage_item": 4}
162
- */
163
- 'minecraft:storage_weight_modifier'?: {
164
- /**
165
- * The weight of this item when inside another Storage Item.
166
- * Default is 4. 0 means item is not allowed in another Storage Item.
167
- * @default 4
168
- * @type Integer number
169
- */
170
- weight_in_storage_item: number;
171
- };
172
- /**
173
- * Specifies the maximum weight limit that a storage item can hold.
174
- * Controls the total weight capacity of the storage container.
175
- *
176
- * @example {"max_weight_limit": 64}
177
- */
178
- 'minecraft:storage_weight_limit'?: {
179
- /**
180
- * The maximum allowed weight of the sum of all contained items.
181
- * Maximum is 64. Default is 64. Value must be <= 64.
182
- * @default 64
183
- * @type Integer number
184
- */
185
- max_weight_limit: number;
186
- };
187
- /**
188
- * Makes an item throwable by the player, similar to a snowball or ender pearl.
189
- * Use with minecraft:projectile to specify which entity is spawned when thrown.
190
- *
191
- * 注意:Combine with minecraft:projectile to define the projectile entity.
192
- * For charged throws (like tridents), set scale_power_by_draw_duration to true and configure min/max draw durations.
193
- */
194
- 'minecraft:throwable'?: {
195
- /**
196
- * Determines whether the item should use the swing animation when thrown.
197
- * @default false
198
- */
199
- do_swing_animation?: boolean;
200
- /**
201
- * The scale at which the power of the throw increases.
202
- * @default 1.0
203
- */
204
- launch_power_scale?: number;
205
- /**
206
- * The maximum duration to draw a throwable item.
207
- * @default 0.0
208
- */
209
- max_draw_duration?: number;
210
- /**
211
- * The maximum power to launch the throwable item.
212
- * @default 1.0
213
- */
214
- max_launch_power?: number;
215
- /**
216
- * The minimum duration to draw a throwable item.
217
- * @default 0.0
218
- */
219
- min_draw_duration?: number;
220
- /**
221
- * Whether or not the power of the throw increases with duration charged.
222
- * @default false
223
- */
224
- scale_power_by_draw_duration?: boolean;
225
- };
226
- throwable?: {
227
- do_swing_animation?: boolean;
228
- launch_power_scale?: number;
229
- max_draw_duration?: number;
230
- max_launch_power?: number;
231
- min_draw_duration?: number;
232
- scale_power_by_draw_duration?: boolean;
233
- };
234
- /**
235
- * Determines which tags are included on a given item.
236
- */
237
- 'minecraft:tags'?: {
238
- /**
239
- * An array that can contain multiple item tags.
240
- * @default []
241
- */
242
- tags?: string[];
243
- };
244
- tags?: {
245
- tags?: string[];
246
- };
247
- /**
248
- * Duration, in seconds, of the item's swing animation played when mining or attacking.
249
- * Affects visuals only and does not impact attack frequency or other gameplay mechanics.
250
- */
251
- 'minecraft:swing_duration'?: {
252
- /**
253
- * Duration, in seconds, of the item's swing animation played when mining or attacking.
254
- * Affects visuals only and does not impact attack frequency or other gameplay mechanics.
255
- * @default 0.30000001192092896
256
- */
257
- value?: number;
258
- };
259
- swing_duration?: {
260
- value?: number;
261
- };
262
- /**
263
- * Use_animation specifies which animation is played when the player uses the item.
264
- * Supported animations: 'eat', 'drink', 'block', 'bow', 'camera', 'spear', 'crossbow', 'spyglass', 'toot_horn', 'brush'.
265
- */
266
- 'minecraft:use_animation'?: string | {
267
- /**
268
- * The animation type to play when the item is used.
269
- */
270
- value?: string;
271
- };
272
- /**
273
- * Sets the wearable item component, which allows an item to be worn by a player in a specified equipment slot.
274
- * Valid slot values: slot.armor.head, slot.armor.chest, slot.armor.legs, slot.armor.feet, slot.armor.body,
275
- * slot.weapon.mainhand, slot.weapon.offhand, slot.hotbar, slot.inventory, slot.enderchest, slot.saddle, slot.armor, slot.chest
276
- */
277
- 'minecraft:wearable'?: {
278
- /**
279
- * Defines the equipment slot this item can be equipped to (required).
280
- */
281
- slot: 'slot.armor.head' | 'slot.armor.chest' | 'slot.armor.legs' | 'slot.armor.feet' | 'slot.armor.body' | 'slot.weapon.mainhand' | 'slot.weapon.offhand' | 'slot.hotbar' | 'slot.inventory' | 'slot.enderchest' | 'slot.saddle' | 'slot.armor' | 'slot.chest';
282
- /**
283
- * Determines how much armor protection this wearable item provides (non-negative integer).
284
- */
285
- protection?: number;
286
- /**
287
- * Determines whether the player's location relative to the origin is hidden from other entities.
288
- */
289
- hides_player_location?: boolean;
290
- /**
291
- * Determines whether this wearable item can be dispensed from dispensers.
292
- */
293
- dispensable?: boolean;
294
- };
295
- /**
296
- * Determines how long an item takes to use and optional use modifiers.
297
- * Use duration is required, and movement modifier must be ≤ 1.0.
298
- */
299
- 'minecraft:use_modifiers'?: {
300
- /**
301
- * How long it takes to use the item (required, non-negative).
302
- */
303
- use_duration: number;
304
- /**
305
- * Optional value that modifiers the entity's movement speed when this item is used (must be ≤ 1.0).
306
- */
307
- movement_modifier?: number;
308
- /**
309
- * Whether vibrations are emitted when the item starts or stops being used.
310
- */
311
- emit_vibrations?: boolean;
312
- /**
313
- * Sound played when the item starts being used.
314
- */
315
- start_sound?: string;
316
- };
317
- /**
318
- * Overrides the swing sounds emitted by the user while the item is being used.
319
- * Specifies the sound to play when swinging the item.
320
- */
321
- 'minecraft:swing_sounds'?: {
322
- /**
323
- * Sound played when an attack hits and deals critical damage.
324
- */
325
- attack_critical_hit?: string;
326
- /**
327
- * Sound played when an attack hits.
328
- */
329
- attack_hit?: string;
330
- /**
331
- * Sound played when an attack misses or deals no damage due to invulnerability.
332
- */
333
- attack_miss?: string;
334
- };
335
- use_animation?: string | {
336
- value?: string;
337
- };
338
- wearable?: {
339
- slot: 'slot.armor.head' | 'slot.armor.chest' | 'slot.armor.legs' | 'slot.armor.feet' | 'slot.armor.body' | 'slot.weapon.mainhand' | 'slot.weapon.offhand';
340
- protection?: number;
341
- hides_player_location?: boolean;
342
- dispensable?: boolean;
343
- };
344
- use_modifiers?: {
345
- use_duration: number;
346
- movement_modifier?: number;
347
- emit_vibrations?: boolean;
348
- start_sound?: string;
349
- };
350
- swing_sounds?: {
351
- attack_critical_hit?: string;
352
- attack_hit?: string;
353
- attack_miss?: string;
354
- };
355
- storage_item?: {
356
- allow_nested_storage_items?: boolean;
357
- allowed_items?: string[];
358
- banned_items?: string[];
359
- max_slots?: number;
360
- max_weight_limit?: number;
361
- weight_in_storage_item?: number;
362
- };
363
- storage_weight_modifier?: {
364
- weight_in_storage_item: number;
365
- };
366
- storage_weight_limit?: {
367
- max_weight_limit: number;
368
- };
369
- glint?: boolean;
370
- hand_equipped?: boolean;
371
- digger?: {
372
- use_efficiency?: boolean;
373
- destroy_speeds?: Array<{
374
- block: string | {
375
- name?: string;
376
- states?: Record<string, number | string | boolean>;
377
- tags?: string;
378
- };
379
- speed: number;
380
- }>;
381
- };
382
- damage_absorption?: {
383
- absorbable_causes: string[];
384
- };
385
- durability?: {
386
- max_durability: number;
387
- damage_chance?: {
388
- min: number;
389
- max: number;
390
- };
391
- };
392
- durability_sensor?: {
393
- /**
394
- * The durability value at which the effects are emitted
395
- */
396
- durability?: number;
397
- /**
398
- * Defines both the durability threshold, and the effects emitted when that threshold is met.
399
- */
400
- durability_thresholds?: Array<{
401
- /**
402
- * The effects are emitted when the item durability value is less than or equal to this value.
403
- * @default 0
404
- * @type Integer number
405
- */
406
- durability: number;
407
- /**
408
- * Particle effect to emit when the threshold is met.
409
- * @type Particle Type choices
410
- */
411
- particle_type?: ParticleType;
412
- /**
413
- * Sound effect to emit when the threshold is met.
414
- * @type Sound Event choices
415
- */
416
- sound_event?: SoundEvent;
417
- }>;
418
- /**
419
- * Particle effect to emit when durability sensor triggers
420
- * @type Particle Type choices
421
- */
422
- particle_type?: ParticleType;
423
- /**
424
- * Sound effect to emit when durability sensor triggers
425
- * @type Sound Event choices
426
- */
427
- sound_event?: SoundEvent;
428
- };
429
- /**
430
- * Enables custom items to be dyed in cauldrons.
431
- * Requires format version 1.21.30 or greater.
432
- */
433
- dyeable?: {
434
- /**
435
- * The default color for the dyed item
436
- * Can be a hex string (e.g., "#175882") or array of RGB numbers [255, 255, 255]
437
- * @default [255, 255, 255]
438
- */
439
- default_color?: string | [number, number, number];
440
- };
441
- /**
442
- * Determines what enchantments can be applied to the item.
443
- * Not all enchantments will have an effect on all item components.
444
- */
445
- enchantable?: {
446
- /**
447
- * Specifies which types of enchantments can be applied.
448
- * For example, "bow" would allow this item to be enchanted as if it were a bow.
449
- * @example "armor_torso" for chestplate, "armor_feet" for boots
450
- */
451
- slot?: EnchantableSlot;
452
- /**
453
- * Specifies the value of the enchantment (minimum of 0).
454
- * @default 0
455
- * @type Integer number
456
- * @example Chestplate: 10
457
- */
458
- value?: number;
459
- };
460
- /**
461
- * Determines whether the item is immune to burning when dropped in fire or lava.
462
- */
463
- 'minecraft:fire_resistant'?: {
464
- value?: boolean;
465
- };
466
- /**
467
- * Allows an item to place entities into the world.
468
- * Additionally, in version 1.19.80 and above, the component allows the item to set the spawn type of a monster spawner.
469
- */
470
- 'minecraft:entity_placer'?: {
471
- /**
472
- * List of block descriptors of the blocks that this item can be dispensed on.
473
- * If left empty, all blocks will be allowed.
474
- */
475
- dispense_on?: Array<string | {
476
- name: string;
477
- states?: Record<string, number | string | boolean>;
478
- tags?: string;
479
- }>;
480
- /**
481
- * The entity to be placed in the world.
482
- * Value must match a regular expression pattern of "^(?:\\w+(?:.\\w+):(?=\\w))?(?:\\w+(?:.\\w+))(?:<((?:\\w+(?:.\\w+):(?=\\w))?\\w+(?:.\\w+))*>)?$"
483
- * @example "minecraft:turtle"
484
- */
485
- entity: string;
486
- /**
487
- * List of block descriptors of the blocks that this item can be used on.
488
- * If left empty, all blocks will be allowed.
489
- */
490
- use_on?: Array<string | {
491
- name: string;
492
- states?: Record<string, number | string | boolean>;
493
- tags?: string;
494
- }>;
495
- };
496
- /**
497
- * Allows this item to be used as fuel in a furnace to 'cook' other items.
498
- * This item can also be represented as a Decimal number.
499
- */
500
- 'minecraft:fuel'?: {
501
- /**
502
- * How long in seconds will this fuel cook items for.
503
- * Value must be >= 0.05.
504
- */
505
- duration: number;
506
- };
507
- /**
508
- * Allows an item to deal kinetic damage and its effects.
509
- * This happens every tick while in use, in a straight line along the user's view vector.
510
- */
511
- 'minecraft:kinetic_weapon'?: {
512
- /**
513
- * Defines the reach used when the user is in Creative Mode.
514
- * Defaults to "reach" if unspecified.
515
- */
516
- creative_reach?: {
517
- max?: number;
518
- min?: number;
519
- };
520
- /**
521
- * Conditions that need to be satisfied for damage to be applied.
522
- * If not specified, damage is not applied.
523
- */
524
- damage_conditions?: {
525
- max_duration?: number;
526
- min_relative_speed?: number;
527
- min_speed?: number;
528
- };
529
- /**
530
- * Value added to the the scaled dot product (after applying "damage_multiplier").
531
- * @default 0
532
- */
533
- damage_modifier?: number;
534
- /**
535
- * Value multiplied to sum of the dot products of the user and target's velocity vectors projected onto the view vector.
536
- * @default 1
537
- */
538
- damage_multiplier?: number;
539
- /**
540
- * Time, in ticks, after which kinetic damage and its effects start being applied.
541
- * @default 0
542
- */
543
- delay?: number;
544
- /**
545
- * Conditions that need to be satisfied for riders to be dismounted.
546
- * If not specified, riders cannot be dismounted.
547
- */
548
- dismount_conditions?: {
549
- max_duration?: number;
550
- min_relative_speed?: number;
551
- min_speed?: number;
552
- };
553
- /**
554
- * Added tolerance to the view vector raycast for detecting entity collisions.
555
- * @default 0
556
- */
557
- hitbox_margin?: number;
558
- /**
559
- * Conditions that need to be satisfied for knockback to be applied.
560
- * If not specified, knockback is not applied.
561
- */
562
- knockback_conditions?: {
563
- max_duration?: number;
564
- min_relative_speed?: number;
565
- min_speed?: number;
566
- };
567
- /**
568
- * Conditions that need to be satisfied for a specific effect of a kinetic weapon to be applied.
569
- * If negative, the effect is applied indefinitely.
570
- */
571
- kinetic_effect_conditions?: {
572
- /**
573
- * Time, in ticks, during which the effect can be applied after "delay" elapses.
574
- * If negative, the effect is applied indefinitely.
575
- * @default -1
576
- * @type Integer number
577
- */
578
- max_duration?: number;
579
- /**
580
- * Minimum relative speed of the user with respect to the target (projected onto the view vector via a dot product) required for the effect to be applied.
581
- * @default 0
582
- * @type Decimal number
583
- */
584
- min_relative_speed?: number;
585
- /**
586
- * Minimum user's speed (projected onto the view vector via a dot product) required for the effect to be applied.
587
- * @default 0
588
- * @type Decimal number
589
- */
590
- min_speed?: number;
591
- };
592
- /**
593
- * Defines the range (in blocks) along the user's view vector where entities can be hit.
594
- * @default {"max":3,"min":0}
595
- */
596
- reach?: {
597
- max?: number;
598
- min?: number;
599
- };
600
- };
601
- /**
602
- * A boolean or string that determines if the interact button is shown in touch controls,
603
- * and what text is displayed on the button.
604
- */
605
- 'minecraft:interact_button'?: boolean | string;
606
- /**
607
- * Determines the color of the item name when hovering over it.
608
- * This item can also be represented as a String.
609
- */
610
- 'minecraft:hover_text_color'?: {
611
- /**
612
- * The color of the item hover text.
613
- */
614
- value?: string;
615
- };
616
- /**
617
- * Sets the item as a food component, allowing it to be edible to the player.
618
- */
619
- 'minecraft:food'?: {
620
- /**
621
- * If true you can always eat this item (even when not hungry).
622
- * @default false
623
- * @example AppleEnchanted: true
624
- */
625
- can_always_eat?: boolean;
626
- /**
627
- * Cooldown time in seconds
628
- * @type Decimal number
629
- */
630
- cooldown_time?: number;
631
- /**
632
- * Cooldown type
633
- * @example "chorusfruit" for chorus fruit cooldown
634
- */
635
- cooldown_type?: string;
636
- /**
637
- * Array of effects applied when consuming the food
638
- * @example [{"name":"regeneration","chance":1,"duration":30,"amplifier":1}]
639
- */
640
- effects?: FoodEffect[];
641
- /**
642
- * Whether the food is a meat item
643
- */
644
- is_meat?: boolean;
645
- /**
646
- * Value that is added to the entity's nutrition when the item is used.
647
- * @default 0
648
- * @type Integer number
649
- * @example Apple: 4, Baked Potato: 5, Beef: 3
650
- */
651
- nutrition?: number;
652
- /**
653
- * Minecraft event trigger for on use action
654
- * @example "chorus_teleport" for chorus fruit
655
- */
656
- on_use_action?: string;
657
- /**
658
- * Minecraft event trigger for on use range
659
- * @example [8, 8, 8] for chorus fruit
660
- */
661
- on_use_range?: [number, number, number];
662
- /**
663
- * saturation_modifier is used in this formula: (nutrition * saturation_modifier * 2) when applying the saturation buff.
664
- * Can be a number or string values like "poor", "low", "normal", "good", "supernatural".
665
- * @default 0.6000000238418579
666
- * @type Decimal number | string
667
- * @example Apple: 0.3, AppleEnchanted: "supernatural", Baked Potato: "normal"
668
- */
669
- saturation_modifier?: number | 'poor' | 'low' | 'normal' | 'good' | 'supernatural';
670
- /**
671
- * When used, converts to the item specified by the string in this field.
672
- * @example "bowl" for soup items, "glass_bottle" for honey bottle
673
- */
674
- using_converts_to?: string;
675
- /**
676
- * Deprecated - no longer in use.
677
- * Array of effect names to remove when eating this food.
678
- * This property was deprecated and is no longer supported in newer versions.
679
- */
680
- remove_effects?: string[];
681
- };
682
- /**
683
- * Sets the item as a food component, allowing it to be edible to the player.
684
- */
685
- food?: {
686
- /**
687
- * If true you can always eat this item (even when not hungry).
688
- * @default false
689
- * @example AppleEnchanted: true
690
- */
691
- can_always_eat?: boolean;
692
- /**
693
- * Cooldown time in seconds
694
- * @type Decimal number
695
- */
696
- cooldown_time?: number;
697
- /**
698
- * Cooldown type
699
- * @example "chorusfruit" for chorus fruit cooldown
700
- */
701
- cooldown_type?: string;
702
- /**
703
- * Array of effects applied when consuming the food
704
- * @example [{"name":"regeneration","chance":1,"duration":30,"amplifier":1}]
705
- */
706
- effects?: FoodEffect[];
707
- /**
708
- * Whether the food is a meat item
709
- */
710
- is_meat?: boolean;
711
- /**
712
- * Value that is added to the entity's nutrition when the item is used.
713
- * @default 0
714
- * @type Integer number
715
- * @example Apple: 4, Baked Potato: 5, Beef: 3
716
- */
717
- nutrition?: number;
718
- /**
719
- * Minecraft event trigger for on use action
720
- * @example "chorus_teleport" for chorus fruit
721
- */
722
- on_use_action?: string;
723
- /**
724
- * Minecraft event trigger for on use range
725
- * @example [8, 8, 8] for chorus fruit
726
- */
727
- on_use_range?: [number, number, number];
728
- /**
729
- * saturation_modifier is used in this formula: (nutrition * saturation_modifier * 2) when applying the saturation buff.
730
- * Can be a number or string values like "poor", "low", "normal", "good", "supernatural".
731
- * @default 0.6000000238418579
732
- * @type Decimal number | string
733
- * @example Apple: 0.3, AppleEnchanted: "supernatural", Baked Potato: "normal"
734
- */
735
- saturation_modifier?: number | 'poor' | 'low' | 'normal' | 'good' | 'supernatural';
736
- /**
737
- * When used, converts to the item specified by the string in this field.
738
- * @example "bowl" for soup items, "glass_bottle" for honey bottle
739
- */
740
- using_converts_to?: string;
741
- /**
742
- * Deprecated - no longer in use.
743
- * Array of effect names to remove when eating this food.
744
- * This property was deprecated and is no longer supported in newer versions.
745
- */
746
- remove_effects?: string[];
747
- };
748
- /**
749
- * Determines whether the item is immune to burning when dropped in fire or lava.
750
- */
751
- fire_resistant?: {
752
- /**
753
- * Determines whether the item is immune to burning when dropped in fire or lava.
754
- * @default true
755
- */
756
- value?: boolean;
757
- };
758
- /**
759
- * Allows an item to place entities into the world.
760
- * Additionally, in version 1.19.80 and above, the component allows the item to set the spawn type of a monster spawner.
761
- */
762
- entity_placer?: {
763
- /**
764
- * List of block descriptors of the blocks that this item can be dispensed on.
765
- * If left empty, all blocks will be allowed.
766
- */
767
- dispense_on?: Array<string | {
768
- name: string;
769
- states?: Record<string, number | string | boolean>;
770
- tags?: string;
771
- }>;
772
- /**
773
- * The entity to be placed in the world.
774
- * Value must match a regular expression pattern of "^(?:\\w+(?:.\\w+):(?=\\w))?(?:\\w+(?:.\\w+))(?:<((?:\\w+(?:.\\w+):(?=\\w))?\\w+(?:.\\w+))*>)?$"
775
- * @example "minecraft:turtle"
776
- */
777
- entity: string;
778
- /**
779
- * List of block descriptors of the blocks that this item can be used on.
780
- * If left empty, all blocks will be allowed.
781
- */
782
- use_on?: Array<string | {
783
- name: string;
784
- states?: Record<string, number | string | boolean>;
785
- tags?: string;
786
- }>;
787
- };
788
- /**
789
- * Allows this item to be used as fuel in a furnace to 'cook' other items.
790
- * This item can also be represented as a Decimal number.
791
- */
792
- fuel?: {
793
- duration: number;
794
- };
795
- kinetic_weapon?: {
796
- creative_reach?: {
797
- max?: number;
798
- min?: number;
799
- };
800
- damage_conditions?: {
801
- max_duration?: number;
802
- min_relative_speed?: number;
803
- min_speed?: number;
804
- };
805
- damage_modifier?: number;
806
- damage_multiplier?: number;
807
- delay?: number;
808
- dismount_conditions?: {
809
- max_duration?: number;
810
- min_relative_speed?: number;
811
- min_speed?: number;
812
- };
813
- hitbox_margin?: number;
814
- knockback_conditions?: {
815
- max_duration?: number;
816
- min_relative_speed?: number;
817
- min_speed?: number;
818
- };
819
- kinetic_effect_conditions?: {
820
- max_duration?: number;
821
- min_relative_speed?: number;
822
- min_speed?: number;
823
- };
824
- reach?: {
825
- max?: number;
826
- min?: number;
827
- };
828
- };
829
- interact_button?: boolean | string;
830
- hover_text_color?: {
831
- value?: string;
832
- };
833
- /**
834
- * Determines whether the item interacts with liquid blocks on use.
835
- * To allow placement of blocks on liquids, see the 'placement_filter' block component.
836
- * This item can also be represented as a Boolean true/false.
837
- */
838
- 'minecraft:liquid_clipped'?: boolean | {
839
- /**
840
- * Determines whether the item interacts with liquid blocks on use.
841
- */
842
- value?: boolean;
843
- };
844
- liquid_clipped?: boolean | {
845
- /**
846
- * Determines whether the item interacts with liquid blocks on use.
847
- */
848
- value?: boolean;
849
- };
850
- /**
851
- * Determines how many of an item can be stacked together.
852
- * This item can also be represented as a Integer number.
853
- * @default 64
854
- */
855
- 'minecraft:max_stack_size'?: number | {
856
- /**
857
- * How many of an item that can be stacked together.
858
- * @default 64
859
- */
860
- value?: number;
861
- };
862
- max_stack_size?: number | {
863
- /**
864
- * How many of an item that can be stacked together.
865
- * @default 64
866
- */
867
- value?: number;
868
- };
869
- }>;
870
- }
871
- type JSONValue<T> = T | {
872
- value: T;
873
- };
874
- /**
875
- * Food effects interface for minecraft:food component
876
- */
877
- interface FoodEffect {
878
- /**
879
- * Effect amplifier
880
- * @example 1 for regeneration amplifier
881
- */
882
- amplifier?: number;
883
- /**
884
- * Chance of the effect being applied (0.0 to 1.0)
885
- * @example 0.3 for 30% chance
886
- */
887
- chance?: number;
888
- /**
889
- * Duration of the effect in seconds
890
- * @example 30 for 30 seconds duration
891
- */
892
- duration?: number;
893
- /**
894
- * Name of the effect
895
- * @example "regeneration", "absorption", "hunger"
896
- */
897
- name?: string;
898
- }
899
- type ItemGroupEnum = 'minecraft:itemGroup.name.planks' | 'minecraft:itemGroup.name.walls' | 'minecraft:itemGroup.name.fence' | 'minecraft:itemGroup.name.fenceGate' | 'minecraft:itemGroup.name.glass' | 'minecraft:itemGroup.name.trapdoor' | 'minecraft:itemGroup.name.door' | 'minecraft:itemGroup.name.stairs' | 'minecraft:itemGroup.name.glassPane' | 'minecraft:itemGroup.name.slab' | 'minecraft:itemGroup.name.stoneBrick' | 'minecraft:itemGroup.name.sandstone' | 'minecraft:itemGroup.name.copper' | 'minecraft:itemGroup.name.wool' | 'minecraft:itemGroup.name.woolCarpet' | 'minecraft:itemGroup.name.concretePowder' | 'minecraft:itemGroup.name.concrete' | 'minecraft:itemGroup.name.stainedClay' | 'minecraft:itemGroup.name.glazedTerracotta' | 'minecraft:itemGroup.name.ore' | 'minecraft:itemGroup.name.stone' | 'minecraft:itemGroup.name.log' | 'minecraft:itemGroup.name.wood' | 'minecraft:itemGroup.name.leaves' | 'minecraft:itemGroup.name.sapling' | 'minecraft:itemGroup.name.seed' | 'minecraft:itemGroup.name.crop' | 'minecraft:itemGroup.name.grass' | 'minecraft:itemGroup.name.coral_decorations' | 'minecraft:itemGroup.name.flower' | 'minecraft:itemGroup.name.dye' | 'minecraft:itemGroup.name.rawFood' | 'minecraft:itemGroup.name.mushroom' | 'minecraft:itemGroup.name.monsterStoneEgg' | 'minecraft:itemGroup.name.mobEgg' | 'minecraft:itemGroup.name.coral' | 'minecraft:itemGroup.name.sculk' | 'minecraft:itemGroup.name.helmet' | 'minecraft:itemGroup.name.chestplate' | 'minecraft:itemGroup.name.leggings' | 'minecraft:itemGroup.name.boots' | 'minecraft:itemGroup.name.sword' | 'minecraft:itemGroup.name.axe' | 'minecraft:itemGroup.name.pickaxe' | 'minecraft:itemGroup.name.shovel' | 'minecraft:itemGroup.name.hoe' | 'minecraft:itemGroup.name.arrow' | 'minecraft:itemGroup.name.cookedFood' | 'minecraft:itemGroup.name.miscFood' | 'minecraft:itemGroup.name.goatHorn' | 'minecraft:itemGroup.name.bundles' | 'minecraft:itemGroup.name.horseArmor' | 'minecraft:itemGroup.name.potion' | 'minecraft:itemGroup.name.splashPotion' | 'minecraft:itemGroup.name.lingeringPotion' | 'minecraft:itemGroup.name.ominousBottle' | 'minecraft:itemGroup.name.bed' | 'minecraft:itemGroup.name.candles' | 'minecraft:itemGroup.name.anvil' | 'minecraft:itemGroup.name.chest' | 'minecraft:itemGroup.name.shulkerBox' | 'minecraft:itemGroup.name.record' | 'minecraft:itemGroup.name.sign' | 'minecraft:itemGroup.name.hanging_sign' | 'minecraft:itemGroup.name.skull' | 'minecraft:itemGroup.name.boat' | 'minecraft:itemGroup.name.chestboat' | 'minecraft:itemGroup.name.rail' | 'minecraft:itemGroup.name.minecart' | 'minecraft:itemGroup.name.buttons' | 'minecraft:itemGroup.name.pressurePlate' | 'minecraft:itemGroup.name.banner_pattern' | 'minecraft:itemGroup.name.potterySherds' | 'minecraft:itemGroup.name.smithing_templates';
900
- interface ItemJson extends BaseJson {
901
- 'minecraft:item': {
902
- description: {
903
- identifier: string;
904
- category?: string;
905
- menu_category?: {
906
- category: string;
907
- group: ItemGroupEnum;
908
- };
909
- };
910
- components: {
911
- 'minecraft:display_name'?: JSONValue<string>;
912
- 'minecraft:allow_off_hand'?: JSONValue<boolean>;
913
- 'minecraft:can_destroy_in_creative'?: JSONValue<boolean>;
914
- 'minecraft:compostable'?: {
915
- composting_chance: number;
916
- };
917
- 'minecraft:cooldown'?: {
918
- category: string;
919
- duration: number;
920
- type: 'use' | 'attack';
921
- };
922
- 'minecraft:damage'?: JSONValue<number>;
923
- 'minecraft:icon'?: {
924
- textures: string;
925
- };
926
- 'minecraft:block_placer'?: {
927
- aligned_placement?: boolean;
928
- block: string;
929
- replace_block_item?: boolean;
930
- use_on?: Array<string | {
931
- name: string;
932
- states?: Record<string, number | string | boolean>;
933
- tags?: string;
934
- }>;
935
- };
936
- 'minecraft:bundle_interaction'?: {
937
- num_viewable_slots?: number;
938
- };
939
- 'minecraft:storage_item'?: {
940
- max_slots?: number;
941
- max_weight_limit?: number;
942
- weight_in_storage_item?: number;
943
- allow_nested_storage_items?: boolean;
944
- allowed_items?: string[];
945
- banned_items?: string[];
946
- };
947
- 'minecraft:storage_weight_limit'?: {
948
- /**
949
- * 存储物品允许的最大总重量(十进制数)
950
- * @default undefined
951
- */
952
- limit?: number;
953
- };
954
- 'minecraft:storage_weight_modifier'?: {
955
- /**
956
- * 应用于存储物品的重量乘数
957
- * 在计算中,物品的基本重量会乘以该值
958
- * @default undefined
959
- */
960
- multiplier?: number;
961
- };
962
- 'minecraft:glint'?: JSONValue<boolean>;
963
- 'minecraft:hand_equipped'?: JSONValue<boolean>;
964
- 'minecraft:digger'?: {
965
- use_efficiency?: boolean;
966
- destroy_speeds?: Array<{
967
- block: string | {
968
- name?: string;
969
- states?: Record<string, number | string | boolean>;
970
- tags?: string;
971
- };
972
- speed: number;
973
- }>;
974
- };
975
- 'minecraft:damage_absorption'?: {
976
- absorbable_causes: string[];
977
- };
978
- 'minecraft:durability'?: {
979
- max_durability: number;
980
- damage_chance?: {
981
- min: number;
982
- max: number;
983
- };
984
- };
985
- 'minecraft:durability_sensor'?: {
986
- durability?: number;
987
- durability_thresholds?: Array<{
988
- durability: number;
989
- particle_type?: ParticleType;
990
- sound_event?: SoundEvent;
991
- }>;
992
- particle_type?: ParticleType;
993
- sound_event?: SoundEvent;
994
- };
995
- /**
996
- * Enables custom items to be dyed in cauldrons.
997
- * Requires format version 1.21.30 or greater.
998
- */
999
- 'minecraft:dyeable'?: {
1000
- /**
1001
- * The default color for the dyed item
1002
- * Can be a hex string (e.g., "#175882") or array of RGB numbers [255, 255, 255]
1003
- * @default [255, 255, 255]
1004
- */
1005
- default_color?: string | [number, number, number];
1006
- };
1007
- /**
1008
- * Determines what enchantments can be applied to the item.
1009
- * Not all enchantments will have an effect on all item components.
1010
- */
1011
- 'minecraft:enchantable'?: {
1012
- /**
1013
- * Specifies which types of enchantments can be applied.
1014
- * For example, "bow" would allow this item to be enchanted as if it were a bow.
1015
- * @example "armor_torso" for chestplate, "armor_feet" for boots
1016
- */
1017
- slot?: EnchantableSlot;
1018
- /**
1019
- * Specifies the value of the enchantment (minimum of 0).
1020
- * @default 0
1021
- * @type Integer number
1022
- * @example Chestplate: 10
1023
- */
1024
- value?: number;
1025
- };
1026
- /**
1027
- * Sets the item as a food component, allowing it to be edible to the player.
1028
- */
1029
- 'minecraft:food'?: {
1030
- can_always_eat?: boolean;
1031
- cooldown_time?: number;
1032
- cooldown_type?: string;
1033
- effects?: FoodEffect[];
1034
- is_meat?: boolean;
1035
- nutrition?: number;
1036
- on_use_action?: string;
1037
- on_use_range?: [number, number, number];
1038
- saturation_modifier?: number | 'poor' | 'low' | 'normal' | 'good' | 'supernatural';
1039
- using_converts_to?: string;
1040
- remove_effects?: string[];
1041
- };
1042
- /**
1043
- * Determines whether the item is immune to burning when dropped in fire or lava.
1044
- */
1045
- 'minecraft:fire_resistant'?: {
1046
- value?: boolean;
1047
- };
1048
- /**
1049
- * Allows an item to place entities into the world.
1050
- * Additionally, in version 1.19.80 and above, the component allows the item to set the spawn type of a monster spawner.
1051
- */
1052
- 'minecraft:entity_placer'?: {
1053
- /**
1054
- * List of block descriptors of the blocks that this item can be dispensed on.
1055
- * If left empty, all blocks will be allowed.
1056
- */
1057
- dispense_on?: Array<string | {
1058
- name: string;
1059
- states?: Record<string, number | string | boolean>;
1060
- tags?: string;
1061
- }>;
1062
- /**
1063
- * The entity to be placed in the world.
1064
- * Value must match a regular expression pattern of "^(?:\w+(?:.\w+):(?=\w))?(?:\w+(?:.\w+))(?:<((?:\w+(?:.\w+):(?=\w))?\w+(?:.\w+))*>)?$"
1065
- * @example "minecraft:turtle"
1066
- */
1067
- entity: string;
1068
- /**
1069
- * List of block descriptors of the blocks that this item can be used on.
1070
- * If left empty, all blocks will be allowed.
1071
- */
1072
- use_on?: Array<string | {
1073
- name: string;
1074
- states?: Record<string, number | string | boolean>;
1075
- tags?: string;
1076
- }>;
1077
- };
1078
- /**
1079
- * Allows this item to be used as fuel in a furnace to 'cook' other items.
1080
- * This item can also be represented as a Decimal number.
1081
- */
1082
- 'minecraft:fuel'?: {
1083
- /**
1084
- * How long in seconds will this fuel cook items for.
1085
- * Value must be >= 0.05.
1086
- */
1087
- duration: number;
1088
- };
1089
- 'minecraft:kinetic_weapon'?: {
1090
- /**
1091
- * Defines the reach used when the user is in Creative Mode.
1092
- * Defaults to "reach" if unspecified.
1093
- */
1094
- creative_reach?: {
1095
- max?: number;
1096
- min?: number;
1097
- };
1098
- /**
1099
- * Conditions that need to be satisfied for damage to be applied.
1100
- * If not specified, damage is not applied.
1101
- */
1102
- damage_conditions?: {
1103
- max_duration?: number;
1104
- min_relative_speed?: number;
1105
- min_speed?: number;
1106
- };
1107
- /**
1108
- * Value added to the the scaled dot product (after applying "damage_multiplier").
1109
- * @default 0
1110
- */
1111
- damage_modifier?: number;
1112
- /**
1113
- * Value multiplied to sum of the dot products of the user and target's velocity vectors projected onto the view vector.
1114
- * @default 1
1115
- */
1116
- damage_multiplier?: number;
1117
- /**
1118
- * Time, in ticks, after which kinetic damage and its effects start being applied.
1119
- * @default 0
1120
- */
1121
- delay?: number;
1122
- /**
1123
- * Conditions that need to be satisfied for riders to be dismounted.
1124
- * If not specified, riders cannot be dismounted.
1125
- */
1126
- dismount_conditions?: {
1127
- max_duration?: number;
1128
- min_relative_speed?: number;
1129
- min_speed?: number;
1130
- };
1131
- /**
1132
- * Added tolerance to the view vector raycast for detecting entity collisions.
1133
- * @default 0
1134
- */
1135
- hitbox_margin?: number;
1136
- /**
1137
- * Conditions that need to be satisfied for knockback to be applied.
1138
- * If not specified, knockback is not applied.
1139
- */
1140
- knockback_conditions?: {
1141
- max_duration?: number;
1142
- min_relative_speed?: number;
1143
- min_speed?: number;
1144
- };
1145
- /**
1146
- * Conditions that need to be satisfied for a specific effect of a kinetic weapon to be applied.
1147
- */
1148
- kinetic_effect_conditions?: {
1149
- max_duration?: number;
1150
- min_relative_speed?: number;
1151
- min_speed?: number;
1152
- };
1153
- /**
1154
- * Defines the reach used for kinetic weapon effects.
1155
- */
1156
- reach?: {
1157
- max?: number;
1158
- min?: number;
1159
- };
1160
- };
1161
- 'minecraft:interact_button'?: boolean | string;
1162
- 'minecraft:hover_text_color'?: {
1163
- /**
1164
- * The color of the item hover text.
1165
- */
1166
- value?: string;
1167
- };
1168
- /**
1169
- * The liquid_clipped component determines whether the item interacts with liquid blocks on use.
1170
- * To allow placement of blocks on liquids, see the 'placement_filter' block component.
1171
- * This item can also be represented as a Boolean true/false.
1172
- */
1173
- 'minecraft:liquid_clipped'?: boolean | {
1174
- /**
1175
- * Determines whether the item interacts with liquid blocks on use.
1176
- */
1177
- value?: boolean;
1178
- };
1179
- /**
1180
- * Determines how many of an item can be stacked together.
1181
- * This item can also be represented as a Integer number.
1182
- * @default 64
1183
- */
1184
- 'minecraft:max_stack_size'?: number | {
1185
- /**
1186
- * How many of an item that can be stacked together.
1187
- * @default 64
1188
- */
1189
- value?: number;
1190
- };
1191
- /**
1192
- * Allows an item to deal damage to all entities detected in a straight line along the user's view vector.
1193
- * Items with this component cannot destroy blocks, as the attack action always takes priority, regardless of what the user is looking at.
1194
- */
1195
- 'minecraft:piercing_weapon'?: {
1196
- /**
1197
- * Defines the reach used when the user is in Creative Mode. Defaults to "reach" if unspecified.
1198
- */
1199
- creative_reach?: {
1200
- max?: number;
1201
- min?: number;
1202
- };
1203
- /**
1204
- * Added tolerance to the view vector raycast for detecting entity collisions.
1205
- * @default 0
1206
- */
1207
- hitbox_margin?: number;
1208
- /**
1209
- * Defines the range (in blocks) along the user's view vector where entities can be hit.
1210
- * @default {"max":3,"min":0}
1211
- */
1212
- reach?: {
1213
- max?: number;
1214
- min?: number;
1215
- };
1216
- };
1217
- piercing_weapon?: {
1218
- creative_reach?: {
1219
- max?: number;
1220
- min?: number;
1221
- };
1222
- hitbox_margin?: number;
1223
- reach?: {
1224
- max?: number;
1225
- min?: number;
1226
- };
1227
- };
1228
- /**
1229
- * Defines an item as a projectile that can be shot from dispensers or used as ammunition with minecraft:shooter.
1230
- * When combined with minecraft:throwable, this component specifies which entity is spawned when the item is thrown.
1231
- */
1232
- 'minecraft:projectile'?: {
1233
- /**
1234
- * Specifies how long a player must charge a projectile for it to critically hit.
1235
- * @example "My Sword Chuck": 1.25
1236
- * @default 0
1237
- */
1238
- minimum_critical_power?: number;
1239
- /**
1240
- * Which entity is to be fired as a projectile.
1241
- * Value must match a regular expression pattern of "^(?:\\w+(?:.\\w+):(?=\\w))?(?:\\w+(?:.\\w+))(?:<((?:\\w+(?:.\\w+):(?=\\w))?\\w+(?:.\\w+))*>)?$".
1242
- * @example "Wind Charge": "wind_charge_projectile", "My Sword Chuck": "minecraft:snowball"
1243
- */
1244
- projectile_entity: string;
1245
- };
1246
- /**
1247
- * Used by record items to play music.
1248
- * @example "My Sword Singing"
1249
- */
1250
- 'minecraft:record'?: {
1251
- /**
1252
- * Specifies signal strength for comparator blocks to use, from 1 - 13.
1253
- * @example "My Sword Singing": 1
1254
- * @default 1
1255
- */
1256
- comparator_signal?: number;
1257
- /**
1258
- * Specifies duration of sound event in seconds, float value.
1259
- * @example "My Sword Singing": 5
1260
- * @default 0
1261
- */
1262
- duration?: number;
1263
- /**
1264
- * Sound event type.
1265
- * Values: 13, cat, blocks, chirp, far, mall, mellohi, stal, strad, ward, 11, wait, pigstep, otherside, 5, relic
1266
- * @example "My Sword Singing": "pigstep"
1267
- */
1268
- sound_event: SoundEvent;
1269
- };
1270
- /**
1271
- * Specifies the base rarity and subsequently color of the item name when the player hovers the cursor over the item.
1272
- * This item requires a format version of at least 1.21.30.
1273
- * This item can also be represented as a String.
1274
- */
1275
- 'minecraft:rarity'?: {
1276
- /**
1277
- * Sets the base rarity of the item.
1278
- * The rarity of an item automatically increases when enchanted, either to Rare when the base rarity is Common or Uncommon,
1279
- * or Epic when the base rarity is Rare.
1280
- * @example "rare"
1281
- */
1282
- value: Rarity;
1283
- };
1284
- /**
1285
- * Defines the items that can be used to repair a defined item, and the amount of durability each item restores upon repair.
1286
- * Each entry needs to define a list of strings for 'items' that can be used for the repair and an optional 'repair_amount' for how much durability is repaired.
1287
- * @example Chestplate: {"on_repaired":"minecraft:celebrate","repair_items":["anvil"]}
1288
- * @example My Sword Chuck: {"repair_items":[{"items":["minecraft:diamond"],"repair_amount":"query.max_durability * 0.25"}]}
1289
- */
1290
- 'minecraft:repairable'?: {
1291
- /**
1292
- * Event triggered when the item is repaired
1293
- * @example "minecraft:celebrate"
1294
- */
1295
- on_repaired?: string;
1296
- /**
1297
- * List of repair item entries.
1298
- * Each entry needs to define a list of strings for items that can be used for the repair and an optional repair_amount for how much durability is gained.
1299
- */
1300
- repair_items?: Array<string | {
1301
- /**
1302
- * Items that can be used to repair an item.
1303
- * @example ["minecraft:stick"]
1304
- * @example ["minecraft:diamond"]
1305
- */
1306
- items: string[];
1307
- /**
1308
- * How much the item is repaired.
1309
- * Can be a string expression or a numeric value.
1310
- * @example "context.other->query.remaining_durability + 0.05 * context.other->query.max_durability"
1311
- * @example "query.max_durability * 0.25"
1312
- */
1313
- repair_amount?: string | number;
1314
- }>;
1315
- };
1316
- /**
1317
- * Sets the item as a seed that can be planted to grow crops.
1318
- * When used on valid ground, the seed will place the specified crop block.
1319
- * This item requires a format version of at least 1.10.0.
1320
- * @example Beetroot Seeds: {"crop_result":"beetroot"}
1321
- * @example Glow Berries: {"crop_result":"cave_vines","plant_at":["cave_vines","cave_vines_head_with_berries"],"plant_at_any_solid_surface":true,"plant_at_face":"DOWN"}
1322
- */
1323
- 'minecraft:seed'?: {
1324
- /**
1325
- * The block identifier that will be placed when the seed is planted.
1326
- * @example "beetroot"
1327
- * @example "cave_vines"
1328
- */
1329
- crop_result: string;
1330
- /**
1331
- * Array of block identifiers that this seed can be planted on or attached to.
1332
- * If not specified, standard farmland rules apply.
1333
- * @example ["cave_vines","cave_vines_head_with_berries"]
1334
- */
1335
- plant_at?: string[];
1336
- /**
1337
- * Deprecated - no longer in use.
1338
- * If true, the seed can be planted on any solid surface, not just farmland or specified blocks.
1339
- * This property was deprecated and removed in versions after 1.18.
1340
- * This property no longer works after format versions of at least 1.19.0.
1341
- */
1342
- plant_at_any_solid_surface?: boolean;
1343
- /**
1344
- * Deprecated - no longer in use.
1345
- * The face of a block where this seed can be planted.
1346
- * Values: 'UP' for top of blocks (normal crops), 'DOWN' for bottom (hanging plants like glow berries).
1347
- * This property was deprecated and removed in versions after 1.18.
1348
- * This property no longer works after format versions of at least 1.19.0.
1349
- */
1350
- plant_at_face?: 'UP' | 'DOWN';
1351
- };
1352
- projectile?: {
1353
- minimum_critical_power?: number;
1354
- projectile_entity: string;
1355
- };
1356
- /**
1357
- * Used by record items to play music.
1358
- * @example "My Sword Singing"
1359
- */
1360
- record?: {
1361
- /**
1362
- * Specifies signal strength for comparator blocks to use, from 1 - 13.
1363
- * @example "My Sword Singing": 1
1364
- * @default 1
1365
- */
1366
- comparator_signal?: number;
1367
- /**
1368
- * Specifies duration of sound event in seconds, float value.
1369
- * @example "My Sword Singing": 5
1370
- * @default 0
1371
- */
1372
- duration?: number;
1373
- /**
1374
- * Sound event type.
1375
- * Values: 13, cat, blocks, chirp, far, mall, mellohi, stal, strad, ward, 11, wait, pigstep, otherside, 5, relic
1376
- * @example "My Sword Singing": "pigstep"
1377
- */
1378
- sound_event: SoundEvent;
1379
- };
1380
- /**
1381
- * Specifies the base rarity and subsequently color of the item name when the player hovers the cursor over the item.
1382
- * This item requires a format version of at least 1.21.30.
1383
- * This item can also be represented as a String.
1384
- */
1385
- rarity?: {
1386
- /**
1387
- * Sets the base rarity of the item.
1388
- * The rarity of an item automatically increases when enchanted, either to Rare when the base rarity is Common or Uncommon,
1389
- * or Epic when the base rarity is Rare.
1390
- * @example "rare"
1391
- */
1392
- value: Rarity;
1393
- };
1394
- /**
1395
- * Alias for minecraft:repairable
1396
- * Defines the items that can be used to repair a defined item, and the amount of durability each item restores upon repair.
1397
- * @example Chestplate: {"on_repaired":"minecraft:celebrate","repair_items":["anvil"]}
1398
- */
1399
- repairable?: {
1400
- on_repaired?: string;
1401
- repair_items?: Array<string | {
1402
- items: string[];
1403
- repair_amount?: string | number;
1404
- }>;
1405
- };
1406
- /**
1407
- * Alias for minecraft:seed
1408
- * Sets the item as a seed that can be planted to grow crops.
1409
- * This item requires a format version of at least 1.10.0.
1410
- * @example Beetroot Seeds: {"crop_result":"beetroot"}
1411
- */
1412
- seed?: {
1413
- crop_result: string;
1414
- plant_at?: string[];
1415
- plant_at_any_solid_surface?: boolean;
1416
- plant_at_face?: 'UP' | 'DOWN';
1417
- };
1418
- /**
1419
- * Controls whether items with different aux values can be stacked together.
1420
- * If true (default), items with different damage, custom data, or other aux values cannot stack.
1421
- * If false, all items of this type stack regardless of aux values.
1422
- * This is primarily used for items like armor with different durability values.
1423
- * @default true
1424
- */
1425
- 'minecraft:stacked_by_data'?: {
1426
- value?: boolean;
1427
- };
1428
- /**
1429
- * Controls whether dropped items should despawn while floating on water.
1430
- * If true, items will despawn when floating (default for most items).
1431
- * If false, items will not despawn while floating on water.
1432
- * @default true
1433
- */
1434
- 'minecraft:should_despawn'?: {
1435
- value?: boolean;
1436
- };
1437
- /**
1438
- * Allows an item to be used for shooting projectiles like bows, crossbows, or thrown items.
1439
- * Requires the entity to have the minecraft:projectile component.
1440
- * @example Bow: {"ammunition":["arrow"],"charge_on_draw":true,"max_draw_duration":1.0}
1441
- */
1442
- 'minecraft:shooter'?: {
1443
- /**
1444
- * Array of ammunition item identifiers that can be used with this shooter.
1445
- * Each item can have specific launch power and other properties.
1446
- * @example ["arrow", {"item":"spectral_arrow","launch_power_scale":1.2}]
1447
- */
1448
- ammunition: Array<string | {
1449
- /** Specific item identifier */
1450
- item: string;
1451
- /** Scale factor for launch power (default 1.0) */
1452
- launch_power_scale?: number;
1453
- /** Maximum draw duration in seconds (optional override) */
1454
- max_draw_duration?: number;
1455
- /** Whether to apply charge effects (optional override) */
1456
- charge_on_draw?: boolean;
1457
- }>;
1458
- /**
1459
- * Whether power/strength increases while drawing (like bows).
1460
- * If true, power scales with draw duration up to max_draw_duration.
1461
- * @default false
1462
- */
1463
- charge_on_draw?: boolean;
1464
- /**
1465
- * Maximum time in seconds that the item can be drawn/charged.
1466
- * @default 0.0
1467
- */
1468
- max_draw_duration?: number;
1469
- /**
1470
- * Whether the shooter automatically charges when held.
1471
- * @default false
1472
- */
1473
- auto_charge?: boolean;
1474
- /**
1475
- * Base power/velocity multiplier for projectiles.
1476
- * @default 1.0
1477
- */
1478
- launch_power?: number;
1479
- /**
1480
- * Whether to scale power based on draw duration.
1481
- * @default true
1482
- */
1483
- scale_power_by_draw_duration?: boolean;
1484
- };
1485
- /**
1486
- * Alias for minecraft:stacked_by_data
1487
- * Controls whether items with different aux values can be stacked together.
1488
- * @default true
1489
- */
1490
- stacked_by_data?: {
1491
- value?: boolean;
1492
- };
1493
- /**
1494
- * Alias for minecraft:should_despawn
1495
- * Controls whether dropped items should despawn while floating on water.
1496
- * @default true
1497
- */
1498
- should_despawn?: {
1499
- value?: boolean;
1500
- };
1501
- /**
1502
- * Makes an item throwable by the player, similar to a snowball or ender pearl.
1503
- * Use with minecraft:projectile to specify which entity is spawned when thrown.
1504
- *
1505
- * 注意:Combine with minecraft:projectile to define the projectile entity.
1506
- * For charged throws (like tridents), set scale_power_by_draw_duration to true and configure min/max draw durations.
1507
- */
1508
- 'minecraft:throwable'?: {
1509
- /**
1510
- * Determines whether the item should use the swing animation when thrown.
1511
- * @default false
1512
- */
1513
- do_swing_animation?: boolean;
1514
- /**
1515
- * The scale at which the power of the throw increases.
1516
- * @default 1.0
1517
- */
1518
- launch_power_scale?: number;
1519
- /**
1520
- * The maximum duration to draw a throwable item.
1521
- * @default 0.0
1522
- */
1523
- max_draw_duration?: number;
1524
- /**
1525
- * The maximum power to launch the throwable item.
1526
- * @default 1.0
1527
- */
1528
- max_launch_power?: number;
1529
- /**
1530
- * The minimum duration to draw a throwable item.
1531
- * @default 0.0
1532
- */
1533
- min_draw_duration?: number;
1534
- /**
1535
- * Whether or not the power of the throw increases with duration charged.
1536
- * @default false
1537
- */
1538
- scale_power_by_draw_duration?: boolean;
1539
- };
1540
- /**
1541
- * Determines which tags are included on a given item.
1542
- */
1543
- 'minecraft:tags'?: {
1544
- /**
1545
- * An array that can contain multiple item tags.
1546
- * @default []
1547
- */
1548
- tags?: string[];
1549
- };
1550
- /**
1551
- * Duration, in seconds, of the item's swing animation played when mining or attacking.
1552
- * Affects visuals only and does not impact attack frequency or other gameplay mechanics.
1553
- */
1554
- 'minecraft:swing_duration'?: {
1555
- /**
1556
- * Duration, in seconds, of the item's swing animation played when mining or attacking.
1557
- * Affects visuals only and does not impact attack frequency or other gameplay mechanics.
1558
- * @default 0.30000001192092896
1559
- */
1560
- value?: number;
1561
- };
1562
- /**
1563
- * Use_animation specifies which animation is played when the player uses the item.
1564
- * This item can also be represented as a String.
1565
- * Supported animations: 'eat', 'drink', 'block', 'bow', 'camera', 'spear', 'crossbow', 'spyglass', 'toot_horn', 'brush'.
1566
- */
1567
- 'minecraft:use_animation'?: string | {
1568
- /**
1569
- * The animation type to play when the item is used.
1570
- */
1571
- value?: string;
1572
- };
1573
- use_animation?: string | {
1574
- value?: string;
1575
- };
1576
- /**
1577
- * Sets the wearable item component, which allows an item to be worn by a player in a specified equipment slot.
1578
- * Valid equipment slots: slot.armor.head, slot.armor.chest, slot.armor.legs, slot.armor.feet, slot.armor.body, slot.weapon.mainhand, slot.weapon.offhand.
1579
- * When a non-hand armor slot is used, the max stack size is automatically set to 1.
1580
- */
1581
- 'minecraft:wearable'?: {
1582
- /**
1583
- * Specifies where the item can be worn.
1584
- * If any non-hand slot is chosen, the max stack size is set to 1.
1585
- * @example "slot.armor.chest", "slot.armor.head", "slot.armor.feet"
1586
- */
1587
- slot: 'slot.armor.head' | 'slot.armor.chest' | 'slot.armor.legs' | 'slot.armor.feet' | 'slot.armor.body' | 'slot.weapon.mainhand' | 'slot.weapon.offhand';
1588
- /**
1589
- * How much protection the wearable item provides.
1590
- * @default 0
1591
- * @type Integer number
1592
- */
1593
- protection?: number;
1594
- /**
1595
- * Determines whether the Player's location is hidden on Locator Maps and the Locator Bar when the wearable item is worn.
1596
- * @default false
1597
- */
1598
- hides_player_location?: boolean;
1599
- /**
1600
- * Whether the item can be used by dispensers.
1601
- * @example true
1602
- */
1603
- dispensable?: boolean;
1604
- };
1605
- wearable?: {
1606
- slot: 'slot.armor.head' | 'slot.armor.chest' | 'slot.armor.legs' | 'slot.armor.feet' | 'slot.armor.body' | 'slot.weapon.mainhand' | 'slot.weapon.offhand';
1607
- protection?: number;
1608
- hides_player_location?: boolean;
1609
- dispensable?: boolean;
1610
- };
1611
- /**
1612
- * Determines how long an item takes to use in combination with components such as Shooter, Throwable, or Food.
1613
- */
1614
- 'minecraft:use_modifiers'?: {
1615
- /**
1616
- * Time, in seconds, that the item takes to use.
1617
- * @example 1.6
1618
- * @type Decimal number
1619
- */
1620
- use_duration: number;
1621
- /**
1622
- * Multiplier applied to the player's movement speed while the item is in use.
1623
- * Value must be <= 1.
1624
- * @example 0.35
1625
- * @type Decimal number
1626
- */
1627
- movement_modifier?: number;
1628
- /**
1629
- * Whether vibrations are emitted when the item starts or stops being used.
1630
- * @default true
1631
- */
1632
- emit_vibrations?: boolean;
1633
- /**
1634
- * Sound played when the item starts being used.
1635
- * @see StartSoundChoices
1636
- */
1637
- start_sound?: string;
1638
- };
1639
- use_modifiers?: {
1640
- use_duration: number;
1641
- movement_modifier?: number;
1642
- emit_vibrations?: boolean;
1643
- start_sound?: string;
1644
- };
1645
- /**
1646
- * Overrides the swing sounds emitted by the user.
1647
- */
1648
- 'minecraft:swing_sounds'?: {
1649
- /**
1650
- * Sound played when an attack hits and deals critical damage.
1651
- * @see AttackCriticalHitChoices
1652
- */
1653
- attack_critical_hit?: string;
1654
- /**
1655
- * Sound played when an attack hits.
1656
- * @see AttackHitChoices
1657
- */
1658
- attack_hit?: string;
1659
- /**
1660
- * Sound played when an attack misses or deals no damage due to invulnerability.
1661
- * @see AttackMissChoices
1662
- */
1663
- attack_miss?: string;
1664
- };
1665
- swing_sounds?: {
1666
- attack_critical_hit?: string;
1667
- attack_hit?: string;
1668
- attack_miss?: string;
1669
- };
1670
- /**
1671
- * Alias for minecraft:shooter
1672
- * Allows an item to be used for shooting projectiles like bows, crossbows, or thrown items.
1673
- * Requires the entity to have the minecraft:projectile component.
1674
- */
1675
- shooter?: {
1676
- ammunition: Array<string | {
1677
- item: string;
1678
- launch_power_scale?: number;
1679
- max_draw_duration?: number;
1680
- charge_on_draw?: boolean;
1681
- }>;
1682
- charge_on_draw?: boolean;
1683
- max_draw_duration?: number;
1684
- auto_charge?: boolean;
1685
- launch_power?: number;
1686
- scale_power_by_draw_duration?: boolean;
1687
- };
1688
- };
1689
- };
1690
- }
1691
- export type { ItemComponentOptions, ItemGroupEnum, ItemJson, ParticleType, SoundEvent, EnchantableSlot, RepairItem, RepairAmountExpression, SeedProperties, };
1692
- /** @deprecated Use ItemComponentOptions instead */
1693
- export type { ItemComponentOptions as ItemComponentOpt };
1694
- /** @deprecated Use ItemJson instead */
1695
- export type { ItemJson as ItemJSON };
1696
- /** @deprecated Use FileEditOption instead */
1697
- export type { FileEditOption as EditFileOption };
1698
- /** @deprecated Use FileEditExpression instead */
1699
- export type { FileEditExpression as EditFileEditExpression };
1700
- /** @deprecated Use FileBindSource instead */
1701
- export type { FileBindSource as EditFileBindSourceExpression };
1702
- type Rarity = 'common' | 'uncommon' | 'rare' | 'epic';
1703
- declare const RarityEnum: readonly ["common", "uncommon", "rare", "epic"];
1704
- export { SoundEventEnum } from './types/SoundEvent';
1705
- export { ParticleTypeEnum } from './types/ParticleType';
1706
- export { EnchantableSlotEnum } from './types/EnchantableSlot';
1707
- export { RarityEnum };
1708
- export type { Rarity };
1709
- type PlantFace = 'UP' | 'DOWN';
1710
- declare const PlantFaceEnum: readonly ["UP", "DOWN"];
1711
- declare const BlockPattern: RegExp;
1712
- export type { PlantFace };
1713
- export { PlantFaceEnum, BlockPattern };
1714
- type RepairItem = {
1715
- /**
1716
- * Items that may be used to repair an item.
1717
- * @example ["minecraft:diamond"]
1718
- */
1719
- items: string[];
1720
- /**
1721
- * How much the item is repaired. Can be a string expression or a numeric value.
1722
- * @example "query.max_durability * 0.25"
1723
- * @example "context.other->query.remaining_durability + 0.05 * context.other->query.max_durability"
1724
- */
1725
- repair_amount?: string | number;
1726
- };
1727
- type RepairAmountExpression = {
1728
- /**
1729
- * The expression for repair amount calculation
1730
- */
1731
- expression: string;
1732
- /**
1733
- * Version identifier
1734
- */
1735
- version: number;
1736
- };
1737
- declare const RepairItemSchema: {
1738
- readonly items: "string[]";
1739
- readonly repair_amount: "string | number";
1740
- };
1741
- type SeedProperties = {
1742
- /**
1743
- * The block identifier that will be placed when the seed is planted
1744
- * @example "beetroot"
1745
- * @example "cave_vines"
1746
- */
1747
- crop_result: string;
1748
- /**
1749
- * Array of block identifiers that this seed can be planted on or attached to.
1750
- * If not specified, standard farmland rules apply.
1751
- * @example ["cave_vines","cave_vines_head_with_berries"]
1752
- */
1753
- plant_at?: string[];
1754
- /**
1755
- * Deprecated - no longer in use.
1756
- * This property was available in versions 1.16.0 through 1.18.x for items like glow berries.
1757
- * This property no longer works after format versions of at least 1.19.0.
1758
- */
1759
- plant_at_any_solid_surface?: boolean;
1760
- /**
1761
- * Deprecated - no longer in use.
1762
- * The face of a block where this seed can be planted.
1763
- * Values: 'UP' for top of blocks (normal crops), 'DOWN' for bottom (hanging plants like glow berries).
1764
- * This property no longer works after format versions of at least 1.19.0.
1765
- */
1766
- plant_at_face?: 'UP' | 'DOWN';
1767
- };
1768
- declare const SeedPropertiesSchema: {
1769
- readonly crop_result: "string";
1770
- readonly plant_at: "string[]";
1771
- readonly plant_at_any_solid_surface: "boolean";
1772
- readonly plant_at_face: "\"UP\" | \"DOWN\"";
1773
- };
1774
- interface EntityComponentOptions {
1775
- id: string;
1776
- format: string;
1777
- is_spawnable?: boolean;
1778
- is_summonable?: boolean;
1779
- components?: {
1780
- physics?: boolean;
1781
- /**
1782
- * Adds a rider to the entity.
1783
- * Requires the following component in order to work properly: Rideable (minecraft:rideable)
1784
- */
1785
- addrider?: {
1786
- /** Type of entity to acquire as a rider */
1787
- entity_type?: string;
1788
- /**
1789
- * List of riders to be added to the entity. Can only spawn as many riders as
1790
- * "minecraft:rideable" has "seat_count".
1791
- */
1792
- riders?: Array<{
1793
- entity_type: string;
1794
- spawn_event?: string;
1795
- }>;
1796
- /** Trigger event when a rider is acquired */
1797
- spawn_event?: string;
1798
- };
1799
- /**
1800
- * Allows an entity to ignore attackable targets for a given duration.
1801
- */
1802
- 'minecraft:admire_item'?: {
1803
- /** Duration, in seconds, for which mob won't admire items if it was hurt */
1804
- cooldown_after_being_attacked?: number;
1805
- /** Duration, in seconds, that the mob is pacified */
1806
- duration?: number;
1807
- };
1808
- /**
1809
- * Adds a timer for the entity to grow up. It can be accelerated by giving the entity
1810
- * the items it likes as defined by feed_items.
1811
- */
1812
- 'minecraft:ageable'?: {
1813
- /** List of items that are dropped when an entity grows up */
1814
- drop_items?: string[];
1815
- /** Length of time before an entity grows up (-1 to always stay a baby) */
1816
- duration?: number;
1817
- /**
1818
- * List of items that can be fed to an entity to age them up. Can be a single item string,
1819
- * an array of strings, or an array of objects with item and growth properties.
1820
- */
1821
- feed_items?: string | string[] | Array<{
1822
- growth?: number;
1823
- item: string;
1824
- }>;
1825
- /** Event to fire when an entity grows up. Can be an object with event and target properties, or a simple event string. */
1826
- grow_up?: string | {
1827
- event: string;
1828
- target: string;
1829
- };
1830
- /** List of conditions to meet so that the entity can be fed. */
1831
- interact_filters?: any;
1832
- /** List of items that can be fed to the entity to pause growth for baby entities. */
1833
- pause_growth_items?: string[];
1834
- /** List of items that can be used to reset growth for baby entities. */
1835
- reset_growth_items?: string[];
1836
- };
1837
- /**
1838
- * Delay for an entity playing its sound.
1839
- */
1840
- 'minecraft:ambient_sound_interval'?: {
1841
- /** Level sound event to be played as the ambient sound. */
1842
- event_name?: string;
1843
- /**
1844
- * List of dynamic level sound events, with conditions for choosing between them.
1845
- * Evaluated in order, first one wins. If none evaluate to true, 'event_name' will take precedence.
1846
- */
1847
- event_names?: Array<{
1848
- /** The condition that must be satisfied to select the given ambient sound */
1849
- condition?: string;
1850
- /** Level sound event to be played as the ambient sound */
1851
- event_name?: string;
1852
- }>;
1853
- /** Maximum time in seconds to randomly add to the ambient sound delay time. */
1854
- range?: number;
1855
- /** Minimum time in seconds before the entity plays its ambient sound again. */
1856
- value?: number;
1857
- };
1858
- 'minecraft:attack_damage'?: {
1859
- value?: number | {
1860
- min: number;
1861
- max: number;
1862
- };
1863
- };
1864
- /**
1865
- * Compels the entity to track anger towards a set of nuisances.
1866
- */
1867
- 'minecraft:anger_level'?: {
1868
- /** Anger level will decay over time. Defines how often anger towards all nuisances will decrease by one. */
1869
- anger_decrement_interval?: number;
1870
- /** Anger boost applied to angry threshold when mob gets angry Value must be >= 0. */
1871
- angry_boost?: number;
1872
- /** Threshold that define when the mob is considered angry at a nuisance Value must be >= 0. */
1873
- angry_threshold?: number;
1874
- /** If set, other entities of the same entity definition within the broadcastRange will also become angry */
1875
- broadcast_anger?: boolean;
1876
- /** If set, other entities of the same entity definition within the broadcastRange will also become angry whenever this mob attacks */
1877
- broadcast_anger_on_attack?: boolean;
1878
- /** Conditions that make this entry in the list valid */
1879
- broadcast_filters?: any;
1880
- /** Distance in blocks within which other entities of the same entity type will become angry */
1881
- broadcast_range?: number;
1882
- /** A list of entity families to broadcast anger to */
1883
- broadcast_targets?: string[];
1884
- /** Event to fire when this entity is calmed down */
1885
- calm_event?: string;
1886
- /** The default amount of annoyingness for any given nuisance. Specifies how much to raise anger level on each provocation. */
1887
- default_annoyingness?: number;
1888
- /** Default projectile annoyingness value */
1889
- default_projectile_annoyingness?: number;
1890
- /** The amount of time in seconds that the entity will be angry. */
1891
- duration?: number;
1892
- /** Variance in seconds added to the duration [-delta, delta]. */
1893
- duration_delta?: number;
1894
- /** Filter out mob types that it should not attack while angry (other Piglins) */
1895
- filters?: any;
1896
- /** The maximum anger level that can be reached. Applies to any nuisance Value must be >= 0. */
1897
- max_anger?: number;
1898
- /** Filter that is applied to determine if a mob can be a nuisance */
1899
- nuisance_filter?: any;
1900
- /**
1901
- * Sounds to play when the entity is getting provoked. Evaluated in order.
1902
- * First matching condition wins
1903
- */
1904
- on_increase_sounds?: Array<{
1905
- /** A Molang expression describing under which conditions to play this sound, given that the entity was provoked */
1906
- condition?: string;
1907
- /** The sound to play */
1908
- sound?: string;
1909
- }>;
1910
- /** Defines if the mob should remove target if it falls below 'angry' threshold */
1911
- remove_targets_below_angry_threshold?: boolean;
1912
- /** The range of time in seconds to randomly wait before playing the sound again. */
1913
- sound_interval?: {
1914
- min: number;
1915
- max: number;
1916
- };
1917
- };
1918
- /**
1919
- * Defines an entity's 'angry' state using a timer.
1920
- */
1921
- 'minecraft:angry'?: {
1922
- /** The sound event to play when the mob is angry */
1923
- angry_sound?: string;
1924
- /** If set, other entities of the same entity definition within the broadcastRange will also become angry */
1925
- broadcast_anger?: boolean;
1926
- /** If set, other entities of the same entity definition within the broadcastRange will also become angry whenever this mob attacks */
1927
- broadcast_anger_on_attack?: boolean;
1928
- /** If true, other entities of the same entity definition within the broadcastRange will also become angry whenever this mob is attacked */
1929
- broadcast_anger_on_being_attacked?: boolean;
1930
- /** If false, when this mob is killed it does not spread its anger to other entities of the same entity definition within the broadcastRange */
1931
- broadcast_anger_when_dying?: boolean;
1932
- /** Conditions that make this entry in the list valid */
1933
- broadcast_filters?: any;
1934
- /** Distance in blocks within which other entities of the same entity type will become angry */
1935
- broadcast_range?: number;
1936
- /** A list of entity families to broadcast anger to */
1937
- broadcast_targets?: string[];
1938
- /** Event to fire when this entity is calmed down. Can be a simple event name string or an object with event and target properties. */
1939
- calm_event?: string | {
1940
- event: string;
1941
- target: string;
1942
- };
1943
- /** The amount of time in seconds that the entity will be angry. */
1944
- duration?: number;
1945
- /** Variance in seconds added to the duration [-delta, delta]. */
1946
- duration_delta?: number;
1947
- /** Filter out mob types that it should not attack while angry (other Piglins) */
1948
- filters?: any;
1949
- /** The range of time in seconds to randomly wait before playing the sound again. */
1950
- sound_interval?: {
1951
- min: number;
1952
- max: number;
1953
- };
1954
- };
1955
- /**
1956
- * Allows an entity to break doors, assuming that that flags set up for the component to use in navigation.
1957
- * Tip: Requires the entity's navigation component to have the parameter can_break_doors set to true.
1958
- */
1959
- 'minecraft:annotation.break_door'?: {
1960
- /** The time in seconds required to break through doors. */
1961
- break_time?: number;
1962
- /** The minimum difficulty that the world must be on for this entity to break doors. */
1963
- min_difficulty?: 'hard' | 'normal' | 'easy' | 'peaceful';
1964
- };
1965
- 'minecraft:annotation.open_door'?: {};
1966
- 'minecraft:attack'?: {
1967
- damage?: number | [number, number] | {
1968
- range_min: number;
1969
- range_max: number;
1970
- };
1971
- effect_duration?: number;
1972
- effect_name?: string;
1973
- };
1974
- 'minecraft:area_attack'?: {
1975
- cause?: string;
1976
- damage_cooldown?: number;
1977
- damage_per_tick?: number;
1978
- damage_range?: number;
1979
- entity_filter?: any;
1980
- play_attack_sound?: boolean;
1981
- };
1982
- 'minecraft:attack_cooldown'?: {
1983
- attack_cooldown_complete_event?: string | {
1984
- event: string;
1985
- target?: string;
1986
- };
1987
- attack_cooldown_time?: number | {
1988
- min: number;
1989
- max: number;
1990
- };
1991
- };
1992
- 'minecraft:balloonable'?: {
1993
- mass?: number;
1994
- max_distance?: number;
1995
- on_balloon?: any;
1996
- on_unballoon?: any;
1997
- soft_distance?: number;
1998
- };
1999
- 'minecraft:barter'?: {
2000
- barter_table?: string;
2001
- cooldown_after_being_attacked?: {
2002
- min: number;
2003
- max: number;
2004
- };
2005
- };
2006
- 'minecraft:block_climber'?: {};
2007
- 'minecraft:block_sensor'?: {
2008
- on_break?: Array<{
2009
- block_list?: string[];
2010
- on_block_broken?: string;
2011
- }>;
2012
- sensor_radius?: number;
2013
- sources?: any;
2014
- };
2015
- 'minecraft:body_rotation_axis_aligned'?: {};
2016
- 'minecraft:body_rotation_always_follows_head'?: {};
2017
- 'minecraft:body_rotation_blocked'?: {};
2018
- 'minecraft:body_rotation_locked_to_vehicle'?: {};
2019
- 'minecraft:boostable'?: {
2020
- boost_items?: Array<{
2021
- damage?: number;
2022
- item: string;
2023
- replace_item?: string;
2024
- }>;
2025
- duration?: number;
2026
- speed_multiplier?: number;
2027
- };
2028
- 'minecraft:boss'?: {
2029
- hud_range?: number;
2030
- name?: string;
2031
- should_darken_sky?: boolean;
2032
- };
2033
- 'minecraft:break_blocks'?: {
2034
- breakable_blocks?: string[];
2035
- };
2036
- 'minecraft:breathable'?: {
2037
- breathe_blocks?: string[];
2038
- breathes_air?: boolean;
2039
- breathes_lava?: boolean;
2040
- breathes_solids?: boolean;
2041
- breathes_water?: boolean;
2042
- generates_bubbles?: boolean;
2043
- inhale_time?: number;
2044
- non_breathe_blocks?: string[];
2045
- suffocate_time?: number;
2046
- suffocateTime?: number;
2047
- total_supply?: number;
2048
- totalSupply?: number;
2049
- };
2050
- 'minecraft:bribeable'?: {
2051
- bribe_cooldown?: number;
2052
- bribe_items?: string[] | string;
2053
- };
2054
- 'minecraft:breedable'?: {
2055
- allow_sitting?: boolean;
2056
- blend_attributes?: boolean;
2057
- breed_cooldown?: number;
2058
- breed_items?: string[] | string;
2059
- breeds_with?: Array<{
2060
- baby_type?: string;
2061
- breed_event?: string | {
2062
- event: string;
2063
- filters?: any;
2064
- };
2065
- mate_type?: string;
2066
- }> | {
2067
- baby_type?: string;
2068
- breed_event?: string | {
2069
- event: string;
2070
- filters?: any;
2071
- };
2072
- mate_type?: string;
2073
- };
2074
- causes_pregnancy?: boolean;
2075
- deny_parents_variant?: {
2076
- chance?: number;
2077
- max_variant?: string;
2078
- min_variant?: string;
2079
- };
2080
- environment_requirements?: Array<{
2081
- block_types?: string[];
2082
- count?: number;
2083
- radius?: number;
2084
- }>;
2085
- extra_baby_chance?: {
2086
- min: number;
2087
- max: number;
2088
- };
2089
- inherit_tamed?: boolean;
2090
- love_filters?: any;
2091
- mutation_factor?: {
2092
- color?: {
2093
- min: number;
2094
- max: number;
2095
- } | number;
2096
- extra_variant?: {
2097
- min: number;
2098
- max: number;
2099
- } | number;
2100
- variant?: {
2101
- min: number;
2102
- max: number;
2103
- } | number;
2104
- };
2105
- require_full_health?: boolean;
2106
- require_tame?: boolean;
2107
- };
2108
- 'minecraft:buoyant'?: {
2109
- apply_gravity?: boolean;
2110
- base_buoyancy?: number;
2111
- big_wave_probability?: number;
2112
- big_wave_speed?: number;
2113
- can_auto_step_from_liquid?: boolean;
2114
- drag_down_on_buoyancy_removed?: number;
2115
- liquid_blocks?: string[];
2116
- movement_type?: 'waves' | 'bobbing' | 'none';
2117
- };
2118
- 'minecraft:burns_in_daylight'?: {
2119
- protection_slot?: 'slot.armor.body' | 'slot.armor.chest' | 'slot.armor.feet' | 'slot.armor.head' | 'slot.armor.legs' | 'slot.weapon.mainhand' | 'slot.weapon.offhand';
2120
- };
2121
- 'minecraft:cannot_be_attacked'?: {};
2122
- 'minecraft:can_climb'?: {};
2123
- 'minecraft:can_fly'?: {};
2124
- 'minecraft:can_join_raid'?: {};
2125
- 'minecraft:can_power_jump'?: {};
2126
- 'minecraft:celebrate_hunt'?: {
2127
- broadcast?: boolean;
2128
- celeberation_targets?: any;
2129
- celebrate_sound?: string;
2130
- duration?: number;
2131
- radius?: number;
2132
- sound_interval?: {
2133
- min: number;
2134
- max: number;
2135
- };
2136
- };
2137
- 'minecraft:collision_box'?: {
2138
- height?: number;
2139
- width?: number;
2140
- };
2141
- 'minecraft:color'?: {
2142
- value?: number;
2143
- };
2144
- 'minecraft:color2'?: {
2145
- value?: number;
2146
- };
2147
- 'minecraft:combat_regeneration'?: {
2148
- apply_to_family?: boolean;
2149
- apply_to_self?: boolean;
2150
- regeneration_duration?: number | 'infinite';
2151
- };
2152
- 'minecraft:conditional_bandwidth_optimization'?: {
2153
- conditional_values?: Array<{
2154
- conditional_values?: any;
2155
- max_dropped_ticks?: number;
2156
- max_optimized_distance?: number;
2157
- use_motion_prediction_hints?: boolean;
2158
- }>;
2159
- default_values?: {
2160
- max_dropped_ticks?: number;
2161
- max_optimized_distance?: number;
2162
- use_motion_prediction_hints?: boolean;
2163
- };
2164
- };
2165
- 'minecraft:custom_hit_test'?: {
2166
- hitboxes?: Array<{
2167
- height?: number;
2168
- pivot?: [number, number, number];
2169
- width?: number;
2170
- }>;
2171
- };
2172
- 'minecraft:damage_over_time'?: {
2173
- damage_per_hurt?: number;
2174
- time_between_hurt?: number;
2175
- };
2176
- 'minecraft:damage_sensor'?: {
2177
- deals_damage?: boolean | 'yes' | 'no' | 'no_but_side_effects_apply';
2178
- triggers?: Array<{
2179
- cause?: string;
2180
- damage_modifier?: number;
2181
- damage_multiplier?: number;
2182
- deals_damage?: boolean | string;
2183
- event?: string;
2184
- filters?: any;
2185
- on_damage?: {
2186
- filters?: any;
2187
- };
2188
- on_damage_sound_event?: string;
2189
- }> | {
2190
- cause?: string;
2191
- damage_modifier?: number;
2192
- damage_multiplier?: number;
2193
- deals_damage?: boolean | string;
2194
- event?: string;
2195
- filters?: any;
2196
- on_damage?: {
2197
- filters?: any;
2198
- };
2199
- on_damage_sound_event?: string;
2200
- };
2201
- };
2202
- 'minecraft:dash'?: {
2203
- cooldown_time?: number;
2204
- horizontal_momentum?: number;
2205
- vertical_momentum?: number;
2206
- };
2207
- 'minecraft:dash_action'?: {
2208
- can_dash_underwater?: boolean;
2209
- cooldown_time?: number;
2210
- direction?: 'entity' | 'passenger';
2211
- horizontal_momentum?: number;
2212
- vertical_momentum?: number;
2213
- };
2214
- 'minecraft:default_look_angle'?: {
2215
- value?: number;
2216
- };
2217
- 'minecraft:despawn'?: {
2218
- despawn_from_chance?: boolean;
2219
- despawn_from_distance?: {
2220
- max_distance?: number;
2221
- min_distance?: number;
2222
- };
2223
- despawn_from_inactivity?: boolean;
2224
- despawn_from_simulation_edge?: boolean;
2225
- filters?: any;
2226
- min_range_inactivity_timer?: number;
2227
- min_range_random_chance?: number;
2228
- remove_child_entities?: boolean;
2229
- };
2230
- 'minecraft:dimension_bound'?: {};
2231
- 'minecraft:drying_out_timer'?: {
2232
- dried_out_event?: string | {
2233
- event: string;
2234
- target?: string;
2235
- };
2236
- recover_after_dried_out_event?: string | {
2237
- event: string;
2238
- target?: string;
2239
- };
2240
- stopped_drying_out_event?: string | {
2241
- event: string;
2242
- target?: string;
2243
- };
2244
- total_time?: number;
2245
- water_bottle_refill_time?: number;
2246
- };
2247
- 'minecraft:dweller'?: {
2248
- can_find_poi?: boolean;
2249
- can_migrate?: boolean;
2250
- dweller_role?: string;
2251
- dwelling_bounds_tolerance?: number;
2252
- dwelling_role?: string;
2253
- dwelling_type?: string;
2254
- first_founding_reward?: number;
2255
- preferred_profession?: string;
2256
- update_interval_base?: number;
2257
- update_interval_variant?: number;
2258
- };
2259
- 'minecraft:economy_trade_table'?: {
2260
- convert_trades_economy?: boolean;
2261
- cured_discount?: number | [number, number];
2262
- display_name?: string;
2263
- hero_demand_discount?: number;
2264
- max_cured_discount?: number | [number, number];
2265
- max_nearby_cured_discount?: number;
2266
- nearby_cured_discount?: number;
2267
- new_screen?: boolean;
2268
- persist_trades?: boolean;
2269
- show_trade_screen?: boolean;
2270
- table?: string;
2271
- use_legacy_price_formula?: boolean;
2272
- };
2273
- 'minecraft:entity_armor_equipment_slot_mapping'?: {
2274
- armor_slot?: string;
2275
- };
2276
- 'minecraft:entity_sensor'?: {
2277
- find_players_only?: boolean;
2278
- relative_range?: boolean;
2279
- subsensors?: Array<{
2280
- cooldown?: number;
2281
- event?: string | {
2282
- event: string;
2283
- target?: string;
2284
- };
2285
- event_filters?: any;
2286
- maximum_count?: number;
2287
- minimum_count?: number;
2288
- range?: [number, number] | [number, number, number];
2289
- require_all?: boolean;
2290
- y_offset?: number;
2291
- }>;
2292
- };
2293
- 'minecraft:equipment'?: {
2294
- slot_drop_chance?: Array<string | {
2295
- drop_chance?: number;
2296
- slot?: string;
2297
- }>;
2298
- table?: string;
2299
- };
2300
- 'minecraft:equippable'?: {
2301
- slots?: Array<{
2302
- accepted_items?: string[];
2303
- interact_text?: string;
2304
- item?: string;
2305
- on_equip?: any;
2306
- on_unequip?: any;
2307
- slot?: number;
2308
- [key: string]: any;
2309
- }>;
2310
- };
2311
- 'minecraft:equip_item'?: {
2312
- can_wear_armor?: boolean;
2313
- excluded_items?: Array<{
2314
- item?: string;
2315
- [key: string]: any;
2316
- }>;
2317
- };
2318
- 'minecraft:environment_sensor'?: {
2319
- triggers?: {
2320
- event?: string | {
2321
- event: string;
2322
- target?: string;
2323
- };
2324
- filters?: any;
2325
- [key: string]: any;
2326
- } | Array<{
2327
- event?: string | {
2328
- event: string;
2329
- target?: string;
2330
- };
2331
- filters?: any;
2332
- [key: string]: any;
2333
- }>;
2334
- };
2335
- 'minecraft:exhaustion_values'?: {
2336
- attack?: number;
2337
- damage?: number;
2338
- heal?: number;
2339
- jump?: number;
2340
- lunge?: number;
2341
- mine?: number;
2342
- sprint?: number;
2343
- sprint_jump?: number;
2344
- swim?: number;
2345
- walk?: number;
2346
- [key: string]: any;
2347
- };
2348
- 'minecraft:experience_reward'?: {
2349
- on_bred?: string | number | {
2350
- expression?: string;
2351
- version?: number;
2352
- };
2353
- on_death?: string | number | {
2354
- expression?: string;
2355
- version?: number;
2356
- };
2357
- [key: string]: any;
2358
- };
2359
- 'minecraft:explode'?: {
2360
- add?: {
2361
- component_groups?: string[];
2362
- [key: string]: any;
2363
- };
2364
- allow_underwater?: boolean;
2365
- breaks_blocks?: boolean;
2366
- causes_fire?: boolean;
2367
- damage_scaling?: number;
2368
- destroy_affected_by_griefing?: boolean;
2369
- fire_affected_by_griefing?: boolean;
2370
- fuse_length?: number | [number, number];
2371
- fuse_lit?: boolean;
2372
- knockback_scaling?: number;
2373
- max_resistance?: number;
2374
- negates_fall_damage?: boolean;
2375
- particle_effect?: string;
2376
- power?: number;
2377
- sound_effect?: string;
2378
- toggles_blocks?: boolean;
2379
- [key: string]: any;
2380
- };
2381
- 'minecraft:fire_immune'?: {};
2382
- 'minecraft:floats_in_liquid'?: {};
2383
- 'minecraft:flocking'?: {
2384
- block_distance?: number;
2385
- block_weight?: number;
2386
- breach_influence?: number;
2387
- cohesion_threshold?: number;
2388
- cohesion_weight?: number;
2389
- goal_weight?: number;
2390
- high_flock_limit?: number;
2391
- in_water?: boolean;
2392
- influence_radius?: number;
2393
- innner_cohesion_threshold?: number;
2394
- loner_chance?: number;
2395
- low_flock_limit?: number;
2396
- match_variants?: boolean;
2397
- max_height?: number;
2398
- min_height?: number;
2399
- separation_threshold?: number;
2400
- separation_weight?: number;
2401
- use_center_of_mass?: boolean;
2402
- [key: string]: any;
2403
- };
2404
- 'minecraft:flying_speed'?: {
2405
- value?: number;
2406
- };
2407
- 'minecraft:follow_range'?: {
2408
- max?: number;
2409
- value?: number;
2410
- };
2411
- 'minecraft:free_camera_controlled'?: {
2412
- backwards_movement_modifier?: number;
2413
- strafe_speed_modifier?: number;
2414
- };
2415
- 'minecraft:friction_modifier'?: {
2416
- value?: number;
2417
- };
2418
- 'minecraft:game_event_movement_tracking'?: {
2419
- emit_flap?: boolean;
2420
- emit_move?: boolean;
2421
- emit_swim?: boolean;
2422
- };
2423
- 'minecraft:genetics'?: {
2424
- mutation_rate?: number;
2425
- genes?: Array<{
2426
- name: string;
2427
- use_simplified_breeding?: boolean;
2428
- mutation_rate?: number;
2429
- allele_range?: number | {
2430
- range_min: number;
2431
- range_max: number;
2432
- };
2433
- genetic_variants?: Array<{
2434
- birth_event?: string | {
2435
- event: string;
2436
- target?: string;
2437
- };
2438
- main_allele?: number | {
2439
- range_min: number;
2440
- range_max: number;
2441
- };
2442
- hidden_allele?: number | {
2443
- range_min: number;
2444
- range_max: number;
2445
- };
2446
- both_allele?: number | {
2447
- range_min: number;
2448
- range_max: number;
2449
- };
2450
- either_allele?: number | {
2451
- range_min: number;
2452
- range_max: number;
2453
- };
2454
- }>;
2455
- }>;
2456
- };
2457
- 'minecraft:giveable'?: {
2458
- cooldown?: number;
2459
- items?: string | string[];
2460
- on_give?: string | {
2461
- event: string;
2462
- target?: string;
2463
- };
2464
- };
2465
- 'minecraft:ground_offset'?: {
2466
- value?: number;
2467
- };
2468
- 'minecraft:group_size'?: {
2469
- radius?: number;
2470
- filters?: any;
2471
- };
2472
- 'minecraft:grows_crop'?: {
2473
- chance?: number;
2474
- charges?: number;
2475
- };
2476
- 'minecraft:health'?: {
2477
- max?: number;
2478
- value?: number | {
2479
- range_min?: number;
2480
- range_max?: number;
2481
- };
2482
- };
2483
- 'minecraft:heartbeat'?: {
2484
- interval?: string;
2485
- sound_event?: string;
2486
- };
2487
- 'minecraft:hide'?: {};
2488
- 'minecraft:home'?: {
2489
- home_block_list?: string[];
2490
- restriction_radius?: number;
2491
- restriction_type?: 'none' | 'random_movement' | 'all_movement';
2492
- };
2493
- 'minecraft:horse.jump_strength'?: {
2494
- value?: number | {
2495
- range_min?: number;
2496
- range_max?: number;
2497
- };
2498
- };
2499
- 'minecraft:hurt_on_condition'?: {
2500
- damage_conditions?: Array<{
2501
- cause?: string;
2502
- damage_per_tick?: number;
2503
- filters?: {
2504
- subject?: string;
2505
- test?: string;
2506
- value?: any;
2507
- operator?: string;
2508
- [key: string]: any;
2509
- };
2510
- }>;
2511
- };
2512
- 'minecraft:ignore_cannot_be_attacked'?: {
2513
- filters?: {
2514
- subject?: string;
2515
- test?: string;
2516
- value?: any;
2517
- operator?: string;
2518
- [key: string]: any;
2519
- };
2520
- };
2521
- 'minecraft:input_air_controlled'?: {
2522
- [key: string]: any;
2523
- };
2524
- 'minecraft:input_ground_controlled'?: {};
2525
- 'minecraft:inside_block_notifier'?: {
2526
- block_list?: Array<{
2527
- block?: {
2528
- name?: string;
2529
- states?: {
2530
- [key: string]: string | number | boolean;
2531
- };
2532
- };
2533
- entered_block_event?: {
2534
- event?: string;
2535
- target?: string;
2536
- };
2537
- exited_block_event?: {
2538
- event?: string;
2539
- target?: string;
2540
- };
2541
- }>;
2542
- };
2543
- 'minecraft:insomnia'?: {
2544
- days_until_insomnia?: number;
2545
- };
2546
- 'minecraft:instant_despawn'?: {
2547
- remove_child_entities?: boolean;
2548
- };
2549
- 'minecraft:interact'?: {
2550
- cooldown?: number;
2551
- cooldown_after_being_attacked?: number;
2552
- drop_item_slot?: string | number;
2553
- drop_item_y_offset?: number;
2554
- equip_item_slot?: string | number;
2555
- health_amount?: number;
2556
- hurt_item?: number;
2557
- interact_text?: string;
2558
- interactions?: Array<{
2559
- give_item?: boolean;
2560
- hurt_item?: number;
2561
- interact_text?: string;
2562
- on_interact?: string | {
2563
- filters?: {
2564
- subject?: string;
2565
- test?: string;
2566
- value?: any;
2567
- operator?: string;
2568
- [key: string]: any;
2569
- };
2570
- };
2571
- particle_on_start?: Array<{
2572
- particle_offset_towards_interactor?: boolean;
2573
- particle_type?: string;
2574
- particle_y_offset?: number;
2575
- }>;
2576
- play_sounds?: string;
2577
- repair_entity_item?: Array<{
2578
- amount?: number;
2579
- slot?: string | number;
2580
- }>;
2581
- spawn_entities?: string;
2582
- spawn_items?: Array<{
2583
- table?: string;
2584
- y_offset?: number;
2585
- }>;
2586
- swing?: boolean;
2587
- take_item?: boolean;
2588
- transform_to_item?: string;
2589
- use_item?: boolean;
2590
- vibration?: 'none' | 'shear' | 'entity_die' | 'entity_act' | 'entity_interact';
2591
- }>;
2592
- };
2593
- 'minecraft:inventory'?: {
2594
- additional_slots_per_strength?: number;
2595
- can_be_siphoned_from?: boolean;
2596
- container_type?: string;
2597
- inventory_size?: number;
2598
- private?: boolean;
2599
- restrict_to_owner?: boolean;
2600
- };
2601
- 'minecraft:is_baby'?: {};
2602
- 'minecraft:is_charged'?: {};
2603
- 'minecraft:is_chested'?: {};
2604
- 'minecraft:is_dyeable'?: {
2605
- interact_text?: string;
2606
- };
2607
- 'minecraft:is_ignited'?: {};
2608
- 'minecraft:is_pregnant'?: {};
2609
- 'minecraft:item_controllable'?: {
2610
- control_items?: string | string[];
2611
- };
2612
- 'minecraft:item_hopper'?: {};
2613
- 'minecraft:jump.dynamic'?: {
2614
- fast_skip_data?: {
2615
- animation_duration?: number;
2616
- distance_scale?: number;
2617
- height?: number;
2618
- jump_delay?: number;
2619
- };
2620
- regular_skip_data?: {
2621
- animation_duration?: number;
2622
- distance_scale?: number;
2623
- height?: number;
2624
- jump_delay?: number;
2625
- };
2626
- };
2627
- 'minecraft:jump.static'?: {
2628
- jump_power?: number;
2629
- };
2630
- 'minecraft:knockback_resistance'?: number | {
2631
- max?: number;
2632
- value?: number;
2633
- };
2634
- 'minecraft:lava_movement'?: {
2635
- value?: number;
2636
- };
2637
- 'minecraft:leashable'?: {
2638
- can_be_cut?: boolean;
2639
- can_be_stolen?: boolean;
2640
- hard_distance?: number;
2641
- max_distance?: number;
2642
- on_leash?: string | {
2643
- event: string;
2644
- target?: string;
2645
- };
2646
- on_unleash?: string | {
2647
- event: string;
2648
- target?: string;
2649
- };
2650
- on_unleash_interact_only?: boolean;
2651
- presets?: Array<{
2652
- filter?: {
2653
- subject?: string;
2654
- test?: string;
2655
- value?: any;
2656
- operator?: string;
2657
- [key: string]: any;
2658
- };
2659
- hard_distance?: number;
2660
- max_distance?: number;
2661
- rotation_adjustment?: number;
2662
- soft_distance?: number;
2663
- spring_type?: 'bouncy' | 'dampened' | 'quad_dampened';
2664
- }>;
2665
- soft_distance?: number;
2666
- };
2667
- 'minecraft:leashable_to'?: {
2668
- can_retrieve_from?: boolean;
2669
- };
2670
- 'minecraft:looked_at'?: {
2671
- field_of_view?: number;
2672
- filters?: {
2673
- subject?: string;
2674
- test?: string;
2675
- value?: any;
2676
- operator?: string;
2677
- [key: string]: any;
2678
- };
2679
- find_players_only?: boolean;
2680
- line_of_sight_obstruction_type?: 'outline' | 'collision' | 'collision_for_camera';
2681
- look_at_locations?: string[];
2682
- looked_at_cooldown?: {
2683
- min: number;
2684
- max: number;
2685
- };
2686
- looked_at_event?: string | {
2687
- event: string;
2688
- target?: string;
2689
- };
2690
- min_looked_at_duration?: number;
2691
- not_looked_at_event?: string | {
2692
- event: string;
2693
- target?: string;
2694
- };
2695
- scale_fov_by_distance?: boolean;
2696
- search_radius?: number;
2697
- set_target?: boolean | 'never' | 'once_and_stop_scanning' | 'once_and_keep_scanning';
2698
- };
2699
- 'minecraft:loot'?: {
2700
- table?: string;
2701
- };
2702
- 'minecraft:managed_wandering_trader'?: {};
2703
- 'minecraft:mark_variant'?: {
2704
- value: number;
2705
- };
2706
- 'minecraft:mob_effect'?: {
2707
- ambient?: boolean;
2708
- cooldown_time?: number;
2709
- effect_range?: number;
2710
- effect_time?: number | 'infinite';
2711
- entity_filter?: {
2712
- subject?: string;
2713
- test?: string;
2714
- value?: any;
2715
- operator?: string;
2716
- [key: string]: any;
2717
- };
2718
- mob_effect: string;
2719
- };
2720
- 'minecraft:mob_effect_immunity'?: {
2721
- mob_effects: string[];
2722
- };
2723
- 'minecraft:movement'?: {
2724
- max?: number;
2725
- value?: number | {
2726
- range_min: number;
2727
- range_max: number;
2728
- };
2729
- };
2730
- 'minecraft:movement.amphibious'?: {
2731
- max_turn?: number;
2732
- };
2733
- 'minecraft:movement.basic'?: {
2734
- max_turn?: number;
2735
- };
2736
- 'minecraft:movement.dolphin'?: {};
2737
- 'minecraft:movement.fly'?: {
2738
- max_turn?: number;
2739
- speed_when_turning?: number;
2740
- start_speed?: number;
2741
- };
2742
- 'minecraft:movement.generic'?: {
2743
- max_turn?: number;
2744
- };
2745
- 'minecraft:movement.glide'?: {
2746
- max_turn?: number;
2747
- speed_when_turning?: number;
2748
- };
2749
- 'minecraft:movement.hover'?: {
2750
- max_turn?: number;
2751
- };
2752
- 'minecraft:movement.jump'?: {
2753
- jump_delay?: number | [number, number] | {
2754
- range_min: number;
2755
- range_max: number;
2756
- };
2757
- max_turn?: number;
2758
- };
2759
- 'minecraft:movement.skip'?: {
2760
- max_turn?: number;
2761
- };
2762
- 'minecraft:movement.sound_distance_offset'?: {
2763
- value?: number;
2764
- };
2765
- 'minecraft:movement.sway'?: {
2766
- max_turn?: number;
2767
- sway_amplitude?: number;
2768
- sway_frequency?: number;
2769
- };
2770
- 'minecraft:nameable'?: {
2771
- allow_name_tag_renaming?: boolean;
2772
- always_show?: boolean;
2773
- default_trigger?: string;
2774
- name_actions?: Array<{
2775
- name_filter?: string[];
2776
- on_named?: string | {
2777
- event: string;
2778
- target?: string;
2779
- };
2780
- }>;
2781
- };
2782
- 'minecraft:navigation.climb'?: {
2783
- avoid_damage_blocks?: boolean;
2784
- avoid_portals?: boolean;
2785
- avoid_sun?: boolean;
2786
- avoid_water?: boolean;
2787
- blocks_to_avoid?: string[];
2788
- can_breach?: boolean;
2789
- can_break_doors?: boolean;
2790
- can_jump?: boolean;
2791
- can_open_doors?: boolean;
2792
- can_open_iron_doors?: boolean;
2793
- can_pass_doors?: boolean;
2794
- can_path_from_air?: boolean;
2795
- can_path_over_lava?: boolean;
2796
- can_path_over_water?: boolean;
2797
- can_sink?: boolean;
2798
- can_swim?: boolean;
2799
- can_walk?: boolean;
2800
- can_walk_in_lava?: boolean;
2801
- is_amphibious?: boolean;
2802
- using_door_annotation?: boolean;
2803
- };
2804
- 'minecraft:navigation.float'?: {
2805
- avoid_damage_blocks?: boolean;
2806
- avoid_portals?: boolean;
2807
- avoid_sun?: boolean;
2808
- avoid_water?: boolean;
2809
- blocks_to_avoid?: string[];
2810
- can_breach?: boolean;
2811
- can_break_doors?: boolean;
2812
- can_jump?: boolean;
2813
- can_open_doors?: boolean;
2814
- can_open_iron_doors?: boolean;
2815
- can_pass_doors?: boolean;
2816
- can_path_from_air?: boolean;
2817
- can_path_over_lava?: boolean;
2818
- can_path_over_water?: boolean;
2819
- can_sink?: boolean;
2820
- can_swim?: boolean;
2821
- can_walk?: boolean;
2822
- can_walk_in_lava?: boolean;
2823
- is_amphibious?: boolean;
2824
- using_door_annotation?: boolean;
2825
- };
2826
- 'minecraft:navigation.fly'?: {
2827
- avoid_damage_blocks?: boolean;
2828
- avoid_portals?: boolean;
2829
- avoid_sun?: boolean;
2830
- avoid_water?: boolean;
2831
- blocks_to_avoid?: string[];
2832
- can_breach?: boolean;
2833
- can_break_doors?: boolean;
2834
- can_jump?: boolean;
2835
- can_open_doors?: boolean;
2836
- can_open_iron_doors?: boolean;
2837
- can_pass_doors?: boolean;
2838
- can_path_from_air?: boolean;
2839
- can_path_over_lava?: boolean;
2840
- can_path_over_water?: boolean;
2841
- can_sink?: boolean;
2842
- can_swim?: boolean;
2843
- can_walk?: boolean;
2844
- can_walk_in_lava?: boolean;
2845
- is_amphibious?: boolean;
2846
- using_door_annotation?: boolean;
2847
- };
2848
- 'minecraft:navigation.generic'?: {
2849
- avoid_damage_blocks?: boolean;
2850
- avoid_portals?: boolean;
2851
- avoid_sun?: boolean;
2852
- avoid_water?: boolean;
2853
- blocks_to_avoid?: string[];
2854
- can_breach?: boolean;
2855
- can_break_doors?: boolean;
2856
- can_jump?: boolean;
2857
- can_open_doors?: boolean;
2858
- can_open_iron_doors?: boolean;
2859
- can_pass_doors?: boolean;
2860
- can_path_from_air?: boolean;
2861
- can_path_over_lava?: boolean;
2862
- can_path_over_water?: boolean;
2863
- can_sink?: boolean;
2864
- can_swim?: boolean;
2865
- can_walk?: boolean;
2866
- can_walk_in_lava?: boolean;
2867
- is_amphibious?: boolean;
2868
- using_door_annotation?: boolean;
2869
- };
2870
- 'minecraft:navigation.hover'?: {
2871
- avoid_damage_blocks?: boolean;
2872
- avoid_portals?: boolean;
2873
- avoid_sun?: boolean;
2874
- avoid_water?: boolean;
2875
- blocks_to_avoid?: string[];
2876
- can_breach?: boolean;
2877
- can_break_doors?: boolean;
2878
- can_jump?: boolean;
2879
- can_open_doors?: boolean;
2880
- can_open_iron_doors?: boolean;
2881
- can_pass_doors?: boolean;
2882
- can_path_from_air?: boolean;
2883
- can_path_over_lava?: boolean;
2884
- can_path_over_water?: boolean;
2885
- can_sink?: boolean;
2886
- can_swim?: boolean;
2887
- can_walk?: boolean;
2888
- can_walk_in_lava?: boolean;
2889
- is_amphibious?: boolean;
2890
- using_door_annotation?: boolean;
2891
- };
2892
- 'minecraft:navigation.swim'?: {
2893
- avoid_damage_blocks?: boolean;
2894
- avoid_portals?: boolean;
2895
- avoid_sun?: boolean;
2896
- avoid_water?: boolean;
2897
- blocks_to_avoid?: string[] | Array<{
2898
- name?: string;
2899
- tags?: string;
2900
- }>;
2901
- can_breach?: boolean;
2902
- can_break_doors?: boolean;
2903
- can_jump?: boolean;
2904
- can_open_doors?: boolean;
2905
- can_open_iron_doors?: boolean;
2906
- can_pass_doors?: boolean;
2907
- can_path_from_air?: boolean;
2908
- can_path_over_lava?: boolean;
2909
- can_path_over_water?: boolean;
2910
- can_sink?: boolean;
2911
- can_swim?: boolean;
2912
- can_walk?: boolean;
2913
- can_walk_in_lava?: boolean;
2914
- is_amphibious?: boolean;
2915
- using_door_annotation?: boolean;
2916
- };
2917
- 'minecraft:navigation.walk'?: {
2918
- avoid_damage_blocks?: boolean;
2919
- avoid_portals?: boolean;
2920
- avoid_sun?: boolean;
2921
- avoid_water?: boolean;
2922
- blocks_to_avoid?: string[] | Array<{
2923
- name?: string;
2924
- tags?: string;
2925
- }>;
2926
- can_breach?: boolean;
2927
- can_break_doors?: boolean;
2928
- can_float?: boolean;
2929
- can_jump?: boolean;
2930
- can_open_doors?: boolean;
2931
- can_open_iron_doors?: boolean;
2932
- can_pass_doors?: boolean;
2933
- can_path_from_air?: boolean;
2934
- can_path_over_lava?: boolean;
2935
- can_path_over_water?: boolean;
2936
- can_sink?: boolean;
2937
- can_swim?: boolean;
2938
- can_walk?: boolean;
2939
- can_walk_in_lava?: boolean;
2940
- is_amphibious?: boolean;
2941
- using_door_annotation?: boolean;
2942
- };
2943
- 'minecraft:preferred_path'?: {
2944
- /** Cost for non-preferred blocks */
2945
- default_block_cost?: number;
2946
- /** Added cost for jumping up a node */
2947
- jump_cost?: number;
2948
- /** Distance mob can fall without taking damage */
2949
- max_fall_blocks?: number;
2950
- /** A list of block types with their associated pathfinding costs */
2951
- preferred_path_blocks?: Array<{
2952
- /** Array of block identifiers that share this cost value */
2953
- blocks: string[];
2954
- /** The cost value for these blocks during pathfinding. Lower costs make paths more preferred */
2955
- cost: number;
2956
- }>;
2957
- };
2958
- 'minecraft:out_of_control'?: {};
2959
- 'minecraft:peek'?: {
2960
- on_close?: {
2961
- event?: string;
2962
- };
2963
- on_open?: {
2964
- event?: string;
2965
- };
2966
- on_target_open?: {
2967
- event?: string;
2968
- };
2969
- };
2970
- 'minecraft:persistent'?: {};
2971
- 'minecraft:physics'?: {
2972
- has_collision?: boolean;
2973
- has_gravity?: boolean;
2974
- push_towards_closest_space?: boolean;
2975
- };
2976
- 'minecraft:player.exhaustion'?: {
2977
- max?: number;
2978
- value?: number;
2979
- };
2980
- 'minecraft:offspring'?: {
2981
- born_event?: {
2982
- event?: string;
2983
- target?: string;
2984
- };
2985
- breed_event?: {
2986
- event?: string;
2987
- target?: string;
2988
- };
2989
- breed_items?: string[];
2990
- blend_attributes?: boolean;
2991
- cooldown?: number;
2992
- delayed_growth?: boolean;
2993
- deny_parents_baby_variant?: boolean;
2994
- deny_parents_variant?: Array<{
2995
- chance?: number;
2996
- max_variant?: number;
2997
- min_variant?: number;
2998
- }>;
2999
- grow_up_duration?: number;
3000
- inherit_tamed?: boolean;
3001
- initial_variant?: number;
3002
- inheritance_chance?: {
3003
- angry?: number;
3004
- attacker?: number;
3005
- color?: number;
3006
- gene?: number;
3007
- variant?: number;
3008
- };
3009
- mutation_factor?: {
3010
- color?: number;
3011
- gene?: number;
3012
- extra?: number;
3013
- health?: number;
3014
- speed?: number;
3015
- extra_variant?: number;
3016
- variant?: number;
3017
- };
3018
- num_variants?: number;
3019
- offspring_pairs?: Record<string, string>;
3020
- parent_centric_attribute_blending?: {
3021
- attribute?: string;
3022
- dampening?: number;
3023
- };
3024
- property_inheritance?: Record<string, any>;
3025
- random_extra_variant_mutation_interval?: {
3026
- range_max?: number;
3027
- range_min?: number;
3028
- };
3029
- random_variant_mutation_interval?: {
3030
- range_max?: number;
3031
- range_min?: number;
3032
- };
3033
- should_baby_face_parent?: boolean;
3034
- variants?: Record<string | number, number>;
3035
- };
3036
- };
3037
- }
3038
- interface EntityJson extends BaseJson {
3039
- 'minecraft:entity': {
3040
- description: {
3041
- identifier: string;
3042
- is_spawnable?: boolean;
3043
- is_summonable?: boolean;
3044
- };
3045
- components?: EntityComponentOptions['components'];
3046
- component_groups?: Record<string, {}>;
3047
- };
3048
- }
3049
- export type { EntityComponentOptions, EntityJson };
3050
- export type { EntityComponentOptions as EntityComponentOpt };
3051
- export type { EntityJson as EntityJSON };
3052
- export type { BaseJson as BaseJSON };
3053
- export { RepairItemSchema, SeedPropertiesSchema };