sapdon 3.5.3 → 3.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +35 -3
- package/doc/dev/architecture.md +69 -23
- package/doc/dev/cli.md +179 -43
- package/doc/dev/core.md +2 -1
- package/doc/dev/known-pitfalls.md +869 -0
- package/doc/dev/oc.md +156 -23
- package/doc/dev/ui-architecture.md +83 -0
- package/doc/dev/workflow.md +61 -19
- package/doc/guidebook.md +196 -6
- package/doc/user/api/block.md +342 -0
- package/doc/user/api/runtime.md +332 -0
- package/doc/user/faq.md +96 -14
- package/package.json +1 -1
- package/prod/cli/index.js +1 -1
- package/prod/cli/start.js +1 -1
- package/prod/core/index.d.ts +620 -74
- package/prod/core/index.js +1 -1
- package/prod/oc/index.d.ts +134 -3
- package/prod/oc/index.js +1 -1
- package/prod/templates/js_sapdon/package.json +4 -5
- package/prod/templates/js_sapdon/res/models/blocks/cube.geo.json +35 -0
- package/prod/templates/ts_sapdon/package.json +4 -5
- package/prod/templates/ts_sapdon/res/models/blocks/cube.geo.json +35 -0
package/prod/core/index.d.ts
CHANGED
|
@@ -458,6 +458,20 @@ declare class BasicBlock {
|
|
|
458
458
|
* @param {Map|Object} component 组件 Map 或普通对象
|
|
459
459
|
*/
|
|
460
460
|
addPermutation(condition: string, component: Map<any, any> | Object): this;
|
|
461
|
+
/**
|
|
462
|
+
* 提交前的自检(由 `registry.submit()` → `runValidators()` 在序列化之前调用一次)。
|
|
463
|
+
*
|
|
464
|
+
* ⚠️ 不能在 `registerBlock` 里做这类检查:`BlockAPI.createXxx()` 是「先注册、后 addComponent」,
|
|
465
|
+
* 注册那一刻用户还没挂组件,检查必然看不到容器组件。真守卫就是这里。
|
|
466
|
+
*
|
|
467
|
+
* 检查两件事,都**只 warn、不改产物**:
|
|
468
|
+
*
|
|
469
|
+
* 1. 方块 components 里出现 `minecraft:inventory` —— 它是**实体**组件,不是方块组件,
|
|
470
|
+
* 引擎必然拒绝(`not present in the Schema`)。容器请走实体路线。
|
|
471
|
+
* 2. `minecraft:block_entity.container.slot_count` 超出官方文档的 `[1, 54]`
|
|
472
|
+
* (`BlockComponent.setBlockEntity({container})` 已经抛错;这里兜住"手写组件对象 / 裸 Map"的写法)。
|
|
473
|
+
*/
|
|
474
|
+
validate(): void;
|
|
461
475
|
/**
|
|
462
476
|
* 将方块对象转换为 JSON 格式
|
|
463
477
|
* @returns {Object} JSON 格式的方块对象
|
|
@@ -497,8 +511,7 @@ declare class Block extends BasicBlock {
|
|
|
497
511
|
#private;
|
|
498
512
|
}
|
|
499
513
|
|
|
500
|
-
|
|
501
|
-
declare class BlockComponent<T> {
|
|
514
|
+
declare class BlockComponent {
|
|
502
515
|
/**
|
|
503
516
|
* @param {string} texture - 纹理短名
|
|
504
517
|
* @param {Object|string} [options] - 可选参数对象,或旧版 tint_method 字符串
|
|
@@ -714,10 +727,88 @@ declare class BlockComponent<T> {
|
|
|
714
727
|
static setSelectionBoxCustom(origin: any[], size: any[]): Map<string, any>;
|
|
715
728
|
/**
|
|
716
729
|
* 设置方块实体(Block Entity,实验性功能,需开启 Upcoming Creator Features)。
|
|
717
|
-
*
|
|
730
|
+
*
|
|
731
|
+
* 两种调用方式(都支持,互不干扰):
|
|
732
|
+
* ```js
|
|
733
|
+
* BlockComponent.setBlockEntity() // → { dynamic_properties: false }(历史产物,逐字节不变)
|
|
734
|
+
* BlockComponent.setBlockEntity(true) // → { dynamic_properties: true }(历史产物,逐字节不变)
|
|
735
|
+
* BlockComponent.setBlockEntity(true, { container: { slot_count: 27 } })
|
|
736
|
+
* BlockComponent.setBlockEntity({ container: 54 }) // 只给容器时也可以省掉第一个参数
|
|
737
|
+
* ```
|
|
738
|
+
*
|
|
739
|
+
* ⚠️ **`container` 是「方块容器」的规范写法**(官方文档
|
|
740
|
+
* <https://learn.microsoft.com/en-us/minecraft/creator/reference/content/blockreference/examples/blockcomponents/minecraftblock_block_entity>
|
|
741
|
+
* :`container.slot_count`,`>= 1` 且 `<= 54`,超限**抛错**),
|
|
742
|
+
* 但**当前引擎版本仍会拒绝该成员**。**要现在就能用的容器,请走实体路线**:
|
|
743
|
+
* `BlockAPI.createTileBlock(identifier, category, textures_arr, { inventory_size })`。
|
|
744
|
+
* 引擎拒绝的原文与版本见 `doc/dev/known-pitfalls.md`。
|
|
745
|
+
*
|
|
746
|
+
* ⚠️ `combineComponents` 是「**后者覆盖前者**」:要同时给 `dynamic_properties` 与 `container`,
|
|
747
|
+
* 请像上面那样**一次调用写完**;把两个 `setBlockEntity(...)` 合并会让先出现的那个被整份丢掉
|
|
748
|
+
* (框架不在 `combineComponents` 里做隐式深合并 —— 那会把"覆盖"这条既有语义改掉)。
|
|
749
|
+
*
|
|
750
|
+
* @param {Boolean|Object} [dynamic_properties=false] 是否启用动态属性存储;也可以直接传 `options` 对象
|
|
751
|
+
* (此时读 `options.dynamic_properties`,缺省 false)。
|
|
752
|
+
* @param {Object} [options] 可选参数。
|
|
753
|
+
* @param {Object|number} [options.container] 方块容器:`{ slot_count }`(`inventory_size` 亦可作别名),
|
|
754
|
+
* 或直接给槽位数。必须是 `[1, 54]` 的整数,超限抛错。
|
|
718
755
|
* @returns {Map<string, any>} - 新的组件集合。
|
|
719
756
|
*/
|
|
720
|
-
static setBlockEntity(dynamic_properties?: boolean
|
|
757
|
+
static setBlockEntity(dynamic_properties?: boolean | Object, options?: {
|
|
758
|
+
container?: number | Object | undefined;
|
|
759
|
+
}): Map<string, any>;
|
|
760
|
+
/**
|
|
761
|
+
* 设置方块容器 —— ⚠️ **已废弃(deprecated),且当前引擎版本拒绝该组件**。
|
|
762
|
+
*
|
|
763
|
+
* ## 为什么废弃
|
|
764
|
+
* 本方法产出的是**方块** `components` 里的 `minecraft:inventory`。但 `minecraft:inventory`
|
|
765
|
+
* 是**实体**组件(官方文档在 Entity Components 下:
|
|
766
|
+
* <https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_inventory>),
|
|
767
|
+
* **不是**方块组件(Block Components 列表里没有它)。于是真机引擎直接拒绝:
|
|
768
|
+
* ```
|
|
769
|
+
* -> components -> minecraft:inventory: this component was found in the input,
|
|
770
|
+
* but is not present in the Schema
|
|
771
|
+
* ```
|
|
772
|
+
* ⇒ 把实体组件写在方块里,**在任何版本上都不成立**(不是"版本太旧"的问题)。
|
|
773
|
+
* 也就是说:**框架此前产不出任何可用的方块容器**,这条 API 是误导性的。
|
|
774
|
+
*
|
|
775
|
+
* ## 现在该怎么做
|
|
776
|
+
* - **要能用的容器 → 实体路线**(当前引擎版本下**唯一可用**):
|
|
777
|
+
* `BlockAPI.createTileBlock(identifier, category, textures_arr, { inventory_size, container_type, can_be_siphoned_from })`
|
|
778
|
+
* —— 方块带承载实体、实体的行为文件里挂 `minecraft:inventory`。
|
|
779
|
+
* 已在用的 `TileBlock` 也可以直接改 `tile.entity.behavior.addComponent(EntityComponent.setInventoryProperties({...}))`。
|
|
780
|
+
* - **要规范的方块容器 JSON → `BlockComponent.setBlockEntity(true, { container: { slot_count } })`**
|
|
781
|
+
* (`slot_count` 官方文档限制 `[1,54]`)。它会生成正确的 `minecraft:block_entity.container`,
|
|
782
|
+
* 但**当前引擎版本同样会拒** —— 等引擎支持后即可直接用。
|
|
783
|
+
*
|
|
784
|
+
* ## 为什么保留签名(而不是删掉 / 改成别的产物)
|
|
785
|
+
* 1. 已有项目调用它时,产物里的键、字段**一个字节都不变** —— 不会出现"升个框架版本构建就报错",
|
|
786
|
+
* 也不会因为改成 `block_entity.container` 而与用户自己写的 `setBlockEntity(...)` 抢同一个 JSON 键
|
|
787
|
+
* (`combineComponents` 是后者覆盖前者,改键会让容器信息在某些写法下**被静默吞掉**)。
|
|
788
|
+
* 2. 真正的错误(把实体组件当方块组件用)由**构建期 warn** 明确指出,并给出两条新路线。
|
|
789
|
+
* 3. `inventory_size` 超过 54 的写法在这里仍可表达(实体组件文档**没有**上限)。
|
|
790
|
+
*
|
|
791
|
+
* @deprecated 改用实体路线(`createTileBlock` 的 `inventory_size`),或
|
|
792
|
+
* `BlockComponent.setBlockEntity(true, { container: { slot_count } })` 产出规范写法。
|
|
793
|
+
* @param {Object} options - 容器参数。
|
|
794
|
+
* @param {number} options.inventory_size - 槽位数(正整数,必填;实体组件文档未给上限)。
|
|
795
|
+
* @param {boolean} [options.private] - 是否仅所有者可访问。
|
|
796
|
+
* @param {string} [options.container_type] - 容器音效/行为类型。官方文档列出的取值:
|
|
797
|
+
* `horse` / `minecart_chest` / `chest_boat` / `minecart_hopper` / `inventory` / `container` / `hopper`
|
|
798
|
+
* (此处不做白名单,避免把未文档化但可用的值写死掉)。
|
|
799
|
+
* @param {boolean} [options.can_be_siphoned_from] - 能否用漏斗抽取。
|
|
800
|
+
* @param {number} [options.additional_slots_per_strength] - 每级强度的额外槽位(非负整数)。
|
|
801
|
+
* @param {boolean} [options.restrict_to_owner] - 是否限制为所有者可打开。
|
|
802
|
+
* @returns {Map<string, any>} - 组件集合(仅 `minecraft:inventory`)。
|
|
803
|
+
*/
|
|
804
|
+
static setInventory(options?: {
|
|
805
|
+
inventory_size: number;
|
|
806
|
+
private?: boolean | undefined;
|
|
807
|
+
container_type?: string | undefined;
|
|
808
|
+
can_be_siphoned_from?: boolean | undefined;
|
|
809
|
+
additional_slots_per_strength?: number | undefined;
|
|
810
|
+
restrict_to_owner?: boolean | undefined;
|
|
811
|
+
}): Map<string, any>;
|
|
721
812
|
/**
|
|
722
813
|
* 设置方块的活塞移动行为。
|
|
723
814
|
* @param {String} movement_type - 移动类型: "immovable" | "popped" | "push" | "push_pull"。
|
|
@@ -1305,10 +1396,39 @@ declare class Entity {
|
|
|
1305
1396
|
declare class TileBlock {
|
|
1306
1397
|
/**
|
|
1307
1398
|
* 带实体的方块类
|
|
1399
|
+
*
|
|
1400
|
+
* 容器走**实体**路线:`minecraft:inventory` 是**实体**组件,挂在 `${identifier}_entity` 的
|
|
1401
|
+
* 行为文件上。这是当前引擎版本下**唯一可用**的方块容器方案(方块侧的
|
|
1402
|
+
* `minecraft:block_entity.container` 成员会被引擎拒:
|
|
1403
|
+
* `-> minecraft:block_entity -> container: … is not present in the Schema`)。
|
|
1404
|
+
*
|
|
1308
1405
|
* @param {*} identifier
|
|
1309
1406
|
* @param {*} category
|
|
1310
1407
|
* @param {*} textures_arr
|
|
1311
1408
|
* @param {*} options
|
|
1409
|
+
* @param {boolean} [options.hide_in_command=false] 是否在命令中隐藏(透传给 `BasicBlock`)。
|
|
1410
|
+
* @param {string} [options.group] 创造菜单分组(透传给 `BasicBlock` → `menu_category.group`)。
|
|
1411
|
+
* ⚠️ 与 `createBasicBlock` 取值一致:**不传 = undefined**(产物里 `menu_category` 只有
|
|
1412
|
+
* `category` 与 `is_hidden_in_commands`)。分组名是**本地化键**,项目须在
|
|
1413
|
+
* `RP/texts/*.lang` 里定义,否则显示裸键名。
|
|
1414
|
+
* @param {string} [options.format_version] 方块 JSON 的 `format_version`(默认 `1.26.30`)。
|
|
1415
|
+
* @param {string} [options.entity_texture] 客户端实体的贴图**资源路径**
|
|
1416
|
+
* (如 `"textures/blocks/entity/normal"`,省略扩展名)。
|
|
1417
|
+
* 默认 = `textures_arr[0]`(**历史行为,逐字节不变**)。
|
|
1418
|
+
* ⚠️ `textures_arr[0]` 在**方块**侧是 terrain_texture.json 的**键**、在**实体**侧却必须是
|
|
1419
|
+
* 资源路径 —— 两者不是一回事。只给短名的项目(如 `"machineblock_0"`)必须传本参数,
|
|
1420
|
+
* 否则客户端实体会报 `Missing referenced asset`。
|
|
1421
|
+
* @param {number} [options.inventory_size=27] 实体容器槽位数(正整数)。
|
|
1422
|
+
* ⚠️ 官方文档(<https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entitycomponents/minecraftcomponent_inventory>)
|
|
1423
|
+
* 只写 "Number of slots the container has"、**未给上限** —— 别照搬方块路线 `[1,54]` 的限制。
|
|
1424
|
+
* @param {string} [options.container_type="minecart_chest"] 容器音效/行为类型。官方文档列出的取值:
|
|
1425
|
+
* `horse` / `minecart_chest` / `chest_boat` / `minecart_hopper` / `inventory` / `container` / `hopper`
|
|
1426
|
+
* (此处不做白名单,避免把未文档化但可用的值写死掉)。
|
|
1427
|
+
* @param {boolean} [options.can_be_siphoned_from=true] 能否用漏斗抽取。
|
|
1428
|
+
* ⚠️ **没有**「延迟 despawn」这类入口,而且**不要**去加:
|
|
1429
|
+
* 往 `item_despawn` 组的 `minecraft:transformation` 上加 `delay` 会让同组的
|
|
1430
|
+
* `minecraft:instant_despawn` 先把实体删掉 ⇒ **整容器一个都不掉**(真机教训,
|
|
1431
|
+
* 见 `doc/dev/known-pitfalls.md` §4.15)。
|
|
1312
1432
|
*/
|
|
1313
1433
|
constructor(identifier: any, category: any, textures_arr: any, options?: any);
|
|
1314
1434
|
block: BasicBlock;
|
|
@@ -1941,7 +2061,7 @@ declare class EntityComponent {
|
|
|
1941
2061
|
static setInventoryProperties(options: {
|
|
1942
2062
|
additionalSlotsPerStrength?: number | undefined;
|
|
1943
2063
|
canBeSiphonedFrom?: boolean | undefined;
|
|
1944
|
-
containerType?: "
|
|
2064
|
+
containerType?: "horse" | "chest_boat" | "minecart_chest" | undefined;
|
|
1945
2065
|
inventorySize?: number | undefined;
|
|
1946
2066
|
isPrivate?: boolean | undefined;
|
|
1947
2067
|
restrictToOwner?: boolean | undefined;
|
|
@@ -2276,6 +2396,7 @@ declare namespace BlockAPI {
|
|
|
2276
2396
|
function createBasicBlock(identifier: string, category: string, textures_arr: any[], options?: {
|
|
2277
2397
|
group: string;
|
|
2278
2398
|
hide_in_command: boolean;
|
|
2399
|
+
format_version?: string | undefined;
|
|
2279
2400
|
}): BasicBlock;
|
|
2280
2401
|
function createBlock(identifier: string, category: string, variantDatas: any[], options?: {
|
|
2281
2402
|
group: string;
|
|
@@ -2283,22 +2404,36 @@ declare namespace BlockAPI {
|
|
|
2283
2404
|
ambient_occlusion: boolean;
|
|
2284
2405
|
face_dimming: boolean;
|
|
2285
2406
|
render_method: string;
|
|
2407
|
+
format_version?: string | undefined;
|
|
2286
2408
|
}): Block;
|
|
2287
2409
|
function createRotatableBlock(identifier: string, category: string, textures_arr: any[], options?: {
|
|
2288
2410
|
group: string;
|
|
2289
2411
|
hide_in_command: boolean;
|
|
2290
2412
|
rotationType: string;
|
|
2291
2413
|
yRotationOffset: number;
|
|
2414
|
+
format_version?: string | undefined;
|
|
2292
2415
|
}): RotatableBlock;
|
|
2293
2416
|
function createGeometryBlock(identifier: any, category: any, geometry: any, material_instances: any, options?: {}): GeometryBlock;
|
|
2417
|
+
function createTileBlock(identifier: string, category: string, textures_arr: any[], options?: {
|
|
2418
|
+
group?: string | undefined;
|
|
2419
|
+
hide_in_command?: boolean | undefined;
|
|
2420
|
+
format_version?: string | undefined;
|
|
2421
|
+
entity_texture?: string | undefined;
|
|
2422
|
+
inventory_size?: number | undefined;
|
|
2423
|
+
container_type?: string | undefined;
|
|
2424
|
+
can_be_siphoned_from?: boolean | undefined;
|
|
2425
|
+
}): TileBlock;
|
|
2294
2426
|
function createOreBlock(identifier: any, category: any, textures_arr: any, options?: {}): OreBlock;
|
|
2295
|
-
function createHeadBlock(identifier: string, category: string, texture:
|
|
2427
|
+
function createHeadBlock(identifier: string, category: string, texture: string, options?: {
|
|
2296
2428
|
group: string;
|
|
2297
2429
|
hide_in_command: boolean;
|
|
2298
2430
|
ambient_occlusion: boolean;
|
|
2299
2431
|
face_dimming: boolean;
|
|
2300
2432
|
render_method: string;
|
|
2301
|
-
|
|
2433
|
+
tick_interval?: any[] | undefined;
|
|
2434
|
+
custom_components?: any[] | undefined;
|
|
2435
|
+
format_version?: string | undefined;
|
|
2436
|
+
}): HeadBlock;
|
|
2302
2437
|
function createGlassBlock(identifier: any, category: any, texture: any, options?: {}): GlassBlock;
|
|
2303
2438
|
function createFenceBlock(identifier: any, category: any, textures_arr: any, options?: {}): FenceBlock;
|
|
2304
2439
|
function createStairBlock(identifier: any, category: any, textures_arr: any, options?: {}): StairBlock;
|
|
@@ -2991,9 +3126,9 @@ declare class UISystem {
|
|
|
2991
3126
|
|
|
2992
3127
|
/** 共享 UI 类型定义(JSON UI 规范的受控映射) */
|
|
2993
3128
|
/** 尺寸向量(像素数字或百分比/计算字符串),如 [320, 207] / ["50%", "100%"] */
|
|
2994
|
-
type Size2 = [number | string, number | string];
|
|
3129
|
+
type Size2$1 = [number | string, number | string];
|
|
2995
3130
|
/** 偏移向量 [x, y](像素) */
|
|
2996
|
-
type Offset2 = [number, number];
|
|
3131
|
+
type Offset2$1 = [number, number];
|
|
2997
3132
|
/** 锚点(anchor_from / anchor_to)可选值 */
|
|
2998
3133
|
type Anchor = 'top_left' | 'top_middle' | 'top_right' | 'left_middle' | 'center' | 'right_middle' | 'bottom_left' | 'bottom_middle' | 'bottom_right';
|
|
2999
3134
|
/** 数据绑定类型 */
|
|
@@ -3158,7 +3293,7 @@ declare class Control {
|
|
|
3158
3293
|
propagate_alpha: boolean;
|
|
3159
3294
|
clips_children: boolean;
|
|
3160
3295
|
allow_clipping: boolean;
|
|
3161
|
-
clip_offset: Offset2;
|
|
3296
|
+
clip_offset: Offset2$1;
|
|
3162
3297
|
clip_state_change_event: string;
|
|
3163
3298
|
enable_scissor_test: boolean;
|
|
3164
3299
|
property_bag: JsonUIBag;
|
|
@@ -3171,7 +3306,7 @@ declare class Control {
|
|
|
3171
3306
|
ignored: boolean;
|
|
3172
3307
|
variables: JsonUIBag;
|
|
3173
3308
|
modifications: unknown[];
|
|
3174
|
-
grid_position: Offset2;
|
|
3309
|
+
grid_position: Offset2$1;
|
|
3175
3310
|
collection_index: number;
|
|
3176
3311
|
/**
|
|
3177
3312
|
* 设置控件的可见性。
|
|
@@ -3220,7 +3355,7 @@ declare class Control {
|
|
|
3220
3355
|
* @param {Offset2} offset - 裁剪偏移量,格式为 [x, y](默认值:[0, 0])
|
|
3221
3356
|
* @returns {Control} 返回当前实例以支持链式调用
|
|
3222
3357
|
*/
|
|
3223
|
-
setClipOffset(offset?: Offset2): this;
|
|
3358
|
+
setClipOffset(offset?: Offset2$1): this;
|
|
3224
3359
|
/**
|
|
3225
3360
|
* 设置裁剪状态更改事件。
|
|
3226
3361
|
* @param {string} event - 裁剪状态更改时触发的事件名称
|
|
@@ -3298,7 +3433,7 @@ declare class Control {
|
|
|
3298
3433
|
* @param {Offset2} position - 网格位置,格式为 [行, 列]
|
|
3299
3434
|
* @returns {Control} 返回当前实例以支持链式调用
|
|
3300
3435
|
*/
|
|
3301
|
-
setGridPosition(position: Offset2): this;
|
|
3436
|
+
setGridPosition(position: Offset2$1): this;
|
|
3302
3437
|
/**
|
|
3303
3438
|
* 设置控件在集合中的索引。
|
|
3304
3439
|
* @param {number} index - 要设置的索引
|
|
@@ -3328,13 +3463,13 @@ declare class Control {
|
|
|
3328
3463
|
*/
|
|
3329
3464
|
|
|
3330
3465
|
type AnchorOrString = Anchor | string;
|
|
3331
|
-
type SizeOrString = Size2 | string;
|
|
3466
|
+
type SizeOrString = Size2$1 | string;
|
|
3332
3467
|
declare class Layout {
|
|
3333
3468
|
[key: string]: unknown;
|
|
3334
3469
|
size: SizeOrString;
|
|
3335
|
-
max_size: Size2;
|
|
3336
|
-
min_size: Size2;
|
|
3337
|
-
offset: Offset2;
|
|
3470
|
+
max_size: Size2$1;
|
|
3471
|
+
min_size: Size2$1;
|
|
3472
|
+
offset: Offset2$1;
|
|
3338
3473
|
anchor_from: AnchorOrString;
|
|
3339
3474
|
anchor_to: AnchorOrString;
|
|
3340
3475
|
inherit_max_sibling_width: boolean;
|
|
@@ -3354,19 +3489,19 @@ declare class Layout {
|
|
|
3354
3489
|
* @param {Size2} maxSize - 最大大小,格式为 [width, height](默认值:["default", "default"])
|
|
3355
3490
|
* @returns {Layout} 返回当前实例以支持链式调用
|
|
3356
3491
|
*/
|
|
3357
|
-
setMaxSize(maxSize?: Size2): this;
|
|
3492
|
+
setMaxSize(maxSize?: Size2$1): this;
|
|
3358
3493
|
/**
|
|
3359
3494
|
* 设置 UI 元素的最小大小。
|
|
3360
3495
|
* @param {Size2} minSize - 最小大小,格式为 [width, height](默认值:["default", "default"])
|
|
3361
3496
|
* @returns {Layout} 返回当前实例以支持链式调用
|
|
3362
3497
|
*/
|
|
3363
|
-
setMinSize(minSize?: Size2): this;
|
|
3498
|
+
setMinSize(minSize?: Size2$1): this;
|
|
3364
3499
|
/**
|
|
3365
3500
|
* 设置 UI 元素相对于父元素的位置。
|
|
3366
3501
|
* @param {Offset2} offset - 偏移量,格式为 [x, y](默认值:[0, 0])
|
|
3367
3502
|
* @returns {Layout} 返回当前实例以支持链式调用
|
|
3368
3503
|
*/
|
|
3369
|
-
setOffset(offset?: Offset2): this;
|
|
3504
|
+
setOffset(offset?: Offset2$1): this;
|
|
3370
3505
|
/**
|
|
3371
3506
|
* 设置父元素中的锚点。
|
|
3372
3507
|
* @param {AnchorOrString} anchorFrom - 锚点(可能值:top_left, top_middle, top_right, left_middle, center, right_middle, bottom_left, bottom_middle, bottom_right)(默认值:center)
|
|
@@ -3921,14 +4056,18 @@ declare class ItemComponent {
|
|
|
3921
4056
|
static setDurability(max_durability: number, damage_chance_min?: number, damage_chance_max?: number): ItemComponentMap;
|
|
3922
4057
|
/**
|
|
3923
4058
|
* 设置放置方块组件
|
|
3924
|
-
* @param block
|
|
4059
|
+
* @param block 被放置的方块:标识符字符串,或 BlockDescriptor
|
|
4060
|
+
* (`{ name, states }` / `{ tags }`)。
|
|
4061
|
+
* ⚠️ `minecraft:block_placer.block` 是否接受 BlockDescriptor 取决于引擎版本
|
|
4062
|
+
* —— 传之前先按目标引擎验一次(`doc/dev/known-pitfalls.md` §2.3)。
|
|
3925
4063
|
* @param options 放置配置
|
|
3926
|
-
* @param options.replaceBlockItem
|
|
4064
|
+
* @param options.replaceBlockItem 是否替换原方块物品(要求物品 id 与方块 id 相同)
|
|
3927
4065
|
* @param options.alignedPlacement 是否启用对齐放置
|
|
3928
4066
|
* @param options.useOn 允许放置的目标方块描述符列表;省略则可放置于任何方块
|
|
3929
4067
|
* @returns 组件 Map
|
|
4068
|
+
* @throws block 不是「非空字符串」也不是「含 string 类型 name 或 tags 的对象」
|
|
3930
4069
|
*/
|
|
3931
|
-
static setBlockPlacer(block: string, options?: BlockPlacerOptions): ItemComponentMap;
|
|
4070
|
+
static setBlockPlacer(block: string | BlockDescriptor, options?: BlockPlacerOptions): ItemComponentMap;
|
|
3932
4071
|
/**
|
|
3933
4072
|
* 设置自定义组件列表
|
|
3934
4073
|
* @param custom_components 自定义组件 ID 数组
|
|
@@ -4643,7 +4782,7 @@ declare class Grid extends CollectionPanel {
|
|
|
4643
4782
|
grid: GridProp;
|
|
4644
4783
|
constructor(id: string, template?: string);
|
|
4645
4784
|
setGridProp(grid_prop: GridProp): this;
|
|
4646
|
-
addGridItem(grid_position: Offset2, content: UIElement | JsonUIBag, name?: string, debugColor?: [number, number, number, number]): this;
|
|
4785
|
+
addGridItem(grid_position: Offset2$1, content: UIElement | JsonUIBag, name?: string, debugColor?: [number, number, number, number]): this;
|
|
4647
4786
|
protected serializableSources(): object[];
|
|
4648
4787
|
serialize(): SerializedElement;
|
|
4649
4788
|
}
|
|
@@ -4767,7 +4906,7 @@ declare class StackPanel extends Panel {
|
|
|
4767
4906
|
orientation: string;
|
|
4768
4907
|
stackNum: number;
|
|
4769
4908
|
constructor(id: string, template?: string);
|
|
4770
|
-
addStack(size: Size2 | string, content: UIElement | JsonUIBag, debug?: boolean): this;
|
|
4909
|
+
addStack(size: Size2$1 | string, content: UIElement | JsonUIBag, debug?: boolean): this;
|
|
4771
4910
|
/**
|
|
4772
4911
|
* Possible values:
|
|
4773
4912
|
vertical
|
|
@@ -4802,10 +4941,270 @@ declare class ChestUISystem {
|
|
|
4802
4941
|
static registerContainerUI(new_container_title: string, ui_system_root_panel: string): void;
|
|
4803
4942
|
}
|
|
4804
4943
|
|
|
4944
|
+
/**
|
|
4945
|
+
* 容器槽位的版面换算 —— 纯函数模块。
|
|
4946
|
+
*
|
|
4947
|
+
* 只做三件事:槽号 ↔ `grid_position`、像素坐标 ↔ 格位 `offset`、槽位声明校验。
|
|
4948
|
+
* **零 import**,因此 Node 里可直接加载、可离线单测(不依赖 UI 元素类与构建管道)。
|
|
4949
|
+
*
|
|
4950
|
+
* 坐标系约定:`pos` / `gridOrigin` 都是**面板左上角为原点**的像素坐标(`top_left` 锚)。
|
|
4951
|
+
*/
|
|
4952
|
+
type Offset2 = [number, number];
|
|
4953
|
+
type Size2 = [number | string, number | string];
|
|
4954
|
+
/**
|
|
4955
|
+
* 槽位语义:`input` 不写标志位;`output` / `display` 写 `enabled: false`。
|
|
4956
|
+
*
|
|
4957
|
+
* ⚠️ 这只是**缺省值**:声明里显式给了 `enabled` 时一律以显式值为准(见 `SlotSpec.enabled`)。
|
|
4958
|
+
*/
|
|
4959
|
+
type SlotKind = 'input' | 'output' | 'display';
|
|
4960
|
+
/** 声明的槽位语义全集(用于校验与遍历) */
|
|
4961
|
+
declare const SLOT_KINDS: readonly SlotKind[];
|
|
4962
|
+
/**
|
|
4963
|
+
* 该槽位语义的**缺省**门控值:`output` / `display` → `false`(`input` → 不写该键)。
|
|
4964
|
+
*
|
|
4965
|
+
* 它只在调用方**没有**显式给 `enabled` 时生效 —— 显式值永远优先(`resolveSlot`)。
|
|
4966
|
+
*/
|
|
4967
|
+
declare function isGatedKind(kind: SlotKind): boolean;
|
|
4968
|
+
/** 格位尺寸:单数字 = 正方形边长;二元组 = [宽, 高] */
|
|
4969
|
+
type CellSizeInput = number | Offset2;
|
|
4970
|
+
/** 九宫格切分:单数字或 [x0, y0, x1, y1] */
|
|
4971
|
+
type NineSlice = number | [number, number, number, number];
|
|
4972
|
+
/** 格位背景:纹理路径,或带九宫格切分的纹理描述 */
|
|
4973
|
+
type SlotBackground = string | {
|
|
4974
|
+
texture: string;
|
|
4975
|
+
nineslice_size?: NineSlice;
|
|
4976
|
+
};
|
|
4977
|
+
/** 内层格位控件的锚点(与 `SLOT_CALIBRATION.anchor` 同步) */
|
|
4978
|
+
type SlotAnchor = 'top_left' | 'center';
|
|
4979
|
+
/** 原版 `common.container_item` 可覆盖变量子集 */
|
|
4980
|
+
interface ItemRendererSpec {
|
|
4981
|
+
/** `$item_renderer`:渲染器控件引用 */
|
|
4982
|
+
ref?: string;
|
|
4983
|
+
/** `$item_renderer_size` */
|
|
4984
|
+
size?: Offset2;
|
|
4985
|
+
/** `$item_renderer_offset` */
|
|
4986
|
+
offset?: Offset2;
|
|
4987
|
+
/** `$item_renderer_panel_size` */
|
|
4988
|
+
panelSize?: Offset2;
|
|
4989
|
+
}
|
|
4990
|
+
/** 槽位声明(`addSlot` 的入参;旧接口路径可用 `gridPosition` / `offset` 直传) */
|
|
4991
|
+
interface SlotSpec {
|
|
4992
|
+
/** 容器槽位号(与 `gridPosition` 二选一;两者都给时以 `gridPosition` 为准) */
|
|
4993
|
+
slot?: number;
|
|
4994
|
+
/** 面板内像素坐标(`top_left` 锚);与 `offset` 二选一(都给时以 `offset` 为准) */
|
|
4995
|
+
pos?: Offset2;
|
|
4996
|
+
/** 显式网格位置 `[列, 行]`(旧接口路径;给了就不再由 `slot` 换算) */
|
|
4997
|
+
gridPosition?: Offset2;
|
|
4998
|
+
/** 显式偏移(旧接口路径;给了就不再由 `pos` 换算) */
|
|
4999
|
+
offset?: Offset2;
|
|
5000
|
+
/** 槽位语义,默认 `input` */
|
|
5001
|
+
kind?: SlotKind;
|
|
5002
|
+
/**
|
|
5003
|
+
* 该槽的**视觉**格位尺寸(默认取标定表)。
|
|
5004
|
+
*
|
|
5005
|
+
* 只影响内层控件的 `$cell_image_size` / `size`,**不参与**基座与网格尺寸换算 ——
|
|
5006
|
+
* 网格几何一律由 `setSlotDefaults({ cellSize })`(或标定表)决定;比格位大的视觉尺寸
|
|
5007
|
+
* 会从格位左上角向外溢出(原版槽位模板允许,用于画长条进度槽之类)。
|
|
5008
|
+
*/
|
|
5009
|
+
cellSize?: CellSizeInput;
|
|
5010
|
+
/** 内层控件尺寸(不给则等于 `cellSize`) */
|
|
5011
|
+
size?: Size2;
|
|
5012
|
+
/**
|
|
5013
|
+
* 显式写进内层控件的 `enabled` 值。**给了就以此为准**,覆盖 `kind` 的缺省门控。
|
|
5014
|
+
*
|
|
5015
|
+
* 缺省行为:`input` 不写该键(继承原版默认 `true`)、`output` / `display` 写 `false`。
|
|
5016
|
+
* 传 `true` 可让被门控的槽位恢复交互(例如「产物要能取出来」的输出槽)。
|
|
5017
|
+
*/
|
|
5018
|
+
enabled?: boolean;
|
|
5019
|
+
/** 格位背景纹理(框架据此生成背景 image 控件) */
|
|
5020
|
+
background?: SlotBackground;
|
|
5021
|
+
/** `$background_images`:直接指定已有的背景控件引用 */
|
|
5022
|
+
backgroundImages?: string;
|
|
5023
|
+
/** 原版 item renderer 变量覆盖 */
|
|
5024
|
+
itemRenderer?: ItemRendererSpec;
|
|
5025
|
+
/** 其余原版可覆盖变量,键名不带 `$` 与 `|default` 后缀 */
|
|
5026
|
+
vars?: Record<string, unknown>;
|
|
5027
|
+
}
|
|
5028
|
+
/** 槽位默认值(`setSlotDefaults` 的入参:除 `slot` / `pos` / `gridPosition` / `offset` 外均可) */
|
|
5029
|
+
type SlotDefaults = Omit<SlotSpec, 'slot' | 'pos' | 'gridPosition' | 'offset'>;
|
|
5030
|
+
/** 标定表 */
|
|
5031
|
+
interface SlotCalibration {
|
|
5032
|
+
anchor: SlotAnchor;
|
|
5033
|
+
originPadding: Offset2;
|
|
5034
|
+
cellSize: Offset2;
|
|
5035
|
+
columns: number;
|
|
5036
|
+
/** 未调用 `setGridOrigin` 时网格的默认原点(给顶部标题留高度) */
|
|
5037
|
+
defaultGridOrigin: Offset2;
|
|
5038
|
+
}
|
|
5039
|
+
/**
|
|
5040
|
+
* ★ 待真机校准项 —— 整套「格位基座」假设集中在此,校准只需改这一个对象。
|
|
5041
|
+
*
|
|
5042
|
+
* 假设:格位基座 = 网格原点 + 该格在网格里的序号 × **网格统一格位尺寸**,且格位锚点在左上角。
|
|
5043
|
+
* 真机实测若证明锚点其实在格位中心(offset 整体差半格),把 `anchor` 改成 `'center'`
|
|
5044
|
+
* 即可同时翻转换算与写进产物的 `anchor_from` / `anchor_to`,不必改调用方。
|
|
5045
|
+
*/
|
|
5046
|
+
declare const SLOT_CALIBRATION: Readonly<SlotCalibration>;
|
|
5047
|
+
/** 换算参数 */
|
|
5048
|
+
interface CellLayoutOptions {
|
|
5049
|
+
/** 网格在面板内的原点(`top_left` 锚,像素) */
|
|
5050
|
+
gridOrigin?: Offset2;
|
|
5051
|
+
/** 槽号所在网格的列数(默认取标定表) */
|
|
5052
|
+
columns?: number;
|
|
5053
|
+
/**
|
|
5054
|
+
* **网格统一格位尺寸**(几何):整张网格的格位尺寸,同一网格内只有这一个值
|
|
5055
|
+
* (来自 `setSlotDefaults({ cellSize })` 或标定表)。
|
|
5056
|
+
*
|
|
5057
|
+
* 逐槽声明的 `cellSize` **不参与**基座换算,它只决定内层控件的视觉尺寸(可溢出格位)。
|
|
5058
|
+
* 传入逐槽尺寸会让偏移与网格尺寸互相矛盾。
|
|
5059
|
+
*/
|
|
5060
|
+
gridCellSize?: CellSizeInput;
|
|
5061
|
+
/** 标定表覆盖(默认 `SLOT_CALIBRATION`) */
|
|
5062
|
+
calibration?: SlotCalibration;
|
|
5063
|
+
}
|
|
5064
|
+
/** 解析标定表:缺省字段回落 `SLOT_CALIBRATION` */
|
|
5065
|
+
declare function resolveCalibration(calibration?: Partial<SlotCalibration>): SlotCalibration;
|
|
5066
|
+
/** 把 `number | [宽, 高]` 归一成 `[宽, 高]`;非法输入回落 `fallback` */
|
|
5067
|
+
declare function normalizeCellSize(size: CellSizeInput | undefined, fallback?: Offset2): Offset2;
|
|
5068
|
+
/**
|
|
5069
|
+
* 槽号 → 网格位置 `[列, 行]`(行优先)。
|
|
5070
|
+
* @param slot 容器槽位号,须为非负整数
|
|
5071
|
+
* @param columns 网格列数,默认取标定表(1 = 单列)
|
|
5072
|
+
*/
|
|
5073
|
+
declare function slotToGridPosition(slot: number, columns?: number): Offset2;
|
|
5074
|
+
/** 一组网格位置 → `grid_dimensions` `[列, 行]`(至少 `[1, 1]`) */
|
|
5075
|
+
declare function gridDimensionsFor(positions: Offset2[]): Offset2;
|
|
5076
|
+
/**
|
|
5077
|
+
* 单个格位的基座坐标(面板像素)。
|
|
5078
|
+
*
|
|
5079
|
+
* 这是「网格原点 + 序号 × 网格统一格位尺寸」假设的**唯一落点**;锚点由标定表的 `anchor` 决定
|
|
5080
|
+
* (`top_left` 时基座即格位左上角,`center` 时再加半个格位)。
|
|
5081
|
+
*
|
|
5082
|
+
* ⚠️ 格位尺寸取 `options.gridCellSize`(整张网格一个值);**不要**传某个槽自己的视觉尺寸 ——
|
|
5083
|
+
* 引擎的网格格位是均匀的,逐槽尺寸只会让偏移与网格尺寸互相矛盾。
|
|
5084
|
+
*/
|
|
5085
|
+
declare function cellBase(slot: number, options?: CellLayoutOptions): Offset2;
|
|
5086
|
+
/**
|
|
5087
|
+
* 像素坐标 → 格位 `offset`(相对格位基座)。
|
|
5088
|
+
* @param pos 目标位置(面板左上角为原点的像素坐标)
|
|
5089
|
+
* @param slot 容器槽位号
|
|
5090
|
+
*/
|
|
5091
|
+
declare function posToOffset(pos: Offset2, slot: number, options?: CellLayoutOptions): Offset2;
|
|
5092
|
+
/** 与标定表同步的锚点属性(写进内层格位控件) */
|
|
5093
|
+
declare function anchorProps(calibration?: Partial<SlotCalibration>): {
|
|
5094
|
+
anchor_from: SlotAnchor;
|
|
5095
|
+
anchor_to: SlotAnchor;
|
|
5096
|
+
};
|
|
5097
|
+
/** 归一化背景描述:字符串 → `{ texture }`;非法输入 → `undefined` */
|
|
5098
|
+
declare function normalizeBackground(background: SlotBackground | undefined): {
|
|
5099
|
+
texture: string;
|
|
5100
|
+
nineslice_size?: NineSlice;
|
|
5101
|
+
} | undefined;
|
|
5102
|
+
/**
|
|
5103
|
+
* 校验一条槽位声明。
|
|
5104
|
+
* @returns 警告文案数组(空数组 = 通过);**任何输入都不会抛错**
|
|
5105
|
+
*/
|
|
5106
|
+
declare function validateSlotSpec(spec: SlotSpec | undefined, context?: {
|
|
5107
|
+
existingSlots?: number[];
|
|
5108
|
+
}): string[];
|
|
5109
|
+
/** 门控键(同时会用作 `ui/<name>.json` 的文件名)允许的字符 */
|
|
5110
|
+
declare const UI_NAME_PATTERN: RegExp;
|
|
5111
|
+
/** 门控键是否可安全用作 UI 文件名 */
|
|
5112
|
+
declare function isSafeUIName(name: unknown): boolean;
|
|
5113
|
+
/**
|
|
5114
|
+
* 校验门控键 / UI 文件名。
|
|
5115
|
+
* @returns 不合规时的说明文案;合规返回 `undefined`
|
|
5116
|
+
*/
|
|
5117
|
+
declare function checkUIName(name: unknown): string | undefined;
|
|
5118
|
+
/** 已解析的槽位:默认值已合并、`grid_position` 与 `offset` 已换算完毕 */
|
|
5119
|
+
interface ResolvedSlot {
|
|
5120
|
+
slot: number;
|
|
5121
|
+
kind: SlotKind;
|
|
5122
|
+
/** 写进产物的 `grid_position` `[列, 行]` */
|
|
5123
|
+
gridPosition: Offset2;
|
|
5124
|
+
/** 面板像素坐标(显式 `gridPosition` 路径下为格位基座) */
|
|
5125
|
+
pos: Offset2;
|
|
5126
|
+
/** 写进产物的 `offset` */
|
|
5127
|
+
offset: Offset2;
|
|
5128
|
+
/** 该槽的**视觉**格位尺寸(网格几何由 `setSlotDefaults` 决定,见 `CellLayoutOptions.gridCellSize`) */
|
|
5129
|
+
cellSize: Offset2;
|
|
5130
|
+
/** 调用方是否显式声明了 `cellSize`(决定是否写出 `$cell_image_size` / `size`) */
|
|
5131
|
+
cellSizeDeclared: boolean;
|
|
5132
|
+
/** 写进 `enabled` 的值;`undefined` = 不写该键 */
|
|
5133
|
+
enabled: boolean | undefined;
|
|
5134
|
+
/** 是否由 `pos` 换算得到 offset(是则同时写锚点,保证换算前提成立) */
|
|
5135
|
+
derived: boolean;
|
|
5136
|
+
background?: {
|
|
5137
|
+
texture: string;
|
|
5138
|
+
nineslice_size?: NineSlice;
|
|
5139
|
+
};
|
|
5140
|
+
backgroundImages?: string;
|
|
5141
|
+
size?: Size2;
|
|
5142
|
+
itemRenderer?: ItemRendererSpec;
|
|
5143
|
+
vars: Record<string, unknown>;
|
|
5144
|
+
}
|
|
5145
|
+
/**
|
|
5146
|
+
* 把一条槽位声明解析成可写进产物的槽位记录(合并默认值 + 换算 `grid_position` / `offset`)。
|
|
5147
|
+
*
|
|
5148
|
+
* `gridPosition` / `offset` 任一显式给出时走旧接口路径:该维度原样使用,不参与换算。
|
|
5149
|
+
*/
|
|
5150
|
+
declare function resolveSlot(spec: SlotSpec, options?: CellLayoutOptions & {
|
|
5151
|
+
defaults?: SlotDefaults;
|
|
5152
|
+
}): ResolvedSlot;
|
|
5153
|
+
|
|
4805
5154
|
type Any = any;
|
|
5155
|
+
/** 旧式格位声明(`addGridItem` / `addInputGrid` / `addOutputGrid` 的 options) */
|
|
5156
|
+
interface LegacyGridItemOptions {
|
|
5157
|
+
/** @deprecated 用 `enabled`;JSON UI 的属性名是 `enabled` 不是 `enable` */
|
|
5158
|
+
enable?: boolean;
|
|
5159
|
+
/** 是否写 `enabled`;给了就覆盖 `kind` 的缺省门控,不给则只有 `output` / `display` 写 `false` */
|
|
5160
|
+
enabled?: boolean;
|
|
5161
|
+
/** 内层控件尺寸 */
|
|
5162
|
+
size?: Any;
|
|
5163
|
+
/** `$background_images` 背景控件引用 */
|
|
5164
|
+
background_images?: Any;
|
|
5165
|
+
}
|
|
5166
|
+
/** `setPanel` 的入参 */
|
|
5167
|
+
interface PanelOptions {
|
|
5168
|
+
/** 根面板尺寸(像素) */
|
|
5169
|
+
size?: Size2;
|
|
5170
|
+
/** 面板背景纹理 */
|
|
5171
|
+
background?: SlotBackground;
|
|
5172
|
+
}
|
|
5173
|
+
/** 进度指示图的裁切方向:露出的是**该侧**的比例那一段(`'left'` = 从左往右填) */
|
|
5174
|
+
type ProgressClipDirection = 'left' | 'right' | 'up' | 'down' | 'center';
|
|
5175
|
+
/** `addProgressSlot` 的入参 */
|
|
5176
|
+
interface ProgressSlotOptions {
|
|
5177
|
+
/** 容器槽位号 */
|
|
5178
|
+
slot: number;
|
|
5179
|
+
/** 面板内像素坐标(左上角原点),与 `addSlot` 同义 */
|
|
5180
|
+
pos: Offset2;
|
|
5181
|
+
/** 按比例裁开的填充图(纹理路径),例如 `textures/ui/arrow_active` */
|
|
5182
|
+
fill: string;
|
|
5183
|
+
/** 垫在下面的静止底图(可选);给了的话即使裁切没生效也还看得见轮廓 */
|
|
5184
|
+
base?: string;
|
|
5185
|
+
/** 视觉尺寸(像素),默认 `[22, 15]`(原版熔炉箭头尺寸) */
|
|
5186
|
+
size?: Offset2;
|
|
5187
|
+
/** 裁切方向,默认 `'left'`;从下往上烧的火焰用 `'down'` */
|
|
5188
|
+
clipDirection?: ProgressClipDirection;
|
|
5189
|
+
/**
|
|
5190
|
+
* 贴图是否**保持纵横比**,默认 `false`(= 按 `size` 拉伸铺满)。
|
|
5191
|
+
*
|
|
5192
|
+
* 默认拉伸,是因为这个槽的契约就是「这块就是 `size` 像素」;原版箭头的贴图恰与尺寸同比例,
|
|
5193
|
+
* 两者无差别。**贴图与 `size` 比例不同时**(例如把一根竖长条压进矮格子)必须显式决定:
|
|
5194
|
+
* `false` = 拉伸变形;`true` = 按比例缩放(会留边,实际宽度不再是 `size`)。
|
|
5195
|
+
*/
|
|
5196
|
+
keepRatio?: boolean;
|
|
5197
|
+
/** 比例来源的集合名,默认 `"container_items"`(小箱子与大箱子都是它) */
|
|
5198
|
+
collection?: string;
|
|
5199
|
+
/** 额外写进槽位的原版变量(可覆盖内置的两条) */
|
|
5200
|
+
vars?: Record<string, unknown>;
|
|
5201
|
+
}
|
|
4806
5202
|
/**
|
|
4807
|
-
* 自定义容器 UI
|
|
4808
|
-
*
|
|
5203
|
+
* 自定义容器 UI 系统:把「容器槽位」声明成面板内的像素版面。
|
|
5204
|
+
*
|
|
5205
|
+
* 坐标系为面板左上角原点的像素坐标(`top_left` 锚);`grid_position` 与格位基座的换算见
|
|
5206
|
+
* `containerLayout.ts`(其中 `SLOT_CALIBRATION` 是唯一的待真机校准点)。
|
|
5207
|
+
* 面板背景与已声明槽位在每次修改后整体重建,故可自由链式调用。
|
|
4809
5208
|
*/
|
|
4810
5209
|
declare class ContainerUISystem {
|
|
4811
5210
|
#private;
|
|
@@ -4813,61 +5212,125 @@ declare class ContainerUISystem {
|
|
|
4813
5212
|
title: string;
|
|
4814
5213
|
root_panel_size: [number, number];
|
|
4815
5214
|
gridDimension: [number, number];
|
|
4816
|
-
|
|
5215
|
+
/** 输出槽记录(`setOutputSlots` 写入);不参与版面,版面由槽位声明的 `kind` 决定 */
|
|
5216
|
+
outputSlots: number[][];
|
|
4817
5217
|
main_panel: Panel;
|
|
4818
5218
|
grids: Grid;
|
|
4819
5219
|
constructor(identifier: string, path: string);
|
|
5220
|
+
/**
|
|
5221
|
+
* 设置面板尺寸与背景图。
|
|
5222
|
+
* @param {PanelOptions} [options] - `size` 为像素尺寸;`background` 为纹理路径或 `{ texture, nineslice_size? }`
|
|
5223
|
+
* @returns {ContainerUISystem} 返回当前实例以支持链式调用
|
|
5224
|
+
*/
|
|
5225
|
+
setPanel(options?: PanelOptions): this;
|
|
5226
|
+
/**
|
|
5227
|
+
* 设置网格在面板内的原点(未调用时取标定表的默认原点,已为顶部标题让开一行)。
|
|
5228
|
+
* @param {Offset2} origin - 像素坐标 [x, y]
|
|
5229
|
+
* @returns {ContainerUISystem} 返回当前实例以支持链式调用
|
|
5230
|
+
*/
|
|
5231
|
+
setGridOrigin(origin: Offset2): this;
|
|
5232
|
+
/**
|
|
5233
|
+
* 合并槽位默认值(对之后声明的每个槽生效)。
|
|
5234
|
+
*
|
|
5235
|
+
* ★ `cellSize` 是**整张网格的统一格位尺寸(几何)**:基座换算与网格尺寸都用它。
|
|
5236
|
+
* 逐槽声明 `addSlot({ cellSize })` 只改该格的视觉尺寸(可溢出格位),不参与几何。
|
|
5237
|
+
* @param {SlotDefaults} defaults - 除 `slot` / `pos` / `gridPosition` / `offset` 外的槽位字段
|
|
5238
|
+
* @returns {ContainerUISystem} 返回当前实例以支持链式调用
|
|
5239
|
+
*/
|
|
5240
|
+
setSlotDefaults(defaults?: SlotDefaults): this;
|
|
5241
|
+
/**
|
|
5242
|
+
* 声明一个容器槽位:`slot` 定槽号、`pos` 定面板内像素位置,框架负责换算 `grid_position` 与 `offset`。
|
|
5243
|
+
*
|
|
5244
|
+
* `kind` 为 `output` / `display` 时写 `enabled: false`;`input`(默认)不写该键。
|
|
5245
|
+
* 显式传 `enabled` 则一律以它为准(`{ kind: 'output', enabled: true }` = 产物格可交互)。
|
|
5246
|
+
* 声明不合规时只 `console.warn`,不抛错。
|
|
5247
|
+
* @param {SlotSpec} spec - 槽位声明
|
|
5248
|
+
* @returns {ContainerUISystem} 返回当前实例以支持链式调用
|
|
5249
|
+
*/
|
|
5250
|
+
addSlot(spec: SlotSpec): this;
|
|
5251
|
+
/**
|
|
5252
|
+
* 向主面板中添加一个控件。
|
|
5253
|
+
* @param {UIElement | Any} element - 控件(UIElement 实例或原生 JSON UI 控件对象)
|
|
5254
|
+
* @param {Offset2} [pos] - 面板内像素坐标 [x, y];给了就按 `top_left` 锚定位
|
|
5255
|
+
* @returns {ContainerUISystem} 返回当前实例以支持链式调用
|
|
5256
|
+
*/
|
|
5257
|
+
addControl(element: UIElement | Any, pos?: Offset2): this;
|
|
5258
|
+
/**
|
|
5259
|
+
* 向主面板中添加一个控件(`addControl` 的别名)。
|
|
5260
|
+
* @param {UIElement | Any} element - 控件
|
|
5261
|
+
* @returns {ContainerUISystem} 返回当前实例以支持链式调用
|
|
5262
|
+
*/
|
|
5263
|
+
addElementToMain(element: UIElement | Any): this;
|
|
5264
|
+
/**
|
|
5265
|
+
* 声明一个「进度指示槽」:`base` 垫底、`fill` 按 `clipDirection` 裁开,比例取**本格物品的耐久**。
|
|
5266
|
+
*
|
|
5267
|
+
* 与 `addSlot` 的区别:除了声明槽位,还会生成一个自定控件、经 `$cell_overlay_ref`
|
|
5268
|
+
* 注入到格子内部(`common.container_item` 的 `item_cell`)。它在格内,
|
|
5269
|
+
* 所以保留每格的 collection 上下文,读的是**本格自己**的绑定 —— 每格可以各显示各的进度。
|
|
5270
|
+
*
|
|
5271
|
+
* 典型用法:脚本往该槽写一个可损耗物品、让「剩余耐久 = 进度」
|
|
5272
|
+
* (见 `examples/mob_chest/scripts/progress_bar.js`),即可用原版箭头/火焰贴图画出进度,
|
|
5273
|
+
* **不需要任何进度条贴图**。
|
|
5274
|
+
*
|
|
5275
|
+
* 同时会关掉引擎自带的耐久条(`$durability_bar_required`)并把格子的浅灰底换成零尺寸面板
|
|
5276
|
+
* (`$background_images`),否则会看到「灰方块 + 图」。`vars` 可覆盖这两条内置变量。
|
|
5277
|
+
* @param {ProgressSlotOptions} options 槽位声明
|
|
5278
|
+
* @returns {ContainerUISystem} 返回当前实例以支持链式调用
|
|
5279
|
+
*/
|
|
5280
|
+
addProgressSlot(options: ProgressSlotOptions): this;
|
|
5281
|
+
/**
|
|
5282
|
+
* 旧式网格项:直接给 `grid_position` 与 `offset`,不做坐标换算。
|
|
5283
|
+
* @param {Offset2} grid_position - 网格位置 [列, 行]
|
|
5284
|
+
* @param {Offset2} offset - 内层控件的偏移 [x, y]
|
|
5285
|
+
* @param {LegacyGridItemOptions} [options] - 可选覆盖
|
|
5286
|
+
* @returns {ContainerUISystem} 返回当前实例以支持链式调用
|
|
5287
|
+
*/
|
|
5288
|
+
addGridItem(grid_position: Offset2, offset: Offset2, options?: LegacyGridItemOptions): this;
|
|
5289
|
+
/**
|
|
5290
|
+
* 旧式输入槽(等价 `addGridItem`)。
|
|
5291
|
+
* @param {Offset2} grid_position - 网格位置 [列, 行]
|
|
5292
|
+
* @param {Offset2} offset - 内层控件的偏移 [x, y]
|
|
5293
|
+
* @param {LegacyGridItemOptions} [options] - 可选覆盖
|
|
5294
|
+
*/
|
|
5295
|
+
addInputGrid(grid_position: Offset2, offset: Offset2, options?: LegacyGridItemOptions): void;
|
|
5296
|
+
/**
|
|
5297
|
+
* 旧式输出槽:在该格位内层控件上写 `enabled: false`。
|
|
5298
|
+
*
|
|
5299
|
+
* ⚠️ 该标志位**整体禁用这一格**(既放不进、也取不出)⇒ 需要能取出产物的输出槽
|
|
5300
|
+
* 请用 `addSlot({ kind: 'output', enabled: true })`。
|
|
5301
|
+
* @param {Offset2} grid_position - 网格位置 [列, 行]
|
|
5302
|
+
* @param {Offset2} offset - 内层控件的偏移 [x, y]
|
|
5303
|
+
* @param {LegacyGridItemOptions} [options] - 可选覆盖(本方法不转发 `enabled` ⇒ 恒为 `false`)
|
|
5304
|
+
*/
|
|
5305
|
+
addOutputGrid(grid_position: Offset2, offset: Offset2, options?: LegacyGridItemOptions): void;
|
|
5306
|
+
/**
|
|
5307
|
+
* 记录输出槽数组(供上层读取);不改变已声明槽位的版面与语义。
|
|
5308
|
+
* @param {number[][]} output_arr - 输出槽记录
|
|
5309
|
+
*/
|
|
5310
|
+
setOutputSlots(output_arr: number[][]): void;
|
|
5311
|
+
/**
|
|
5312
|
+
* @deprecated 名字写反了(它存的是输出槽),改用 `setOutputSlots`
|
|
5313
|
+
* @param {number[][]} output_arr - 输出槽记录
|
|
5314
|
+
*/
|
|
4820
5315
|
setInputGrid(output_arr: number[][]): void;
|
|
4821
5316
|
/**
|
|
4822
|
-
*
|
|
4823
|
-
* @param {number[]}
|
|
4824
|
-
* @
|
|
4825
|
-
* @param {Object} [options] - 可选参数,用于配置网格项。
|
|
4826
|
-
* @param {boolean} [options.enable=true] - 是否启用该网格项,默认为 true。
|
|
4827
|
-
* @param {number[]} [options.size] - 网格项的大小 [宽度, 高度]。
|
|
4828
|
-
* @param {UIElement[]} [options.background_images] - 网格项的背景图片控件。
|
|
4829
|
-
* @returns {ContainerUISystem} 返回当前实例以支持链式调用。
|
|
4830
|
-
*/
|
|
4831
|
-
addGridItem(grid_position: Offset2, offset: Offset2, options?: {
|
|
4832
|
-
enable?: boolean;
|
|
4833
|
-
size?: Any;
|
|
4834
|
-
background_images?: Any;
|
|
4835
|
-
}): this;
|
|
4836
|
-
addInputGrid(grid_position: Offset2, offset: Offset2, options?: {
|
|
4837
|
-
enable?: boolean;
|
|
4838
|
-
size?: Any;
|
|
4839
|
-
background_images?: Any;
|
|
4840
|
-
}): void;
|
|
4841
|
-
addOutputGrid(grid_position: Offset2, offset: Offset2, options?: {
|
|
4842
|
-
enable?: boolean;
|
|
4843
|
-
size?: Any;
|
|
4844
|
-
background_images?: Any;
|
|
4845
|
-
}): void;
|
|
4846
|
-
/**
|
|
4847
|
-
* 向主面板中添加一个 UI 元素。
|
|
4848
|
-
* @param {Any} element - 要添加的 UI 元素。
|
|
4849
|
-
* @returns {ContainerUISystem} 返回当前实例以支持链式调用。
|
|
4850
|
-
*/
|
|
4851
|
-
addElementToMain(element: Any): this;
|
|
4852
|
-
/**
|
|
4853
|
-
* 设置网格的维度(行和列)。
|
|
4854
|
-
* @param {number[]} dimension - 网格的维度 [行数, 列数]。
|
|
4855
|
-
* @returns {ContainerUISystem} 返回当前实例以支持链式调用。
|
|
5317
|
+
* 设置网格的行列数(显式覆盖;不调用则按已声明槽位自动推导)。
|
|
5318
|
+
* @param {number[]} dimension - 网格维度 [列数, 行数]
|
|
5319
|
+
* @returns {ContainerUISystem} 返回当前实例以支持链式调用
|
|
4856
5320
|
*/
|
|
4857
5321
|
setGridDimension(dimension: number[]): this;
|
|
4858
5322
|
/**
|
|
4859
5323
|
* 设置容器的标题。
|
|
4860
|
-
* @param {string} title -
|
|
4861
|
-
* @returns {ContainerUISystem}
|
|
5324
|
+
* @param {string} title - 容器的标题
|
|
5325
|
+
* @returns {ContainerUISystem} 返回当前实例以支持链式调用
|
|
4862
5326
|
*/
|
|
4863
5327
|
setTitle(title: string): this;
|
|
4864
5328
|
/**
|
|
4865
5329
|
* 设置根面板的尺寸。
|
|
4866
|
-
* @param {number[]} size - 根面板的尺寸 [宽度, 高度]
|
|
4867
|
-
* @returns {ContainerUISystem}
|
|
5330
|
+
* @param {number[]} size - 根面板的尺寸 [宽度, 高度](像素)
|
|
5331
|
+
* @returns {ContainerUISystem} 返回当前实例以支持链式调用
|
|
4868
5332
|
*/
|
|
4869
5333
|
setSize(size: number[]): this;
|
|
4870
|
-
setItemMatrix(n: number, matrix: number[][]): void;
|
|
4871
5334
|
}
|
|
4872
5335
|
|
|
4873
5336
|
/**
|
|
@@ -4957,7 +5420,19 @@ declare class FormButtonGrid {
|
|
|
4957
5420
|
});
|
|
4958
5421
|
/** 给每个格子描红调试框 */
|
|
4959
5422
|
enableDebug(): this;
|
|
4960
|
-
/**
|
|
5423
|
+
/**
|
|
5424
|
+
* 加一枚内容。
|
|
5425
|
+
*
|
|
5426
|
+
* ⚠️ index 必须是该按钮在**运行期 form 里的槽位序号**(不是视觉序号):
|
|
5427
|
+
* index 被编码成 grid_position(col = index%c, row = index/c),而 Bedrock 的集合格盘
|
|
5428
|
+
* 正是靠 grid_position(行优先序号)**把格子绑到对应的 form 按钮**;
|
|
5429
|
+
* 按钮最终落在哪一格由第二个参数 pos 决定(offset = -基准格 + pos)。
|
|
5430
|
+
* 例:表单前 3 个槽被 prev/home/next 占用时,第 i 张卡要写 addButton(3 + i, card, [i, 0]);
|
|
5431
|
+
* 若误传视觉序号(0/1/2…),卡片会绑到 no_prev/no_home/no_next 等占位槽,
|
|
5432
|
+
* 门控 `($binding_button_text = #form_button_text)` 不成立 → 卡片整片不显示。
|
|
5433
|
+
*
|
|
5434
|
+
* 仅 FormButton 注入集合/门控绑定。
|
|
5435
|
+
*/
|
|
4961
5436
|
addButton(index: number, btn: FormButton | UIElement, pos?: [number, number]): this;
|
|
4962
5437
|
/** 注入 FormButton 的集合/门控绑定(离开 Grid 则无效) */
|
|
4963
5438
|
private injectBindings;
|
|
@@ -4981,13 +5456,45 @@ declare class SapdonTexturedButton extends UIElement {
|
|
|
4981
5456
|
* SapdonGuideBook —— 帕秋莉式手册(分类索引 INDEX + 词条列表 CAT + 内容页 ENT + home/prev/next 导航)。
|
|
4982
5457
|
*
|
|
4983
5458
|
* 线协议(运行时发射):
|
|
4984
|
-
* body = "INDEX"
|
|
4985
|
-
* body = "
|
|
5459
|
+
* body = "INDEX" → 索引页 p0(左封面 + 右半页 ≤16 张分类卡)
|
|
5460
|
+
* body = "IDX|p<N>" → 索引页 p1+(左右半页各 ≤8 张卡,先填左列再填右列)
|
|
5461
|
+
* body = "CAT:<id>|p<N>" → 分类页(p0 左简介/右 list,p1+ 左右 list)
|
|
4986
5462
|
* body = "ENT:<id>:<gi>|p<N>" → 词条内容页(按 pageType 渲染、可分页)
|
|
4987
5463
|
* title = "sapdon_ui:<name>"
|
|
4988
|
-
* button(...)
|
|
5464
|
+
* button(...) → 集合 form_buttons:分类按钮 idx<i> or 导航,均 exact-match 门控
|
|
5465
|
+
*
|
|
5466
|
+
* 索引页(INDEX)分页规则:
|
|
5467
|
+
* 每页最多 IDX_PER_PAGE(16) 张分类卡;p0 用右半页(4 列 × ≤4 行 = ≤16),
|
|
5468
|
+
* p1+ 左右半页各一列(4 列 × ≤2 行 = ≤8/列),**先填左列再填右列**;
|
|
5469
|
+
* 卡片绑定名 = 分类在 build() 入参里的全局序号(idx0..idxN),跨页唯一。
|
|
5470
|
+
* 分类 ≤16 时只有 p0,body 仍是历史上的 "INDEX"(旧脚本无需改动)。
|
|
5471
|
+
*
|
|
5472
|
+
* ⚠️ p1+ 的 body 用 "IDX|p<N>" 而非 "INDEX|p<N>":门控是「包含」匹配(见 gateLayout),
|
|
5473
|
+
* "INDEX|p1" 会同时命中 p0 的 "INDEX",让封面与 p0 卡格一起亮起来;
|
|
5474
|
+
* "IDX|p1" 不含 "INDEX" 子串,两页互斥。
|
|
4989
5475
|
*/
|
|
4990
5476
|
type GuideBookPageType = 'text' | 'crafting' | 'spotlight' | 'image';
|
|
5477
|
+
/**
|
|
5478
|
+
* 手册里由框架渲染的固定标签(i18n 接入点)。
|
|
5479
|
+
*
|
|
5480
|
+
* ⚠️ 框架**不做任何 lang 键解析**:这里拿到什么字符串就原样交给 `Text.setText`,
|
|
5481
|
+
* JSON UI 自己会解析 `fz.gb.ui.chapter` 这类键。所以传 lang 键的项目**必须**
|
|
5482
|
+
* 在 `RP/texts/*.lang` 里定义该键,否则界面显示裸键名。
|
|
5483
|
+
* ⚠️ 默认值 = 历史上的中文字面量,**故意保持现状**:不传 labels 的项目产物逐字节不变
|
|
5484
|
+
* (回归基线见 AGENTS.md / doc/guidebook.md:guidebook_demo 的 book.json 587870 字节)。
|
|
5485
|
+
*/
|
|
5486
|
+
interface GuideBookLabels {
|
|
5487
|
+
/** CAT 页章节列表的标题 */
|
|
5488
|
+
chapter: string;
|
|
5489
|
+
/** INDEX 页索引卡列的标题 */
|
|
5490
|
+
category: string;
|
|
5491
|
+
}
|
|
5492
|
+
/** 手册固定标签的默认值(= 历史字面量,改它会让所有既有项目产物变化) */
|
|
5493
|
+
declare const DEFAULT_GUIDE_BOOK_LABELS: GuideBookLabels;
|
|
5494
|
+
interface GuideBookOptions {
|
|
5495
|
+
/** 覆盖框架渲染的固定标签(只传要改的键,其余走默认值) */
|
|
5496
|
+
labels?: Partial<GuideBookLabels>;
|
|
5497
|
+
}
|
|
4991
5498
|
interface GuideBookChapter {
|
|
4992
5499
|
name: string;
|
|
4993
5500
|
icon: string;
|
|
@@ -5030,12 +5537,20 @@ declare class SapdonGuideBook {
|
|
|
5030
5537
|
private size;
|
|
5031
5538
|
private background;
|
|
5032
5539
|
private debug;
|
|
5540
|
+
/** 框架渲染的固定标签(i18n;默认值 = 历史中文字面量) */
|
|
5541
|
+
private labels;
|
|
5033
5542
|
private coverTitle;
|
|
5034
5543
|
private coverLines;
|
|
5035
|
-
constructor(identifier: string, size?: [number, number], background?: string);
|
|
5544
|
+
constructor(identifier: string, size?: [number, number], background?: string, options?: GuideBookOptions);
|
|
5036
5545
|
enableDebug(): this;
|
|
5037
5546
|
/** 自定义封面:标题(可含 \n)+ 简介行 */
|
|
5038
5547
|
setCover(title: string, lines: string[]): this;
|
|
5548
|
+
/**
|
|
5549
|
+
* 覆盖框架渲染的固定标签(章节 / 类别)。
|
|
5550
|
+
* 只传要改的键,其余保持**当前值**(增量合并,可反复调用)——
|
|
5551
|
+
* 传 lang 键如 'fz.gb.ui.chapter' 时由 JSON UI 自行解析。
|
|
5552
|
+
*/
|
|
5553
|
+
setLabels(labels: Partial<GuideBookLabels>): this;
|
|
5039
5554
|
/** 布局容器:<tag> 命中 #form_text(含 tag 即显示) */
|
|
5040
5555
|
private gateLayout;
|
|
5041
5556
|
private navButton;
|
|
@@ -5057,6 +5572,22 @@ declare class SapdonGuideBook {
|
|
|
5057
5572
|
private catPages;
|
|
5058
5573
|
/** ENT 词条内容页(L3):按 pageType 分派布局;text 按 5 行/半页分页;门控 ENT:<id>:<gi>|p<N> */
|
|
5059
5574
|
private entPages;
|
|
5575
|
+
/** 一张索引卡:上图标、下名称(绑定名 = 分类全局序号 idx<i>) */
|
|
5576
|
+
private catCard;
|
|
5577
|
+
/**
|
|
5578
|
+
* 往 col 里挂一列索引卡:空 5% / 标题 10% / 分割线 3% / 卡格 rows 行 / 分割线 3% / 余量。
|
|
5579
|
+
* 卡格 = 4 列 × rows 行的 FormButtonGrid,装 cards[start, end)(全局序号,先左后右逐行填)。
|
|
5580
|
+
* ids 由调用方给定,便于 p0 沿用历史元素名(right_index / cat_row / sp_end …)。
|
|
5581
|
+
*
|
|
5582
|
+
* ⚠️ slotBase = 本列第一张卡在运行期 form 里的**槽位序号**(INDEX 页固定 3:prev/home/next 占 0-2)。
|
|
5583
|
+
* FormButtonGrid.addButton 的 index 会被编码成 grid_position,而 Bedrock 的集合格盘是靠
|
|
5584
|
+
* grid_position(行优先序号)**把格子绑到对应的 form 按钮**上;视觉落点由第二个参数 pos 决定。
|
|
5585
|
+
* 所以 index 必须是槽位序号(历史上就是 `3 + i`),写成 0/1/2… 会让卡片绑到 no_prev/no_home/
|
|
5586
|
+
* no_next 等占位槽,门控 `($binding_button_text = #form_button_text)` 全部不成立 → 卡片整片消失。
|
|
5587
|
+
*/
|
|
5588
|
+
private addIndexColumn;
|
|
5589
|
+
/** 索引卡分几页:p0 容量 16,p1+ 每页 16(左 8 + 右 8) */
|
|
5590
|
+
private indexPageCount;
|
|
5060
5591
|
build(categories: GuideBookCategory[]): this;
|
|
5061
5592
|
getSystem(): UISystem;
|
|
5062
5593
|
}
|
|
@@ -5134,9 +5665,24 @@ declare const f64: (literal: FloatLiteral) => {
|
|
|
5134
5665
|
};
|
|
5135
5666
|
declare function isRawJSON(v: any): boolean;
|
|
5136
5667
|
|
|
5668
|
+
/**
|
|
5669
|
+
* Client
|
|
5670
|
+
*/
|
|
5671
|
+
declare class GRegistry {
|
|
5672
|
+
static debug: boolean;
|
|
5673
|
+
/**
|
|
5674
|
+
* 生成注册器
|
|
5675
|
+
* @param {string} name 文件名字
|
|
5676
|
+
* @param {string} root 根目录,如 "behavior"、"resource" 等
|
|
5677
|
+
* @param {string} path 数据的路径,如 "blocks/"、"items/"、"recipes/" 等
|
|
5678
|
+
* @param {object} data 数据操作类实例 通过toObject方法转成正确格式json文本
|
|
5679
|
+
*/
|
|
5680
|
+
static register(name: string, root: string, path: string, data: object): void;
|
|
5681
|
+
static submit(): void;
|
|
5682
|
+
}
|
|
5137
5683
|
declare namespace registry {
|
|
5138
5684
|
function submit(): void;
|
|
5139
5685
|
}
|
|
5140
5686
|
|
|
5141
|
-
export { AddonAnimationController, AddonAnimationStateMachine, AddonAttachable, AddonAttachableDefinition, AddonAttachableDescription, AddonBiome, AddonBiomeDefinition, AddonBiomeDescription, AddonBlock, AddonBlockDefinition, AddonBlockDescription, AddonClientEntity, AddonClientEntityDefinition, AddonClientEntityDescription, AddonEntity, AddonEntityDefinition, AddonEntityDescription, AddonFeatureRule, AddonFeatureRuleDecription, AddonFeatureRuleDenifition, AddonItem, AddonItemDefinition, AddonItemDescription, AddonManifest, AddonManifestDependency, AddonManifestHeader, AddonManifestMetadata, AddonManifestModule, AddonMenuCategory, AddonOreFeature, AddonOreFeatureDefinition, AddonOreFeatureDescription, AddonRecipe, AddonRecipeFurnace, AddonRecipeFurnace_1_12, AddonRecipeFurnace_1_17, AddonRecipeShaped, AddonRecipeShaped_1_12, AddonRecipeShaped_1_17, AddonRecipeShaped_1_19, AddonRecipeShaped_1_20, AddonRecipeShapeless, AddonRecipeShapeless_1_12, AddonRecipeShapeless_1_17, AddonRenderController, AddonRenderControllerGroup, AddonSemanticVersion, Armor, ArmorType, Attachable, BasicBlock, BasicBundle, BasicEntity, BasicMovementBundle, Biome, BiomeAPI, BiomeComponent, BiomeFilter, Block, BlockAPI, BlockComponent, BlockCustomComponentBuilder, Button, ButtonMapping, ChestUISystem, ClientEntity, CollectionPanel, ContainerUISystem, Control, CoordinateDistribution, CropBlock, DataBinding, DataBindingObject, DummyEntity, Entity, EntityAPI, EntityComponent, Factory, FeatureAPI, FeatureConditions, FeatureDistribution, FeatureRule, FenceBlock, FlipbookItem, FlipbookTextureConfig, FlipbookTextures, FollowMobBehavior, FollowParentBehavior, Food, FormButton, FormButtonGrid, GeometryBlock, GlassBlock, GoHomeBehavior, Grid, GridProp, HeadBlock, HudProgressBar, HudStatePanel, HudUISystem, Image, Input, Item, ItemAPI, ItemCatalog, ItemCategory, ItemComponent, ItemTextureManager, Label, Layout, Modifications, MoveTowardsHomeRestrictionBehavior, NativeEntity, NativeEntityData, Navigation, NearestAttackableTargetBehavor, NonNullMap, OreBlock, OreFeature, Panel, PickupItemsBehavior, Projectile, RandomStrollBehavior, RecipeAPI, RecipeInputTags, RecipeTags, RecipeTypes, RotatableBlock, RotationTypes, SapdonGuideBook, SapdonPanel, SapdonServerUI, SapdonTexturedButton, ScrollView, ScrollingPanel, Serializable, Serializer, Sound, Sprite, StackPanel, StairBlock, TemptBehavior, TerrainTextureManager, Text, TextureVariationConfig, TileBlock, TintMethod, TrapdoorBlock, UIElement, UISystem, UISystemRegistry, UiAPI, decode, defaultSerializer, encode, f64, getMetadata, getOrCreateMetadata, isRawJSON, jsonEncodeDecoder, jsonEncoderReplacer, mixin, registerBlock, registerEntity, registry, serialize };
|
|
5142
|
-
export type { ArmorOptions, ArmorSpec, BeforeOnPlayerPlaceEvent, BlockCustomComponentHandlers, BlockDescriptor, BlockPlacerOptions, ConstructorOf, CooldownOptions, CreateModelItemOptions, DiggerOptions, DurabilitySensorOptions, DurabilityThreshold, EncodeDecoder, EntityPlacerOptions, FlipbookEntry, FlipbookItemOptions, FloatLiteral, FoodComponentOptions, FoodOptions, GuideBookCategory, GuideBookChapter, GuideBookPageType, ISerializer, IconTextures, ItemCatalogCategory, ItemCatalogGroupOptions, ItemComponentMap, ItemOptions, ItemRarity, KineticWeaponOptions, ModelBoneTransform, OnBlockStateChangeEvent, OnBreakEvent, OnEntityEvent, OnEntityFallOnEvent, OnPlaceEvent, OnPlayerBreakEvent, OnPlayerInteractEvent, OnRandomTickEvent, OnRedstoneUpdateEvent, OnStepOffEvent, OnStepOnEvent, OnTickEvent, PiercingWeaponOptions, Range, RawType, RecordOptions, RepairItem, SapdonPageRegistration, SerializedElement, ShooterAmmunition, ShooterOptions, StorageItemOptions, SwingSoundsOptions, TextureEntry, TextureVariation, ThrowableOptions, UseModifiersOptions };
|
|
5687
|
+
export { AddonAnimationController, AddonAnimationStateMachine, AddonAttachable, AddonAttachableDefinition, AddonAttachableDescription, AddonBiome, AddonBiomeDefinition, AddonBiomeDescription, AddonBlock, AddonBlockDefinition, AddonBlockDescription, AddonClientEntity, AddonClientEntityDefinition, AddonClientEntityDescription, AddonEntity, AddonEntityDefinition, AddonEntityDescription, AddonFeatureRule, AddonFeatureRuleDecription, AddonFeatureRuleDenifition, AddonItem, AddonItemDefinition, AddonItemDescription, AddonManifest, AddonManifestDependency, AddonManifestHeader, AddonManifestMetadata, AddonManifestModule, AddonMenuCategory, AddonOreFeature, AddonOreFeatureDefinition, AddonOreFeatureDescription, AddonRecipe, AddonRecipeFurnace, AddonRecipeFurnace_1_12, AddonRecipeFurnace_1_17, AddonRecipeShaped, AddonRecipeShaped_1_12, AddonRecipeShaped_1_17, AddonRecipeShaped_1_19, AddonRecipeShaped_1_20, AddonRecipeShapeless, AddonRecipeShapeless_1_12, AddonRecipeShapeless_1_17, AddonRenderController, AddonRenderControllerGroup, AddonSemanticVersion, Armor, ArmorType, Attachable, BasicBlock, BasicBundle, BasicEntity, BasicMovementBundle, Biome, BiomeAPI, BiomeComponent, BiomeFilter, Block, BlockAPI, BlockComponent, BlockCustomComponentBuilder, Button, ButtonMapping, ChestUISystem, ClientEntity, CollectionPanel, ContainerUISystem, Control, CoordinateDistribution, CropBlock, DEFAULT_GUIDE_BOOK_LABELS, DataBinding, DataBindingObject, DummyEntity, Entity, EntityAPI, EntityComponent, Factory, FeatureAPI, FeatureConditions, FeatureDistribution, FeatureRule, FenceBlock, FlipbookItem, FlipbookTextureConfig, FlipbookTextures, FollowMobBehavior, FollowParentBehavior, Food, FormButton, FormButtonGrid, GRegistry, GeometryBlock, GlassBlock, GoHomeBehavior, Grid, GridProp, HeadBlock, HudProgressBar, HudStatePanel, HudUISystem, Image, Input, Item, ItemAPI, ItemCatalog, ItemCategory, ItemComponent, ItemTextureManager, Label, Layout, Modifications, MoveTowardsHomeRestrictionBehavior, NativeEntity, NativeEntityData, Navigation, NearestAttackableTargetBehavor, NonNullMap, OreBlock, OreFeature, Panel, PickupItemsBehavior, Projectile, RandomStrollBehavior, RecipeAPI, RecipeInputTags, RecipeTags, RecipeTypes, RotatableBlock, RotationTypes, SLOT_CALIBRATION, SLOT_KINDS, SapdonGuideBook, SapdonPanel, SapdonServerUI, SapdonTexturedButton, ScrollView, ScrollingPanel, Serializable, Serializer, Sound, Sprite, StackPanel, StairBlock, TemptBehavior, TerrainTextureManager, Text, TextureVariationConfig, TileBlock, TintMethod, TrapdoorBlock, UIElement, UISystem, UISystemRegistry, UI_NAME_PATTERN, UiAPI, anchorProps, cellBase, checkUIName, decode, defaultSerializer, encode, f64, getMetadata, getOrCreateMetadata, gridDimensionsFor, isGatedKind, isRawJSON, isSafeUIName, jsonEncodeDecoder, jsonEncoderReplacer, mixin, normalizeBackground, normalizeCellSize, posToOffset, registerBlock, registerEntity, registry, resolveCalibration, resolveSlot, serialize, slotToGridPosition, validateSlotSpec };
|
|
5688
|
+
export type { ArmorOptions, ArmorSpec, BeforeOnPlayerPlaceEvent, BlockCustomComponentHandlers, BlockDescriptor, BlockPlacerOptions, CellLayoutOptions, CellSizeInput, ConstructorOf, CooldownOptions, CreateModelItemOptions, DiggerOptions, DurabilitySensorOptions, DurabilityThreshold, EncodeDecoder, EntityPlacerOptions, FlipbookEntry, FlipbookItemOptions, FloatLiteral, FoodComponentOptions, FoodOptions, GuideBookCategory, GuideBookChapter, GuideBookLabels, GuideBookOptions, GuideBookPageType, ISerializer, IconTextures, ItemCatalogCategory, ItemCatalogGroupOptions, ItemComponentMap, ItemOptions, ItemRarity, ItemRendererSpec, KineticWeaponOptions, LegacyGridItemOptions, ModelBoneTransform, NineSlice, Offset2, OnBlockStateChangeEvent, OnBreakEvent, OnEntityEvent, OnEntityFallOnEvent, OnPlaceEvent, OnPlayerBreakEvent, OnPlayerInteractEvent, OnRandomTickEvent, OnRedstoneUpdateEvent, OnStepOffEvent, OnStepOnEvent, OnTickEvent, PanelOptions, PiercingWeaponOptions, ProgressClipDirection, ProgressSlotOptions, Range, RawType, RecordOptions, RepairItem, ResolvedSlot, SapdonPageRegistration, SerializedElement, ShooterAmmunition, ShooterOptions, Size2, SlotAnchor, SlotBackground, SlotCalibration, SlotDefaults, SlotKind, SlotSpec, StorageItemOptions, SwingSoundsOptions, TextureEntry, TextureVariation, ThrowableOptions, UseModifiersOptions };
|