@mbler/mcx-core 0.1.0 → 0.1.1-beta.r1

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 (32) hide show
  1. package/dist/index.d.ts +4569 -4403
  2. package/dist/index.js +4321 -3273
  3. package/dist/index.js.map +1 -1
  4. package/dist/types/ast/index.d.ts +2 -2
  5. package/dist/types/ast/prop.d.ts +1 -1
  6. package/dist/types/ast/tag.d.ts +1 -1
  7. package/dist/types/compile-mcx/compiler/compileData.d.ts +3 -3
  8. package/dist/types/compile-mcx/compiler/index.d.ts +11 -11
  9. package/dist/types/compile-mcx/compiler/utils.d.ts +3 -3
  10. package/dist/types/compile-mcx/index.d.ts +1 -1
  11. package/dist/types/compile-mcx/types.d.ts +6 -6
  12. package/dist/types/compile-mcx/utils.node.d.ts +6 -6
  13. package/dist/types/index.d.ts +9 -9
  14. package/dist/types/mcx-component/components/entity.d.ts +12 -12
  15. package/dist/types/mcx-component/components/item.d.ts +91 -4
  16. package/dist/types/mcx-component/index.d.ts +16 -4
  17. package/dist/types/mcx-component/lib.d.ts +4 -4
  18. package/dist/types/mcx-component/types/EnchantableSlot.d.ts +1 -1
  19. package/dist/types/mcx-component/types/ParticleType.d.ts +1 -1
  20. package/dist/types/mcx-component/types/SoundEvent.d.ts +1 -1
  21. package/dist/types/mcx-component/types.d.ts +242 -163
  22. package/dist/types/mcx-component/vm.d.ts +1 -1
  23. package/dist/types/transforms/index.d.ts +5 -5
  24. package/dist/types/transforms/main.d.ts +1 -1
  25. package/dist/types/transforms/utils.d.ts +4 -4
  26. package/dist/types/transforms/x-comp/index.d.ts +3 -3
  27. package/dist/types/transforms/x-comp/x-app.d.ts +1 -1
  28. package/dist/types/transforms/x-comp/x-event.d.ts +1 -1
  29. package/dist/types/transforms/x-comp/x-ui.d.ts +1 -1
  30. package/dist/types/types.d.ts +9 -9
  31. package/dist/types/utils.d.ts +1 -12
  32. package/package.json +7 -2
@@ -1,5 +1,5 @@
1
- import AST_tag from "./tag.js";
2
- import AST_prop from "./prop.js";
1
+ import AST_tag from './tag.js';
2
+ import AST_prop from './prop.js';
3
3
  declare const _default: {
4
4
  tag: typeof AST_tag;
5
5
  prop: typeof AST_prop;
@@ -1,4 +1,4 @@
1
- import type { PropNode, PropValue } from "../types.js";
1
+ import type { PropNode, PropValue } from '../types.js';
2
2
  export declare class Lexer {
3
3
  private code;
4
4
  constructor(code: string);
@@ -1,4 +1,4 @@
1
- import type { BaseToken, TagToken, TagEndToken, ContentToken, CommentToken, Token, ParsedTagNode, AttributeMap, ParsedTagContentNode, ParsedCommentNode, TokenType } from "./../types.js";
1
+ import type { BaseToken, TagToken, TagEndToken, ContentToken, CommentToken, Token, ParsedTagNode, AttributeMap, ParsedTagContentNode, ParsedCommentNode, TokenType } from './../types.js';
2
2
  declare class Tokenizer {
3
3
  private text;
4
4
  constructor(text: string);
@@ -1,6 +1,6 @@
1
- import * as t from "@babel/types";
2
- import { BuildCache, MCXstructureLoc } from "../types";
3
- import { ParsedTagNode } from "../../types";
1
+ import * as t from '@babel/types';
2
+ import { BuildCache, MCXstructureLoc } from '../types';
3
+ import { ParsedTagNode } from '../../types';
4
4
  export declare class JsCompileData {
5
5
  node: t.Program;
6
6
  BuildCache: BuildCache;
@@ -1,6 +1,6 @@
1
- import * as t from "@babel/types";
2
- import * as CompileData from "./compileData";
3
- import Utils from "./utils";
1
+ import * as t from '@babel/types';
2
+ import * as CompileData from './compileData';
3
+ import Utils from './utils';
4
4
  export declare class CompileError extends Error {
5
5
  loc: {
6
6
  line: number;
@@ -12,7 +12,7 @@ export declare class CompileError extends Error {
12
12
  });
13
13
  }
14
14
  export type Context = Record<string, t.Expression | {
15
- status: "wait";
15
+ status: 'wait';
16
16
  }>;
17
17
  export declare class CompileJS {
18
18
  node: t.Program;
@@ -20,17 +20,17 @@ export declare class CompileJS {
20
20
  TopContext: Context;
21
21
  private indexTemp;
22
22
  private push;
23
- private takeInnerMost;
24
- private writeImportKeys;
25
- private extractIdentifierNames;
26
23
  private writeBuildCache;
27
24
  private CompileData;
28
25
  getCompileData(): CompileData.JsCompileData;
29
- private conditionalInTempImport;
30
26
  private tre;
31
27
  run(): void;
32
28
  }
33
- export declare function compileJSFn(code: string): CompileData.JsCompileData;
34
- export declare function compileMCXFn(mcxCode: string): CompileData.MCXCompileData;
35
- export * from "./compileData";
29
+ export declare const compileJSFn: ((code: string) => CompileData.JsCompileData) & {
30
+ cache: Record<string, CompileData.JsCompileData>;
31
+ };
32
+ export declare const compileMCXFn: ((mcxCode: string) => CompileData.MCXCompileData) & {
33
+ cache: Record<string, CompileData.MCXCompileData>;
34
+ };
35
+ export * from './compileData';
36
36
  export { Utils as MCXNodeUtils };
@@ -1,6 +1,6 @@
1
- import * as Parser from "@babel/parser";
2
- import { ImportList } from "../types";
3
- import * as t from "@babel/types";
1
+ import * as Parser from '@babel/parser';
2
+ import { ImportList } from '../types';
3
+ import * as t from '@babel/types';
4
4
  export default class Utils {
5
5
  static FileAST(fileDir: string, parserOpt: Parser.ParserOptions): Promise<t.Program>;
6
6
  static FileContent(fileDir: string): Promise<string>;
@@ -1 +1 @@
1
- export { rollupPlugin, rolldownPlugin } from "./compiler/main";
1
+ export { rollupPlugin, rolldownPlugin } from './compiler/main';
@@ -1,6 +1,6 @@
1
- import type { ImportDeclaration, ExportAllDeclaration, ExportDefaultDeclaration, ExportNamedDeclaration, Expression, SpreadElement, ArgumentPlaceholder, CallExpression } from "@babel/types";
2
- import { CompileOpt } from "@mbler/mcx-types";
3
- import { ParsedTagNode } from "../types";
1
+ import type { ImportDeclaration, ExportAllDeclaration, ExportDefaultDeclaration, ExportNamedDeclaration, Expression, SpreadElement, ArgumentPlaceholder, CallExpression } from '@babel/types';
2
+ import { CompileOpt } from '@mbler/mcx-types';
3
+ import { ParsedTagNode } from '../types';
4
4
  interface callList {
5
5
  source: Expression;
6
6
  set: (callEXp: CallExpression) => boolean;
@@ -27,11 +27,11 @@ export declare const _MCXstructureLocComponentTypes: {
27
27
  readonly blocks: "block";
28
28
  readonly entities: "entity";
29
29
  };
30
- type MCXstructureLocComponentType = typeof _MCXstructureLocComponentTypes[keyof typeof _MCXstructureLocComponentTypes];
30
+ type MCXstructureLocComponentType = (typeof _MCXstructureLocComponentTypes)[keyof typeof _MCXstructureLocComponentTypes];
31
31
  interface MCXstructureLoc {
32
32
  script: string;
33
33
  Event: {
34
- on: "after" | "before";
34
+ on: 'after' | 'before';
35
35
  subscribe: Record<string, string>;
36
36
  loc: {
37
37
  line: number;
@@ -49,4 +49,4 @@ interface MCXstructureLoc {
49
49
  }>;
50
50
  UI: ParsedTagNode | null;
51
51
  }
52
- export type { BuildCache, ImportList, ImportListImport, callList, CompileOpt, MCXstructureLoc, MCXstructureLocComponentType };
52
+ export type { BuildCache, ImportList, ImportListImport, callList, CompileOpt, MCXstructureLoc, MCXstructureLocComponentType, };
@@ -4,11 +4,11 @@ export default class NodeUtils {
4
4
  static stringArrayToMemberExpression(stringArray: string[]): MemberExpression;
5
5
  static memberExpressionToStringArray(memberExpression: MemberExpression, maxLength: number): string[];
6
6
  /**
7
- * 计算表达式的值
8
- * @param expression Babel AST 表达式节点
9
- * @param currentContext 当前上下文变量
10
- * @param topContext 顶层上下文变量
11
- * @returns 计算结果 (string | number | symbol | object)
7
+ * Calc babel expression value
8
+ * @param expression Babel AST node
9
+ * @param currentContext current context
10
+ * @param topContext top context
11
+ * @returns {string | number | symbol | object}
12
12
  */
13
- static evaluateExpression(expression: Expression, currentContext?: Context, topContext?: Context): string | number | symbol | object;
13
+ static evaluateExpression(expression: Expression, currentContext?: Context, topContext?: Context): unknown;
14
14
  }
@@ -1,10 +1,10 @@
1
- import AST from "./ast/index.js";
2
- import { rollupPlugin, rolldownPlugin } from "./compile-mcx/index.js";
3
- import utils from "./utils.js";
4
- import * as Compiler from "./compile-mcx/compiler";
5
- import * as PUBTYPE from "./types.js";
6
- import * as compile_component from "./mcx-component/index.js";
7
- import { transform } from "./transforms";
1
+ import AST from './ast/index.js';
2
+ import { rollupPlugin, rolldownPlugin } from './compile-mcx/index.js';
3
+ import utils from './utils.js';
4
+ import * as Compiler from './compile-mcx/compiler';
5
+ import * as PUBTYPE from './types.js';
6
+ import * as compile_component from './mcx-component/index.js';
7
+ import { transform } from './transforms';
8
8
  export { PUBTYPE, AST, Compiler as compiler, utils, transform, compile_component, rollupPlugin, rolldownPlugin, };
9
- export { ItemComponent, BlockComponent, EntityComponent, PNGImageComponent, JPGImageComponent, SVGImageComponent, GIFImageComponent } from "./mcx-component/lib";
10
- export * as ComponentType from "./mcx-component/types";
9
+ export { ItemComponent, BlockComponent, EntityComponent, PNGImageComponent, JPGImageComponent, SVGImageComponent, GIFImageComponent, } from './mcx-component/lib';
10
+ export * as ComponentType from './mcx-component/types';
@@ -1,8 +1,8 @@
1
- import * as t from "./../types";
1
+ import * as t from './../types';
2
2
  declare class EntityComponent {
3
3
  #private;
4
- constructor(opt: t.EntityComponentOpt);
5
- toJSON(): t.EntityJSON;
4
+ constructor(opt: t.EntityComponentOptions);
5
+ toJSON(): t.EntityJson;
6
6
  setId(newValue: string): void;
7
7
  setFormat(newValue: string): void;
8
8
  setIsSpawnable(value: boolean): void;
@@ -237,10 +237,10 @@ declare class EntityComponent {
237
237
  can_auto_step_from_liquid?: boolean;
238
238
  drag_down_on_buoyancy_removed?: number;
239
239
  liquid_blocks?: string[];
240
- movement_type?: "waves" | "bobbing" | "none";
240
+ movement_type?: 'waves' | 'bobbing' | 'none';
241
241
  }): void;
242
242
  setBurnsInDaylight(config?: {
243
- protection_slot?: "slot.armor.body" | "slot.armor.chest" | "slot.armor.feet" | "slot.armor.head" | "slot.armor.legs" | "slot.weapon.mainhand" | "slot.weapon.offhand";
243
+ protection_slot?: 'slot.armor.body' | 'slot.armor.chest' | 'slot.armor.feet' | 'slot.armor.head' | 'slot.armor.legs' | 'slot.weapon.mainhand' | 'slot.weapon.offhand';
244
244
  }): void;
245
245
  setCannotBeAttacked(): void;
246
246
  setCanClimb(): void;
@@ -271,7 +271,7 @@ declare class EntityComponent {
271
271
  setCombatRegeneration(config?: {
272
272
  apply_to_family?: boolean;
273
273
  apply_to_self?: boolean;
274
- regeneration_duration?: number | "infinite";
274
+ regeneration_duration?: number | 'infinite';
275
275
  }): void;
276
276
  setConditionalBandwidthOptimization(config?: {
277
277
  conditional_values?: Array<{
@@ -298,7 +298,7 @@ declare class EntityComponent {
298
298
  time_between_hurt?: number;
299
299
  }): void;
300
300
  setDamageSensor(config?: {
301
- deals_damage?: boolean | "yes" | "no" | "no_but_side_effects_apply";
301
+ deals_damage?: boolean | 'yes' | 'no' | 'no_but_side_effects_apply';
302
302
  triggers?: Array<{
303
303
  cause?: string;
304
304
  damage_modifier?: number;
@@ -331,7 +331,7 @@ declare class EntityComponent {
331
331
  setDashAction(config?: {
332
332
  can_dash_underwater?: boolean;
333
333
  cooldown_time?: number;
334
- direction?: "entity" | "passenger";
334
+ direction?: 'entity' | 'passenger';
335
335
  horizontal_momentum?: number;
336
336
  vertical_momentum?: number;
337
337
  }): void;
@@ -855,7 +855,7 @@ declare class EntityComponent {
855
855
  operator?: string;
856
856
  [key: string]: any;
857
857
  };
858
- spring_type?: "bouncy" | "dampened" | "quad_dampened";
858
+ spring_type?: 'bouncy' | 'dampened' | 'quad_dampened';
859
859
  }>;
860
860
  }): void;
861
861
  /**
@@ -877,7 +877,7 @@ declare class EntityComponent {
877
877
  [key: string]: any;
878
878
  };
879
879
  find_players_only?: boolean;
880
- line_of_sight_obstruction_type?: "outline" | "collision" | "collision_for_camera";
880
+ line_of_sight_obstruction_type?: 'outline' | 'collision' | 'collision_for_camera';
881
881
  look_at_locations?: string[];
882
882
  looked_at_cooldown?: {
883
883
  min: number;
@@ -894,7 +894,7 @@ declare class EntityComponent {
894
894
  };
895
895
  scale_fov_by_distance?: boolean;
896
896
  search_radius?: number;
897
- set_target?: boolean | "never" | "once_and_stop_scanning" | "once_and_keep_scanning";
897
+ set_target?: boolean | 'never' | 'once_and_stop_scanning' | 'once_and_keep_scanning';
898
898
  }): void;
899
899
  /**
900
900
  * Sets the loot table for the entity
@@ -917,7 +917,7 @@ declare class EntityComponent {
917
917
  ambient?: boolean;
918
918
  cooldown_time?: number;
919
919
  effect_range?: number;
920
- effect_time?: number | "infinite";
920
+ effect_time?: number | 'infinite';
921
921
  entity_filter?: {
922
922
  subject?: string;
923
923
  test?: string;
@@ -1,8 +1,9 @@
1
- import * as t from "./../types";
1
+ import { PNGImageComponent } from '../lib';
2
+ import * as t from './../types';
2
3
  declare class ItemComponent {
3
4
  #private;
4
- constructor(opt: t.ItemComponentOpt);
5
- toJSON(): t.ItemJSON;
5
+ constructor(opt: t.ItemComponentOptions);
6
+ toJSON(): t.ItemJson;
6
7
  /**
7
8
  * set name
8
9
  * @throws {Error}&
@@ -11,6 +12,7 @@ declare class ItemComponent {
11
12
  */
12
13
  setName(newValue: string): void;
13
14
  setIcon(newValue: string): void;
15
+ setIcon(newValue: PNGImageComponent): void;
14
16
  /**
15
17
  * get name
16
18
  * @returns {string} name
@@ -51,7 +53,7 @@ declare class ItemComponent {
51
53
  setCooldown(config: {
52
54
  category: string;
53
55
  duration: number;
54
- type?: "use" | "attack";
56
+ type?: 'use' | 'attack';
55
57
  }): void;
56
58
  /**
57
59
  * setCompostable
@@ -429,5 +431,90 @@ declare class ItemComponent {
429
431
  emit_vibrations?: boolean;
430
432
  start_sound?: string;
431
433
  }): void;
434
+ getIcon(): string | PNGImageComponent | undefined;
435
+ getAllowOffHand(): boolean | undefined;
436
+ getTags(): {
437
+ tags?: string[];
438
+ } | undefined;
439
+ getDamageAbsorption(): {
440
+ absorbable_causes: string[];
441
+ } | undefined;
442
+ getDurability(): {
443
+ max_durability: number;
444
+ damage_chance?: {
445
+ min: number;
446
+ max: number;
447
+ };
448
+ } | undefined;
449
+ getMaxStackSize(): number | {
450
+ value?: number;
451
+ } | undefined;
452
+ getShouldDespawn(): any;
453
+ getHandEquipped(): boolean | undefined;
454
+ getRepairable(): any;
455
+ getFuel(): {
456
+ duration: number;
457
+ } | undefined;
458
+ getStorageWeightModifier(): {
459
+ weight_in_storage_item: number;
460
+ } | undefined;
461
+ getStorageWeightLimit(): {
462
+ max_weight_limit: number;
463
+ } | undefined;
464
+ getStorageItem(): {
465
+ allow_nested_storage_items?: boolean;
466
+ allowed_items?: string[];
467
+ banned_items?: string[];
468
+ max_slots?: number;
469
+ max_weight_limit?: number;
470
+ weight_in_storage_item?: number;
471
+ } | undefined;
472
+ getBundleInteraction(): {
473
+ num_viewable_slots?: number;
474
+ } | undefined;
475
+ getCooldown(): {
476
+ category: string;
477
+ duration: number;
478
+ type?: "use" | "attack";
479
+ } | undefined;
480
+ getCompostable(): {
481
+ composting_chance: number;
482
+ } | undefined;
483
+ getBlockPlacer(): {
484
+ aligned_placement?: boolean;
485
+ block: string;
486
+ replace_block_item?: boolean;
487
+ use_on?: Array<string | {
488
+ name: string;
489
+ states?: Record<string, number | string | boolean>;
490
+ tags?: string;
491
+ }>;
492
+ } | undefined;
493
+ getThrowable(): {
494
+ do_swing_animation?: boolean;
495
+ launch_power_scale?: number;
496
+ max_draw_duration?: number;
497
+ max_launch_power?: number;
498
+ min_draw_duration?: number;
499
+ scale_power_by_draw_duration?: boolean;
500
+ } | undefined;
501
+ getProjectile(): any;
502
+ getRecord(): any;
503
+ getGlint(): any;
504
+ getUseAnimation(): string | {
505
+ value?: string;
506
+ } | undefined;
507
+ getWearable(): {
508
+ 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";
509
+ protection?: number;
510
+ hides_player_location?: boolean;
511
+ dispensable?: boolean;
512
+ } | undefined;
513
+ getUseModifiers(): {
514
+ use_duration: number;
515
+ movement_modifier?: number;
516
+ emit_vibrations?: boolean;
517
+ start_sound?: string;
518
+ } | undefined;
432
519
  }
433
520
  export { ItemComponent };
@@ -1,5 +1,17 @@
1
- import { MCXCompileData } from "../compile-mcx/compiler/compileData";
2
- import { transformCtx } from "../types";
1
+ import { MCXCompileData } from '../compile-mcx/compiler/compileData';
2
+ import { transformCtx } from '../types';
3
+ import type { BaseJson, FilePoint } from './types';
4
+ /** Clear all cached bind options (called between builds) */
5
+ export declare function clearCachedOptions(): void;
6
+ export declare function resolveFilePoint(point: FilePoint, ctx: transformCtx): string;
7
+ export declare function execEdit(option: BaseJson['_meta']['file_edit'], ctx: transformCtx): Promise<void>;
8
+ /**
9
+ * Generate the final textures/item_texture.json from accumulated bind data.
10
+ * Call this in the plugin's buildEnd / onEnd hook.
11
+ */
12
+ export declare function generateItemTextureJson(output: {
13
+ resources: string;
14
+ }): Promise<void>;
3
15
  export declare function compileComponent(compiledCode: MCXCompileData, ctx: transformCtx): Promise<void>;
4
- export * from "./vm";
5
- export { ItemComponent, EntityComponent, BlockComponent, PNGImageComponent, SVGImageComponent, GIFImageComponent, JPGImageComponent } from "./lib";
16
+ export * from './vm';
17
+ export { ItemComponent, EntityComponent, BlockComponent, PNGImageComponent, SVGImageComponent, GIFImageComponent, JPGImageComponent, } from './lib';
@@ -1,6 +1,6 @@
1
- import { BlockComponent } from "./components/block";
2
- import { EntityComponent } from "./components/entity";
3
- import { ItemComponent } from "./components/item";
1
+ import { BlockComponent } from './components/block';
2
+ import { EntityComponent } from './components/entity';
3
+ import { ItemComponent } from './components/item';
4
4
  declare const _default: {
5
5
  item: typeof ItemComponent;
6
6
  entity: typeof EntityComponent;
@@ -29,4 +29,4 @@ declare class GIFImageComponent extends ImageComponent {
29
29
  classId: "mcx_git_019723";
30
30
  constructor(filePath: string);
31
31
  }
32
- export { ItemComponent, BlockComponent, EntityComponent, PNGImageComponent, JPGImageComponent, SVGImageComponent, GIFImageComponent };
32
+ export { ItemComponent, BlockComponent, EntityComponent, PNGImageComponent, JPGImageComponent, SVGImageComponent, GIFImageComponent, };
@@ -4,6 +4,6 @@
4
4
  * @description Update time UTC 2026/4/8
5
5
  */
6
6
  export declare const EnchantableSlotArray: readonly ["none", "all", "g_armor", "armor_head", "armor_torso", "armor_feet", "armor_legs", "sword", "bow", "spear", "crossbow", "melee_spear", "g_tool", "hoe", "shears", "flintsteel", "shield", "g_digging", "axe", "pickaxe", "shovel", "fishing_rod", "carrot_stick", "elytra", "cosmetic_head"];
7
- export type EnchantableSlot = typeof EnchantableSlotArray[number];
7
+ export type EnchantableSlot = (typeof EnchantableSlotArray)[number];
8
8
  export declare const EnchantableSlotEnum: readonly ["none", "all", "g_armor", "armor_head", "armor_torso", "armor_feet", "armor_legs", "sword", "bow", "spear", "crossbow", "melee_spear", "g_tool", "hoe", "shears", "flintsteel", "shield", "g_digging", "axe", "pickaxe", "shovel", "fishing_rod", "carrot_stick", "elytra", "cosmetic_head"];
9
9
  export default EnchantableSlot;
@@ -3,6 +3,6 @@
3
3
  * @description Update time UTC 2026/4/8
4
4
  */
5
5
  declare const ParticleTypeEnum: readonly ["balloongas", "bleach", "blockforcefield", "blueflame", "breezewindexplosion", "bubble", "bubblecolumndown", "bubblecolumnup", "bubblemanual", "campfiresmoke", "campfiresmoketall", "candleflame", "carrotboost", "coloredflame", "conduit", "creakingcrumble", "crit", "dragonbreath", "dragonbreathfire", "dragonbreathtrail", "dragondestroyblock", "driphoney", "driplava", "dripwater", "dustplume", "electricspark", "enchantingtable", "endrod", "evaporation", "explode", "eyeblossomclose", "eyeblossomopen", "fallingborderdust", "fallingdust", "fireworks", "fireworksoverlay", "fireworksstarter", "flame", "food", "greenflame", "heart", "hugeexplosion", "iconcrack", "ink", "largeexplode", "largesmoke", "lava", "mobappearance", "mobflame", "mobspell", "mobspellambient", "mobspellinstantaneous", "myceliumdust", "none", "note", "obsidiantear", "paleoakleaves", "pausemobgrowth", "portal", "portalreverse", "rainsplash", "reddust", "resetmobgrowth", "risingborderdust", "sculksoul", "shriek", "shulkerbullet", "slime", "smoke", "sneeze", "snowballpoof", "snowflake", "sonicexplosion", "soul", "sparkler", "spit", "stalactitedriplava", "stalactitedripwater", "terrain", "totem", "townaura", "trackingemitter", "vaultconnection", "villagerangry", "villagerhappy", "watersplash", "watersplashmanual", "waterwake", "wax", "whitesmoke", "windexplosion", "witchspell", "wolfarmorcrack"];
6
- type ParticleType = typeof ParticleTypeEnum[number];
6
+ type ParticleType = (typeof ParticleTypeEnum)[number];
7
7
  export default ParticleType;
8
8
  export { ParticleTypeEnum };
@@ -3,6 +3,6 @@
3
3
  * @description Update time UTC 2026/4/8
4
4
  */
5
5
  declare const SoundEventEnum: string[];
6
- type SoundEvent = typeof SoundEventEnum[number];
6
+ type SoundEvent = (typeof SoundEventEnum)[number];
7
7
  export default SoundEvent;
8
8
  export { SoundEventEnum };