sapdon 3.1.0 → 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -1
- package/doc/api.md +2 -2
- package/package.json +18 -19
- package/{dist → prod}/cli/index.d.ts +1 -1
- package/prod/cli/index.js +1 -0
- package/{dist → prod}/cli/start.js +997 -967
- package/{dist → prod}/core/index.d.ts +2155 -1652
- package/prod/core/index.js +59017 -0
- package/prod/utils/index.d.ts +41 -0
- package/prod/utils/index.js +1 -0
- package/dist/cli/build.d.ts +0 -7
- package/dist/cli/build.js +0 -236
- package/dist/cli/dev-server/client.d.ts +0 -2
- package/dist/cli/dev-server/client.js +0 -21
- package/dist/cli/dev-server/config.d.ts +0 -3
- package/dist/cli/dev-server/config.js +0 -3
- package/dist/cli/dev-server/handles.d.ts +0 -4
- package/dist/cli/dev-server/handles.js +0 -5
- package/dist/cli/dev-server/hmr.d.ts +0 -1
- package/dist/cli/dev-server/hmr.js +0 -13
- package/dist/cli/dev-server/index.d.ts +0 -4
- package/dist/cli/dev-server/index.js +0 -17
- package/dist/cli/dev-server/server.d.ts +0 -14
- package/dist/cli/dev-server/server.js +0 -59
- package/dist/cli/dev-server/syncFiles.d.ts +0 -3
- package/dist/cli/dev-server/syncFiles.js +0 -45
- package/dist/cli/index.js +0 -90
- package/dist/cli/init.d.ts +0 -9
- package/dist/cli/init.js +0 -80
- package/dist/cli/load.d.ts +0 -3
- package/dist/cli/load.js +0 -94
- package/dist/cli/start.d.ts +0 -2
- package/dist/cli/tools/textureSet.d.ts +0 -13
- package/dist/cli/tools/textureSet.js +0 -103
- package/dist/cli/utils.d.ts +0 -13
- package/dist/cli/utils.js +0 -89
- package/dist/core/addon/biome.d.ts +0 -22
- package/dist/core/addon/biome.js +0 -27
- package/dist/core/addon/block/block.d.ts +0 -41
- package/dist/core/addon/block/block.js +0 -46
- package/dist/core/addon/controllers/animationController.d.ts +0 -43
- package/dist/core/addon/controllers/animationController.js +0 -73
- package/dist/core/addon/controllers/render_controllers.js +0 -162
- package/dist/core/addon/entity/clientEntity.d.ts +0 -107
- package/dist/core/addon/entity/clientEntity.js +0 -149
- package/dist/core/addon/entity/entity.d.ts +0 -42
- package/dist/core/addon/entity/entity.js +0 -50
- package/dist/core/addon/feature/oreFeature.d.ts +0 -19
- package/dist/core/addon/feature/oreFeature.js +0 -24
- package/dist/core/addon/featureRule.d.ts +0 -20
- package/dist/core/addon/featureRule.js +0 -25
- package/dist/core/addon/item/attachable.d.ts +0 -94
- package/dist/core/addon/item/attachable.js +0 -134
- package/dist/core/addon/item/item.d.ts +0 -19
- package/dist/core/addon/item/item.js +0 -26
- package/dist/core/addon/manifest.d.ts +0 -49
- package/dist/core/addon/manifest.js +0 -65
- package/dist/core/addon/menuCategory.d.ts +0 -6
- package/dist/core/addon/menuCategory.js +0 -7
- package/dist/core/addon/recipe/baseRecipe.d.ts +0 -12
- package/dist/core/addon/recipe/baseRecipe.js +0 -23
- package/dist/core/addon/recipe/data.d.ts +0 -66
- package/dist/core/addon/recipe/data.js +0 -74
- package/dist/core/addon/recipe/furnace.d.ts +0 -17
- package/dist/core/addon/recipe/furnace.js +0 -43
- package/dist/core/addon/recipe/shaped.d.ts +0 -26
- package/dist/core/addon/recipe/shaped.js +0 -53
- package/dist/core/addon/recipe/shapeless.d.ts +0 -18
- package/dist/core/addon/recipe/shapeless.js +0 -36
- package/dist/core/biome/biome.d.ts +0 -14
- package/dist/core/biome/biome.js +0 -23
- package/dist/core/biome/biomeComponent.d.ts +0 -46
- package/dist/core/biome/biomeComponent.js +0 -77
- package/dist/core/block/basicBlock.d.ts +0 -48
- package/dist/core/block/basicBlock.js +0 -105
- package/dist/core/block/block.d.ts +0 -32
- package/dist/core/block/block.js +0 -92
- package/dist/core/block/blockComponent.d.ts +0 -187
- package/dist/core/block/blockComponent.js +0 -500
- package/dist/core/block/cropBlock.d.ts +0 -4
- package/dist/core/block/cropBlock.js +0 -27
- package/dist/core/block/geometryBlock.d.ts +0 -12
- package/dist/core/block/geometryBlock.js +0 -16
- package/dist/core/block/oreBlock.d.ts +0 -9
- package/dist/core/block/oreBlock.js +0 -25
- package/dist/core/block/rotatableBlock.d.ts +0 -27
- package/dist/core/block/rotatableBlock.js +0 -107
- package/dist/core/block/tileBlock.d.ts +0 -17
- package/dist/core/block/tileBlock.js +0 -125
- package/dist/core/entity/basicEntity.d.ts +0 -111
- package/dist/core/entity/basicEntity.js +0 -170
- package/dist/core/entity/behavior/followMob.d.ts +0 -12
- package/dist/core/entity/behavior/followMob.js +0 -35
- package/dist/core/entity/behavior/followParent.d.ts +0 -7
- package/dist/core/entity/behavior/followParent.js +0 -15
- package/dist/core/entity/behavior/randomStroll.d.ts +0 -31
- package/dist/core/entity/behavior/randomStroll.js +0 -63
- package/dist/core/entity/behavior/tempt.d.ts +0 -73
- package/dist/core/entity/behavior/tempt.js +0 -134
- package/dist/core/entity/bundles/BasicMoveBundle.js +0 -8
- package/dist/core/entity/bundles/basicBundle.d.ts +0 -13
- package/dist/core/entity/bundles/basicBundle.js +0 -38
- package/dist/core/entity/clientEntity.d.ts +0 -20
- package/dist/core/entity/clientEntity.js +0 -37
- package/dist/core/entity/componets/entityComponet.d.ts +0 -202
- package/dist/core/entity/componets/entityComponet.js +0 -354
- package/dist/core/entity/data/nativeEntityData.d.ts +0 -9
- package/dist/core/entity/data/nativeEntityData.js +0 -38
- package/dist/core/entity/dummyEntity.js +0 -14
- package/dist/core/entity/entity.d.ts +0 -15
- package/dist/core/entity/entity.js +0 -11
- package/dist/core/entity/nativeEntity.d.ts +0 -8
- package/dist/core/entity/nativeEntity.js +0 -28
- package/dist/core/entity/navigation/walk.d.ts +0 -23
- package/dist/core/entity/navigation/walk.js +0 -56
- package/dist/core/entity/projectile.d.ts +0 -3
- package/dist/core/entity/projectile.js +0 -7
- package/dist/core/factory/biomeFactory.d.ts +0 -4
- package/dist/core/factory/biomeFactory.js +0 -13
- package/dist/core/factory/blockFactory.d.ts +0 -34
- package/dist/core/factory/blockFactory.js +0 -143
- package/dist/core/factory/entityFactory.d.ts +0 -17
- package/dist/core/factory/entityFactory.js +0 -75
- package/dist/core/factory/featureFactory.d.ts +0 -6
- package/dist/core/factory/featureFactory.js +0 -23
- package/dist/core/factory/itemExtra.d.ts +0 -8
- package/dist/core/factory/itemExtra.js +0 -9
- package/dist/core/factory/itemFactory.d.ts +0 -27
- package/dist/core/factory/itemFactory.js +0 -112
- package/dist/core/factory/recipeFactory.d.ts +0 -18
- package/dist/core/factory/recipeFactory.js +0 -39
- package/dist/core/factory/uiFactory.d.ts +0 -12
- package/dist/core/factory/uiFactory.js +0 -32
- package/dist/core/feature/oreFeature.d.ts +0 -10
- package/dist/core/feature/oreFeature.js +0 -11
- package/dist/core/feature-rule/condition/biomeFilter.d.ts +0 -26
- package/dist/core/feature-rule/condition/biomeFilter.js +0 -36
- package/dist/core/feature-rule/condition/featureConditions.d.ts +0 -27
- package/dist/core/feature-rule/condition/featureConditions.js +0 -37
- package/dist/core/feature-rule/distribution/coordinateDistribution.d.ts +0 -17
- package/dist/core/feature-rule/distribution/coordinateDistribution.js +0 -23
- package/dist/core/feature-rule/distribution/featureDistribution.d.ts +0 -31
- package/dist/core/feature-rule/distribution/featureDistribution.js +0 -41
- package/dist/core/feature-rule/featureRule.d.ts +0 -17
- package/dist/core/feature-rule/featureRule.js +0 -26
- package/dist/core/index.js +0 -1
- package/dist/core/item/armor.d.ts +0 -21
- package/dist/core/item/armor.js +0 -90
- package/dist/core/item/attachable.d.ts +0 -6
- package/dist/core/item/attachable.js +0 -26
- package/dist/core/item/food.d.ts +0 -24
- package/dist/core/item/food.js +0 -38
- package/dist/core/item/item.d.ts +0 -36
- package/dist/core/item/item.js +0 -69
- package/dist/core/item/itemComponents.d.ts +0 -113
- package/dist/core/item/itemComponents.js +0 -225
- package/dist/core/registry.d.ts +0 -12
- package/dist/core/registry.js +0 -17
- package/dist/core/texture.d.ts +0 -18
- package/dist/core/texture.js +0 -38
- package/dist/core/ui/buttonMapping.d.ts +0 -97
- package/dist/core/ui/buttonMapping.js +0 -132
- package/dist/core/ui/dataBindingObject.d.ts +0 -97
- package/dist/core/ui/dataBindingObject.js +0 -134
- package/dist/core/ui/elements/button.d.ts +0 -21
- package/dist/core/ui/elements/button.js +0 -101
- package/dist/core/ui/elements/collectionPanel.d.ts +0 -12
- package/dist/core/ui/elements/collectionPanel.js +0 -53
- package/dist/core/ui/elements/grid.d.ts +0 -8
- package/dist/core/ui/elements/grid.js +0 -33
- package/dist/core/ui/elements/image.d.ts +0 -13
- package/dist/core/ui/elements/image.js +0 -55
- package/dist/core/ui/elements/label.d.ts +0 -14
- package/dist/core/ui/elements/label.js +0 -61
- package/dist/core/ui/elements/panel.d.ts +0 -11
- package/dist/core/ui/elements/panel.js +0 -49
- package/dist/core/ui/elements/scrollingPanel.d.ts +0 -14
- package/dist/core/ui/elements/scrollingPanel.js +0 -59
- package/dist/core/ui/elements/stackPanel.d.ts +0 -14
- package/dist/core/ui/elements/stackPanel.js +0 -37
- package/dist/core/ui/elements/uiElement.d.ts +0 -53
- package/dist/core/ui/elements/uiElement.js +0 -129
- package/dist/core/ui/properties/control.d.ts +0 -214
- package/dist/core/ui/properties/control.js +0 -286
- package/dist/core/ui/properties/dataBinding.d.ts +0 -6
- package/dist/core/ui/properties/dataBinding.js +0 -16
- package/dist/core/ui/properties/factory.d.ts +0 -37
- package/dist/core/ui/properties/factory.js +0 -62
- package/dist/core/ui/properties/gridProp.d.ts +0 -65
- package/dist/core/ui/properties/gridProp.js +0 -90
- package/dist/core/ui/properties/input.d.ts +0 -97
- package/dist/core/ui/properties/input.js +0 -134
- package/dist/core/ui/properties/layout.d.ts +0 -105
- package/dist/core/ui/properties/layout.js +0 -145
- package/dist/core/ui/properties/scrollView.d.ts +0 -105
- package/dist/core/ui/properties/scrollView.js +0 -145
- package/dist/core/ui/properties/sound.d.ts +0 -47
- package/dist/core/ui/properties/sound.js +0 -66
- package/dist/core/ui/properties/sprite.d.ts +0 -161
- package/dist/core/ui/properties/sprite.js +0 -222
- package/dist/core/ui/properties/text.d.ts +0 -135
- package/dist/core/ui/properties/text.js +0 -187
- package/dist/core/ui/registry/uiSystemRegistry.d.ts +0 -8
- package/dist/core/ui/registry/uiSystemRegistry.js +0 -26
- package/dist/core/ui/systems/chest.d.ts +0 -5
- package/dist/core/ui/systems/chest.js +0 -21
- package/dist/core/ui/systems/containerUISystem.d.ts +0 -67
- package/dist/core/ui/systems/containerUISystem.js +0 -214
- package/dist/core/ui/systems/guidebook.d.ts +0 -9
- package/dist/core/ui/systems/guidebook.js +0 -206
- package/dist/core/ui/systems/serverForm.d.ts +0 -13
- package/dist/core/ui/systems/serverForm.js +0 -116
- package/dist/core/ui/systems/system.d.ts +0 -16
- package/dist/core/ui/systems/system.js +0 -37
- package/dist/oc/actor.js +0 -44
- package/dist/oc/core.js +0 -201
- package/dist/oc/input.js +0 -67
- package/dist/oc/optional.js +0 -31
- /package/{dist → prod}/oc/index.d.ts +0 -0
- /package/{dist → prod}/oc/index.js +0 -0
|
@@ -10,18 +10,43 @@ declare enum ItemCategory {
|
|
|
10
10
|
declare function getMetadata(target: any): any;
|
|
11
11
|
declare function getOrCreateMetadata(target: any): any;
|
|
12
12
|
|
|
13
|
-
interface ISerializer
|
|
14
|
-
(instance: any):
|
|
13
|
+
interface ISerializer {
|
|
14
|
+
(instance: any): object;
|
|
15
15
|
}
|
|
16
|
-
declare
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
16
|
+
declare function jsonEncoderReplacer(_: string, v: any): any;
|
|
17
|
+
declare const defaultSerializer: ISerializer;
|
|
18
|
+
declare function Serializable(serializer?: ISerializer): (_: any, ctx: DecoratorContext) => void;
|
|
19
|
+
/**
|
|
20
|
+
* 只能应用一个 Serializer
|
|
21
|
+
*
|
|
22
|
+
* 重复的 Serializer 会被覆盖
|
|
23
|
+
* @param target
|
|
24
|
+
* @param ctx
|
|
25
|
+
*/
|
|
26
|
+
declare const Serializer: MethodDecorator;
|
|
21
27
|
declare function serialize<R, T extends object>(inst: T): R;
|
|
28
|
+
declare const jsonEncodeDecoder: EncodeDecoder<any, string>;
|
|
29
|
+
declare function encode<Base, Trans>(value: Base, encodeDecoder?: EncodeDecoder<Base, Trans>): Trans;
|
|
30
|
+
declare function decode<Trans, Base>(value: Trans, encodeDecoder?: EncodeDecoder<Base, Trans>): Base;
|
|
31
|
+
interface EncodeDecoder<Base, Trans> {
|
|
32
|
+
encode: (data: Base) => Trans;
|
|
33
|
+
decode: (chunk: Trans) => Base;
|
|
34
|
+
}
|
|
22
35
|
|
|
23
36
|
type ConstructorOf<T, Arg extends unknown[] = []> = new (...args: Arg) => T;
|
|
24
37
|
|
|
38
|
+
type FloatLiteral = `${number}.${number}`;
|
|
39
|
+
interface RawType<T> extends RawJSON {
|
|
40
|
+
valueOf(): T;
|
|
41
|
+
}
|
|
42
|
+
declare const IS_RAW_SYMBOL: unique symbol;
|
|
43
|
+
declare const f64: (literal: FloatLiteral) => {
|
|
44
|
+
[IS_RAW_SYMBOL]: boolean;
|
|
45
|
+
rawJSON: string;
|
|
46
|
+
valueOf(): number;
|
|
47
|
+
};
|
|
48
|
+
declare function isRawJSON(v: any): boolean;
|
|
49
|
+
|
|
25
50
|
declare class ArrayEx extends Array {
|
|
26
51
|
constructor(init?: number[]);
|
|
27
52
|
set(arr: Iterable<number>): void;
|
|
@@ -170,1949 +195,2531 @@ declare class Matrix extends ArrayEx {
|
|
|
170
195
|
}
|
|
171
196
|
|
|
172
197
|
/**
|
|
173
|
-
*
|
|
198
|
+
* Control Class
|
|
199
|
+
*
|
|
200
|
+
* This class represents a UI control element with various properties and methods to manipulate its state.
|
|
201
|
+
*
|
|
202
|
+
* Properties:
|
|
203
|
+
* - visible: boolean - If the UI element should be visible (default: true)
|
|
204
|
+
* - enabled: boolean - If true and if the UI element or any of its children have the locked state then they will be in the locked (default: true)
|
|
205
|
+
* - layer: int - Z-Index/Layer (like zindex in CSS) relative to parent element. Higher layers will render above (default: 0)
|
|
206
|
+
* - alpha: float - Alpha/transparency of the element. It will only affect the UI element. Its children will be unaffected. (default: 1.0)
|
|
207
|
+
* - propagate_alpha: boolean - If alpha should not only apply to the parent if possible but also all its children (default: false)
|
|
208
|
+
* - clips_children: boolean - Cuts off visually and interactively everything beyond the boundaries of the UI element (default: false)
|
|
209
|
+
* - allow_clipping: boolean - If clips_children works in the UI element. Otherwise, it won't have any effect (default: true)
|
|
210
|
+
* - clip_offset: Vector [x, y] - Offset from the start of the clipping (default: [0, 0])
|
|
211
|
+
* - clip_state_change_event: string - Event triggered when the clip state changes
|
|
212
|
+
* - enable_scissor_test: boolean - Enables scissor test for clipping (default: false)
|
|
213
|
+
* - property_bag: object - Property bag contains properties/variables that are more related with the data than the actual structure and look of the UI element
|
|
214
|
+
* - selected: boolean - If the text box is selected by default
|
|
215
|
+
* - use_child_anchors: boolean - Use the anchor_from and anchor_to of the child of the UI element (default: false)
|
|
216
|
+
* - controls: array - For adding children to the element
|
|
217
|
+
* - anims: string[] - Array of the animation names
|
|
218
|
+
* - disable_anim_fast_forward: boolean - Disables fast-forwarding animations
|
|
219
|
+
* - animation_reset_name: string - Name of the animation to reset to
|
|
220
|
+
* - ignored: boolean - If the UI element should be ignored (default: false)
|
|
221
|
+
* - variables: array or object - A bunch of conditions that change the variables values
|
|
222
|
+
* - modifications: array - Allows to modify the UI files of resource packs below (vanilla being the most bottom one)
|
|
223
|
+
* - grid_position: Vector [row, column] - Position that the control will take inside the grid. This also allows to modify specific grid items of a hardcoded grid
|
|
224
|
+
* - collection_index: int - Index that the control takes in the collection
|
|
225
|
+
*/
|
|
226
|
+
/**
|
|
227
|
+
* Control 类
|
|
228
|
+
*
|
|
229
|
+
* 该类表示一个具有各种属性和方法的 UI 控件元素,用于操作其状态。
|
|
230
|
+
*
|
|
231
|
+
* 属性:
|
|
232
|
+
* - visible: boolean - 控制 UI 元素是否可见(默认值:true)
|
|
233
|
+
* - enabled: boolean - 如果为 true,且 UI 元素或其任何子元素处于锁定状态,则它们将被锁定(默认值:true)
|
|
234
|
+
* - layer: int - 相对于父元素的 Z-Index/层级(类似于 CSS 中的 zindex)。较高的层级将渲染在上方(默认值:0)
|
|
235
|
+
* - alpha: float - 元素的透明度。仅影响 UI 元素本身,其子元素不受影响。如果希望透明度同时应用于父元素和子元素,请使用 propagate_alpha(默认值:1.0)
|
|
236
|
+
* - propagate_alpha: boolean - 透明度是否应同时应用于父元素及其所有子元素(默认值:false)
|
|
237
|
+
* - clips_children: boolean - 是否在视觉上和交互上裁剪超出 UI 元素边界的内容(默认值:false)
|
|
238
|
+
* - allow_clipping: boolean - 是否允许在 UI 元素中启用裁剪。否则,clips_children 将无效(默认值:true)
|
|
239
|
+
* - clip_offset: Vector [x, y] - 裁剪起始点的偏移量(默认值:[0, 0])
|
|
240
|
+
* - clip_state_change_event: string - 裁剪状态更改时触发的事件
|
|
241
|
+
* - enable_scissor_test: boolean - 是否启用裁剪测试(默认值:false)
|
|
242
|
+
* - property_bag: object - 属性包,包含与数据相关的属性/变量,而不是 UI 元素的实际结构和外观
|
|
243
|
+
* - selected: boolean - 文本框是否默认被选中
|
|
244
|
+
* - use_child_anchors: boolean - 是否使用 UI 元素子元素的 anchor_from 和 anchor_to(默认值:false)
|
|
245
|
+
* - controls: array - 用于向元素添加子元素
|
|
246
|
+
* - anims: string[] - 动画名称数组
|
|
247
|
+
* - disable_anim_fast_forward: boolean - 是否禁用动画快进
|
|
248
|
+
* - animation_reset_name: string - 重置动画的名称
|
|
249
|
+
* - ignored: boolean - 是否忽略该 UI 元素(默认值:false)
|
|
250
|
+
* - variables: array 或 object - 一组条件,用于更改变量的值
|
|
251
|
+
* - modifications: array - 允许修改资源包中的 UI 文件(最底层为原版资源包)
|
|
252
|
+
* - grid_position: Vector [row, column] - 控件在网格中的位置。此属性还允许修改硬编码网格中的特定网格项
|
|
253
|
+
* - collection_index: int - 控件在集合中的索引
|
|
174
254
|
*/
|
|
175
|
-
declare class
|
|
255
|
+
declare class Control {
|
|
176
256
|
/**
|
|
177
|
-
*
|
|
178
|
-
* @param {
|
|
179
|
-
* @
|
|
180
|
-
* @param {string} path 数据的路径,如 "blocks/"、"items/"、"recipes/" 等
|
|
181
|
-
* @param {string} data 实例 必须包含 toJson 方法
|
|
257
|
+
* 设置控件的可见性。
|
|
258
|
+
* @param {boolean} visible - 控件是否可见(默认值:true)
|
|
259
|
+
* @returns {Control} 返回当前实例以支持链式调用
|
|
182
260
|
*/
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
}
|
|
186
|
-
declare namespace registry {
|
|
187
|
-
function sumbit(): void;
|
|
188
|
-
function log(...info: any[]): void;
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
declare class Item {
|
|
261
|
+
setVisible(visible?: boolean): Control;
|
|
262
|
+
visible: boolean | undefined;
|
|
192
263
|
/**
|
|
193
|
-
*
|
|
194
|
-
* @param {
|
|
195
|
-
* @
|
|
196
|
-
* @param {string} texture 物品纹理
|
|
197
|
-
* @param {Object} options 可选参数
|
|
198
|
-
* @param {string} options.group 分组
|
|
199
|
-
* @param {boolean} options.hide_in_command 是否在命令中隐藏,默认为 false
|
|
264
|
+
* 设置控件的启用状态。
|
|
265
|
+
* @param {boolean} enabled - 控件是否启用(默认值:true)
|
|
266
|
+
* @returns {Control} 返回当前实例以支持链式调用
|
|
200
267
|
*/
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
hide_in_command: boolean;
|
|
204
|
-
});
|
|
205
|
-
identifier: string;
|
|
206
|
-
category: string;
|
|
207
|
-
texture: string;
|
|
208
|
-
group: string;
|
|
209
|
-
hide_in_command: boolean;
|
|
210
|
-
components: Map<any, any>;
|
|
268
|
+
setEnabled(enabled?: boolean): Control;
|
|
269
|
+
enabled: boolean | undefined;
|
|
211
270
|
/**
|
|
212
|
-
*
|
|
213
|
-
* @param {
|
|
271
|
+
* 设置控件的层级(z-index)。
|
|
272
|
+
* @param {number} layer - 要设置的层级(默认值:0)
|
|
273
|
+
* @returns {Control} 返回当前实例以支持链式调用
|
|
214
274
|
*/
|
|
215
|
-
|
|
275
|
+
setLayer(layer?: number): Control;
|
|
276
|
+
layer: number | undefined;
|
|
216
277
|
/**
|
|
217
|
-
*
|
|
218
|
-
* @param {
|
|
278
|
+
* 设置控件的透明度。
|
|
279
|
+
* @param {number} alpha - 要设置的透明度值(默认值:1.0)
|
|
280
|
+
* @returns {Control} 返回当前实例以支持链式调用
|
|
219
281
|
*/
|
|
220
|
-
|
|
282
|
+
setAlpha(alpha?: number): Control;
|
|
283
|
+
alpha: number | undefined;
|
|
221
284
|
/**
|
|
222
|
-
*
|
|
223
|
-
* @
|
|
285
|
+
* 设置透明度是否应传播到子元素。
|
|
286
|
+
* @param {boolean} propagate - 透明度是否应传播(默认值:false)
|
|
287
|
+
* @returns {Control} 返回当前实例以支持链式调用
|
|
224
288
|
*/
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
declare class Food extends Item {
|
|
289
|
+
setPropagateAlpha(propagate?: boolean): Control;
|
|
290
|
+
propagate_alpha: boolean | undefined;
|
|
229
291
|
/**
|
|
230
|
-
*
|
|
231
|
-
* @param {
|
|
232
|
-
* @
|
|
233
|
-
* @param {string} texture 物品纹理
|
|
234
|
-
* @param {Object} options 可选参数
|
|
235
|
-
* @param {string} options.group 分组
|
|
236
|
-
* @param {boolean} options.hide_in_command 是否在命令中隐藏,默认为 false
|
|
237
|
-
* @param {string} options.animation 使用动画,默认为 "eat"
|
|
238
|
-
* @param {boolean} options.canAlwaysEat 是否总是可以食用,默认为 false
|
|
239
|
-
* @param {number} options.nutrition 营养价值,默认为 0
|
|
240
|
-
* @param {number} options.saturationModifier 饱和度修正值,默认为 1
|
|
292
|
+
* 设置控件是否应裁剪其子元素。
|
|
293
|
+
* @param {boolean} clips - 控件是否应裁剪其子元素(默认值:false)
|
|
294
|
+
* @returns {Control} 返回当前实例以支持链式调用
|
|
241
295
|
*/
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
hide_in_command: boolean;
|
|
245
|
-
animation: string;
|
|
246
|
-
canAlwaysEat: boolean;
|
|
247
|
-
nutrition: number;
|
|
248
|
-
saturationModifier: number;
|
|
249
|
-
});
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
declare class AddonAttachableDescription {
|
|
296
|
+
setClipsChildren(clips?: boolean): Control;
|
|
297
|
+
clips_children: boolean | undefined;
|
|
253
298
|
/**
|
|
254
|
-
*
|
|
255
|
-
* @param {
|
|
299
|
+
* 设置控件是否允许裁剪。
|
|
300
|
+
* @param {boolean} allow - 是否允许裁剪(默认值:true)
|
|
301
|
+
* @returns {Control} 返回当前实例以支持链式调用
|
|
256
302
|
*/
|
|
257
|
-
|
|
258
|
-
|
|
303
|
+
setAllowClipping(allow?: boolean): Control;
|
|
304
|
+
allow_clipping: boolean | undefined;
|
|
259
305
|
/**
|
|
260
|
-
*
|
|
261
|
-
* @param {
|
|
262
|
-
* @
|
|
263
|
-
* @returns {AddonAttachableDescription} 返回当前实例以支持链式调用
|
|
306
|
+
* 设置控件的裁剪偏移量。
|
|
307
|
+
* @param {number[]} offset - 裁剪偏移量,格式为 [x, y](默认值:[0, 0])
|
|
308
|
+
* @returns {Control} 返回当前实例以支持链式调用
|
|
264
309
|
*/
|
|
265
|
-
|
|
266
|
-
|
|
310
|
+
setClipOffset(offset?: number[]): Control;
|
|
311
|
+
clip_offset: number[] | undefined;
|
|
267
312
|
/**
|
|
268
|
-
*
|
|
269
|
-
* @param {string}
|
|
270
|
-
* @
|
|
271
|
-
* @returns {AddonAttachableDescription} 返回当前实例以支持链式调用
|
|
313
|
+
* 设置裁剪状态更改事件。
|
|
314
|
+
* @param {string} event - 裁剪状态更改时触发的事件名称
|
|
315
|
+
* @returns {Control} 返回当前实例以支持链式调用
|
|
272
316
|
*/
|
|
273
|
-
|
|
274
|
-
|
|
317
|
+
setClipStateChangeEvent(event: string): Control;
|
|
318
|
+
clip_state_change_event: string | undefined;
|
|
275
319
|
/**
|
|
276
|
-
*
|
|
277
|
-
* @param {
|
|
278
|
-
* @
|
|
279
|
-
* @returns {AddonAttachableDescription} 返回当前实例以支持链式调用
|
|
320
|
+
* 设置是否启用裁剪测试。
|
|
321
|
+
* @param {boolean} enable - 是否启用裁剪测试(默认值:false)
|
|
322
|
+
* @returns {Control} 返回当前实例以支持链式调用
|
|
280
323
|
*/
|
|
281
|
-
|
|
282
|
-
|
|
324
|
+
setEnableScissorTest(enable?: boolean): Control;
|
|
325
|
+
enable_scissor_test: boolean | undefined;
|
|
283
326
|
/**
|
|
284
|
-
*
|
|
285
|
-
* @param {
|
|
286
|
-
* @
|
|
287
|
-
* @returns {AddonAttachableDescription} 返回当前实例以支持链式调用
|
|
327
|
+
* 设置控件的属性包。
|
|
328
|
+
* @param {object} bag - 要设置的属性包
|
|
329
|
+
* @returns {Control} 返回当前实例以支持链式调用
|
|
288
330
|
*/
|
|
289
|
-
|
|
290
|
-
|
|
331
|
+
setPropertyBag(bag: object): Control;
|
|
332
|
+
property_bag: object | undefined;
|
|
291
333
|
/**
|
|
292
|
-
*
|
|
293
|
-
* @param {
|
|
294
|
-
* @
|
|
295
|
-
* @returns {AddonAttachableDescription} 返回当前实例以支持链式调用
|
|
334
|
+
* 设置控件是否被选中。
|
|
335
|
+
* @param {boolean} selected - 控件是否被选中(默认值:false)
|
|
336
|
+
* @returns {Control} 返回当前实例以支持链式调用
|
|
296
337
|
*/
|
|
297
|
-
|
|
298
|
-
|
|
338
|
+
setSelected(selected?: boolean): Control;
|
|
339
|
+
selected: boolean | undefined;
|
|
299
340
|
/**
|
|
300
|
-
*
|
|
301
|
-
* @param {
|
|
302
|
-
* @returns {
|
|
341
|
+
* 设置控件是否使用子元素的锚点。
|
|
342
|
+
* @param {boolean} use - 是否使用子元素的锚点(默认值:false)
|
|
343
|
+
* @returns {Control} 返回当前实例以支持链式调用
|
|
303
344
|
*/
|
|
304
|
-
|
|
305
|
-
|
|
345
|
+
setUseChildAnchors(use?: boolean): Control;
|
|
346
|
+
use_child_anchors: boolean | undefined;
|
|
306
347
|
/**
|
|
307
|
-
*
|
|
308
|
-
* @param {
|
|
309
|
-
* @
|
|
310
|
-
* @returns {AddonAttachableDescription} 返回当前实例以支持链式调用
|
|
348
|
+
* 向控件添加子控件。
|
|
349
|
+
* @param {Control} control - 要添加的子控件
|
|
350
|
+
* @returns {Control} 返回当前实例以支持链式调用
|
|
311
351
|
*/
|
|
312
|
-
|
|
313
|
-
|
|
352
|
+
addControl(control: Control): Control;
|
|
353
|
+
controls: any[] | undefined;
|
|
314
354
|
/**
|
|
315
|
-
*
|
|
316
|
-
* @param {string}
|
|
317
|
-
* @
|
|
318
|
-
* @returns {AddonAttachableDescription} 返回当前实例以支持链式调用
|
|
355
|
+
* 设置控件的动画。
|
|
356
|
+
* @param {string[]} anims - 动画名称数组
|
|
357
|
+
* @returns {Control} 返回当前实例以支持链式调用
|
|
319
358
|
*/
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
}
|
|
323
|
-
|
|
324
|
-
declare class Attachable extends AddonAttachableDescription {
|
|
325
|
-
constructor(identifier: any);
|
|
326
|
-
getId(): string;
|
|
327
|
-
toJson(): Object;
|
|
328
|
-
}
|
|
329
|
-
|
|
330
|
-
declare class Armor {
|
|
331
|
-
constructor(identifier: any, category: any, item_texture: any, texture_path: any, options?: {});
|
|
332
|
-
identifier: any;
|
|
333
|
-
item: Item;
|
|
334
|
-
attachable: Attachable;
|
|
335
|
-
setArrachableGeometry(key: any, geometry: any): this;
|
|
336
|
-
}
|
|
337
|
-
declare class Chestplate extends Armor {
|
|
338
|
-
constructor(identifier: any, item_texture: any, texture_path: any, options?: {});
|
|
339
|
-
}
|
|
340
|
-
declare class Boot extends Armor {
|
|
341
|
-
constructor(identifier: any, item_texture: any, texture_path: any, options?: {});
|
|
342
|
-
}
|
|
343
|
-
declare class Leggings extends Armor {
|
|
344
|
-
constructor(identifier: any, item_texture: any, texture_path: any, options?: {});
|
|
345
|
-
}
|
|
346
|
-
declare class Helmet extends Armor {
|
|
347
|
-
constructor(identifier: any, item_texture: any, texture_path: any, options?: {});
|
|
348
|
-
}
|
|
349
|
-
|
|
350
|
-
declare namespace ItemAPI {
|
|
351
|
-
function createItem(identifier: string, category: string, texture: string, options?: {
|
|
352
|
-
group: string;
|
|
353
|
-
hight_resolution: boolean;
|
|
354
|
-
hide_in_command: boolean;
|
|
355
|
-
}): Item;
|
|
356
|
-
function createFood(identifier: string, category: string, texture: string, options?: {
|
|
357
|
-
group: string;
|
|
358
|
-
hide_in_command: boolean;
|
|
359
|
-
animation: string;
|
|
360
|
-
canAlwaysEat: boolean;
|
|
361
|
-
nutrition: number;
|
|
362
|
-
saturationModifier: number;
|
|
363
|
-
}): Food;
|
|
364
|
-
function createAttachable(identifier: string, texture: string, material: string, options?: Object): Attachable;
|
|
365
|
-
function createChestplateArmor(identifier: any, item_texture: any, texture_path: any, options?: {}): Chestplate;
|
|
366
|
-
function createHelmetArmor(identifier: any, item_texture: any, texture_path: any, options?: {}): Helmet;
|
|
367
|
-
function createBootArmor(identifier: any, item_texture: any, texture_path: any, options?: {}): Boot;
|
|
368
|
-
function createLeggingsArmor(identifier: any, item_texture: any, texture_path: any, options?: {}): Leggings;
|
|
369
|
-
}
|
|
370
|
-
|
|
371
|
-
declare class BasicBlock {
|
|
359
|
+
setAnimations(anims: string[]): Control;
|
|
360
|
+
anims: string[] | undefined;
|
|
372
361
|
/**
|
|
373
|
-
*
|
|
374
|
-
* @param {
|
|
375
|
-
* @
|
|
376
|
-
* @param {Array} textures_arr 纹理数组 [上,下,东,西,南,北]
|
|
377
|
-
* @param {Object} options 可选参数
|
|
378
|
-
* @param {string} options.group 分组,默认为 "construction"
|
|
379
|
-
* @param {boolean} options.hide_in_command 是否在命令中隐藏,默认为 false
|
|
362
|
+
* 设置是否禁用动画快进。
|
|
363
|
+
* @param {boolean} disable - 是否禁用动画快进(默认值:false)
|
|
364
|
+
* @returns {Control} 返回当前实例以支持链式调用
|
|
380
365
|
*/
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
hide_in_command: boolean;
|
|
384
|
-
});
|
|
385
|
-
identifier: string;
|
|
386
|
-
category: string;
|
|
387
|
-
textures: any[];
|
|
388
|
-
group: string;
|
|
389
|
-
hide_in_command: boolean;
|
|
390
|
-
traits: Map<any, any>;
|
|
391
|
-
states: Map<any, any>;
|
|
392
|
-
components: Map<any, any>;
|
|
393
|
-
permutations: any[];
|
|
394
|
-
getId(): string;
|
|
395
|
-
registerTrait(key: any, value: any): this;
|
|
396
|
-
registerState(key: any, value: any): this;
|
|
366
|
+
setDisableAnimFastForward(disable?: boolean): Control;
|
|
367
|
+
disable_anim_fast_forward: boolean | undefined;
|
|
397
368
|
/**
|
|
398
|
-
*
|
|
399
|
-
* @param {
|
|
369
|
+
* 设置动画重置名称。
|
|
370
|
+
* @param {string} name - 要重置的动画名称
|
|
371
|
+
* @returns {Control} 返回当前实例以支持链式调用
|
|
400
372
|
*/
|
|
401
|
-
|
|
373
|
+
setAnimationResetName(name: string): Control;
|
|
374
|
+
animation_reset_name: string | undefined;
|
|
402
375
|
/**
|
|
403
|
-
*
|
|
404
|
-
* @param {
|
|
376
|
+
* 设置是否忽略该控件。
|
|
377
|
+
* @param {boolean} ignored - 是否忽略该控件(默认值:false)
|
|
378
|
+
* @returns {Control} 返回当前实例以支持链式调用
|
|
405
379
|
*/
|
|
406
|
-
|
|
380
|
+
setIgnored(ignored?: boolean): Control;
|
|
381
|
+
ignored: boolean | undefined;
|
|
407
382
|
/**
|
|
408
|
-
*
|
|
409
|
-
* @param {
|
|
410
|
-
* @
|
|
383
|
+
* 设置控件的变量。
|
|
384
|
+
* @param {object} variables - 要设置的变量
|
|
385
|
+
* @returns {Control} 返回当前实例以支持链式调用
|
|
411
386
|
*/
|
|
412
|
-
|
|
387
|
+
setVariables(variables: object): Control;
|
|
388
|
+
variables: object | undefined;
|
|
413
389
|
/**
|
|
414
|
-
*
|
|
415
|
-
* @
|
|
390
|
+
* 设置控件的修改项。
|
|
391
|
+
* @param {array} modifications - 要设置的修改项
|
|
392
|
+
* @returns {Control} 返回当前实例以支持链式调用
|
|
416
393
|
*/
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
declare class Block extends BasicBlock {
|
|
394
|
+
setModifications(modifications: array): Control;
|
|
395
|
+
modifications: any;
|
|
421
396
|
/**
|
|
422
|
-
*
|
|
423
|
-
* @param {
|
|
424
|
-
* @
|
|
425
|
-
* @param {Array} variantDatas 方块的变体数据,包含每个变体的状态标签和纹理
|
|
426
|
-
* @param {Object} options 可选参数
|
|
427
|
-
* @param {string} options.group 分组,默认为 "construction"
|
|
428
|
-
* @param {boolean} options.hide_in_command 是否在命令中隐藏,默认为 false
|
|
429
|
-
* @param {boolean} options.ambient_occlusion 是否应用环境光遮蔽,默认为 false
|
|
430
|
-
* @param {boolean} options.face_dimming 是否根据面的方向进行亮度调整,默认为 false
|
|
431
|
-
* @param {string} options.render_method 渲染方法,默认为 "alpha_test"
|
|
397
|
+
* 设置控件在网格中的位置。
|
|
398
|
+
* @param {number[]} position - 网格位置,格式为 [行, 列]
|
|
399
|
+
* @returns {Control} 返回当前实例以支持链式调用
|
|
432
400
|
*/
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
hide_in_command: boolean;
|
|
436
|
-
ambient_occlusion: boolean;
|
|
437
|
-
face_dimming: boolean;
|
|
438
|
-
render_method: string;
|
|
439
|
-
});
|
|
440
|
-
options: {
|
|
441
|
-
group: string;
|
|
442
|
-
hide_in_command: boolean;
|
|
443
|
-
ambient_occlusion: boolean;
|
|
444
|
-
face_dimming: boolean;
|
|
445
|
-
render_method: string;
|
|
446
|
-
};
|
|
447
|
-
variantDatas: any[];
|
|
448
|
-
addVariantComponent(variantIndex: any, componentMap: any): this;
|
|
449
|
-
#private;
|
|
450
|
-
}
|
|
451
|
-
|
|
452
|
-
declare class RotatableBlock extends BasicBlock {
|
|
401
|
+
setGridPosition(position: number[]): Control;
|
|
402
|
+
grid_position: number[] | undefined;
|
|
453
403
|
/**
|
|
454
|
-
*
|
|
455
|
-
* @param {
|
|
456
|
-
* @
|
|
457
|
-
* @param {Array} textures_arr 纹理数组 [上,下,东,西,南,北]
|
|
458
|
-
* @param {Object} options 可选参数
|
|
459
|
-
* @param {string} options.group 分组,默认为 "construction"
|
|
460
|
-
* @param {boolean} options.hide_in_command 是否在命令中隐藏,默认为 false
|
|
461
|
-
* @param {string} options.rotationType 旋转类型,默认为 "cardinal"
|
|
462
|
-
* @param {number} options.yRotationOffset 初始旋转偏移量,默认为 180
|
|
404
|
+
* 设置控件在集合中的索引。
|
|
405
|
+
* @param {number} index - 要设置的索引
|
|
406
|
+
* @returns {Control} 返回当前实例以支持链式调用
|
|
463
407
|
*/
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
hide_in_command: boolean;
|
|
467
|
-
rotationType: string;
|
|
468
|
-
yRotationOffset: number;
|
|
469
|
-
});
|
|
470
|
-
#private;
|
|
408
|
+
setCollectionIndex(index: number): Control;
|
|
409
|
+
collection_index: number | undefined;
|
|
471
410
|
}
|
|
472
411
|
|
|
473
|
-
declare class
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
412
|
+
declare class UIElement {
|
|
413
|
+
constructor(name: any, type: any, template: any);
|
|
414
|
+
type: any;
|
|
415
|
+
id: any;
|
|
416
|
+
name: any;
|
|
417
|
+
control: Control;
|
|
418
|
+
properties: Map<any, any>;
|
|
419
|
+
variables: Map<any, any>;
|
|
420
|
+
modifications: any[];
|
|
421
|
+
enableDebug(): this;
|
|
422
|
+
setControl(control: any): this;
|
|
423
|
+
addControl(control: any): this;
|
|
424
|
+
addControls(controls: any): this;
|
|
425
|
+
addVariable(name: any, value: any): this;
|
|
426
|
+
addProp(name: any, value: any): this;
|
|
427
|
+
addModification(modification: any): this;
|
|
428
|
+
serialize(): {
|
|
429
|
+
[x: number]: any;
|
|
430
|
+
};
|
|
483
431
|
}
|
|
432
|
+
/**
|
|
433
|
+
* Modifications
|
|
434
|
+
To modify JSON UI in a non-intrusive way, you can use the modifications property to modify previously existing JSON UI elements from other packs (usually vanilla JSON UI files). Doing this makes sure only necessary parts are modified unless otherwise intended, to improve compatibility with other packs that modify the JSON UI.
|
|
484
435
|
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
436
|
+
Modification Description
|
|
437
|
+
insert_back insert at end of array
|
|
438
|
+
insert_front insert at start of array
|
|
439
|
+
insert_after insert after target in array
|
|
440
|
+
insert_before insert before target in array
|
|
441
|
+
move_back move target to end of array
|
|
442
|
+
move_front move target to start of array
|
|
443
|
+
move_after move target after second target
|
|
444
|
+
move_before move target before second target
|
|
445
|
+
swap swap first target with second target
|
|
446
|
+
replace replace first target with second target
|
|
447
|
+
remove remove target
|
|
448
|
+
*/
|
|
449
|
+
declare class Modifications {
|
|
450
|
+
static OPERATION: Readonly<{
|
|
451
|
+
INSERT_BACK: "insert_back";
|
|
452
|
+
INSERT_FRONT: "insert_front";
|
|
453
|
+
INSERT_AFTER: "insert_after";
|
|
454
|
+
INSERT_BEFORE: "insert_before";
|
|
455
|
+
MOVE_BACK: "move_back";
|
|
456
|
+
MOVE_FRONT: "move_front";
|
|
457
|
+
MOVE_AFTER: "move_after";
|
|
458
|
+
MOVE_BEFORE: "move_before";
|
|
459
|
+
SWAP: "swap";
|
|
460
|
+
REPLACE: "replace";
|
|
461
|
+
REMOVE: "remove";
|
|
462
|
+
}>;
|
|
494
463
|
}
|
|
495
464
|
|
|
496
465
|
/**
|
|
497
|
-
*
|
|
466
|
+
* Input 类
|
|
467
|
+
*
|
|
468
|
+
* 该类表示输入配置,用于管理 UI 元素的输入行为。
|
|
469
|
+
*
|
|
470
|
+
* 属性:
|
|
471
|
+
* - button_mappings: Array of mapping objects - 按钮映射配置
|
|
472
|
+
* - modal: boolean - 是否为模态输入
|
|
473
|
+
* - inline_modal: boolean - 是否为内联模态输入
|
|
474
|
+
* - always_listen_to_input: boolean - 是否始终监听输入
|
|
475
|
+
* - always_handle_pointer: boolean - 是否始终处理指针事件
|
|
476
|
+
* - always_handle_controller_direction: boolean - 是否始终处理控制器方向事件
|
|
477
|
+
* - hover_enabled: boolean - 是否启用悬停事件
|
|
478
|
+
* - prevent_touch_input: boolean - 是否阻止触摸输入
|
|
479
|
+
* - consume_event: boolean - 是否消耗事件
|
|
480
|
+
* - consume_hover_events: boolean - 是否消耗悬停事件
|
|
481
|
+
* - gesture_tracking_button: string - 手势跟踪按钮
|
|
498
482
|
*/
|
|
499
|
-
declare class
|
|
500
|
-
filters: any[];
|
|
483
|
+
declare class Input {
|
|
501
484
|
/**
|
|
502
|
-
*
|
|
503
|
-
* @param {
|
|
504
|
-
* @
|
|
505
|
-
* @returns {BiomeFilter} 返回自身以支持链式调用
|
|
485
|
+
* 设置按钮映射配置。
|
|
486
|
+
* @param {ButtonMapping[]} mappings - 按钮映射配置数组
|
|
487
|
+
* @returns {Input} 返回当前实例以支持链式调用
|
|
506
488
|
*/
|
|
507
|
-
|
|
489
|
+
setButtonMappings(mappings: ButtonMapping[]): Input;
|
|
490
|
+
button_mappings: ButtonMapping[] | undefined;
|
|
508
491
|
/**
|
|
509
|
-
*
|
|
510
|
-
* @param {
|
|
511
|
-
* @
|
|
512
|
-
* @param {string} value - 目标值(如 "overworld")
|
|
513
|
-
* @returns {BiomeFilter} 返回自身以支持链式调用
|
|
492
|
+
* 设置是否为模态输入。
|
|
493
|
+
* @param {boolean} modal - 是否为模态输入
|
|
494
|
+
* @returns {Input} 返回当前实例以支持链式调用
|
|
514
495
|
*/
|
|
515
|
-
|
|
496
|
+
setModal(modal?: boolean): Input;
|
|
497
|
+
modal: boolean | undefined;
|
|
516
498
|
/**
|
|
517
|
-
*
|
|
518
|
-
* @
|
|
499
|
+
* 设置是否为内联模态输入。
|
|
500
|
+
* @param {boolean} inlineModal - 是否为内联模态输入
|
|
501
|
+
* @returns {Input} 返回当前实例以支持链式调用
|
|
519
502
|
*/
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
/**
|
|
524
|
-
* 表示功能规则生成条件的类
|
|
525
|
-
*/
|
|
526
|
-
declare class FeatureConditions {
|
|
527
|
-
conditions: {
|
|
528
|
-
placement_pass: string;
|
|
529
|
-
"minecraft:biome_filter": never[];
|
|
530
|
-
};
|
|
503
|
+
setInlineModal(inlineModal?: boolean): Input;
|
|
504
|
+
inline_modal: boolean | undefined;
|
|
531
505
|
/**
|
|
532
|
-
*
|
|
533
|
-
* @param {
|
|
534
|
-
* @returns {
|
|
506
|
+
* 设置是否始终监听输入。
|
|
507
|
+
* @param {boolean} alwaysListen - 是否始终监听输入
|
|
508
|
+
* @returns {Input} 返回当前实例以支持链式调用
|
|
535
509
|
*/
|
|
536
|
-
|
|
510
|
+
setAlwaysListenToInput(alwaysListen?: boolean): Input;
|
|
511
|
+
always_listen_to_input: boolean | undefined;
|
|
537
512
|
/**
|
|
538
|
-
*
|
|
539
|
-
* @param {
|
|
540
|
-
* @returns {
|
|
513
|
+
* 设置是否始终处理指针事件。
|
|
514
|
+
* @param {boolean} alwaysHandle - 是否始终处理指针事件
|
|
515
|
+
* @returns {Input} 返回当前实例以支持链式调用
|
|
541
516
|
*/
|
|
542
|
-
|
|
517
|
+
setAlwaysHandlePointer(alwaysHandle?: boolean): Input;
|
|
518
|
+
always_handle_pointer: boolean | undefined;
|
|
543
519
|
/**
|
|
544
|
-
*
|
|
545
|
-
* @
|
|
520
|
+
* 设置是否始终处理控制器方向事件。
|
|
521
|
+
* @param {boolean} alwaysHandle - 是否始终处理控制器方向事件
|
|
522
|
+
* @returns {Input} 返回当前实例以支持链式调用
|
|
523
|
+
*/
|
|
524
|
+
setAlwaysHandleControllerDirection(alwaysHandle?: boolean): Input;
|
|
525
|
+
always_handle_controller_direction: boolean | undefined;
|
|
526
|
+
/**
|
|
527
|
+
* 设置是否启用悬停事件。
|
|
528
|
+
* @param {boolean} enabled - 是否启用悬停事件
|
|
529
|
+
* @returns {Input} 返回当前实例以支持链式调用
|
|
530
|
+
*/
|
|
531
|
+
setHoverEnabled(enabled?: boolean): Input;
|
|
532
|
+
hover_enabled: boolean | undefined;
|
|
533
|
+
/**
|
|
534
|
+
* 设置是否阻止触摸输入。
|
|
535
|
+
* @param {boolean} prevent - 是否阻止触摸输入
|
|
536
|
+
* @returns {Input} 返回当前实例以支持链式调用
|
|
537
|
+
*/
|
|
538
|
+
setPreventTouchInput(prevent?: boolean): Input;
|
|
539
|
+
prevent_touch_input: boolean | undefined;
|
|
540
|
+
/**
|
|
541
|
+
* 设置是否消耗事件。
|
|
542
|
+
* @param {boolean} consume - 是否消耗事件
|
|
543
|
+
* @returns {Input} 返回当前实例以支持链式调用
|
|
546
544
|
*/
|
|
547
|
-
|
|
545
|
+
setConsumeEvent(consume?: boolean): Input;
|
|
546
|
+
consume_event: boolean | undefined;
|
|
547
|
+
/**
|
|
548
|
+
* 设置是否消耗悬停事件。
|
|
549
|
+
* @param {boolean} consume - 是否消耗悬停事件
|
|
550
|
+
* @returns {Input} 返回当前实例以支持链式调用
|
|
551
|
+
*/
|
|
552
|
+
setConsumeHoverEvents(consume?: boolean): Input;
|
|
553
|
+
consume_hover_events: boolean | undefined;
|
|
554
|
+
/**
|
|
555
|
+
* 设置手势跟踪按钮。
|
|
556
|
+
* @param {string} button - 手势跟踪按钮
|
|
557
|
+
* @returns {Input} 返回当前实例以支持链式调用
|
|
558
|
+
*/
|
|
559
|
+
setGestureTrackingButton(button: string): Input;
|
|
560
|
+
gesture_tracking_button: string | undefined;
|
|
548
561
|
}
|
|
549
562
|
|
|
550
563
|
/**
|
|
551
|
-
*
|
|
564
|
+
* Sound 类
|
|
565
|
+
*
|
|
566
|
+
* 该类表示一个声音控件,用于管理声音播放及其相关属性。
|
|
567
|
+
*
|
|
568
|
+
* 属性:
|
|
569
|
+
* - sound_name: string - 声音名称(定义在 RP/sounds/sound_definitions.json 文件中)
|
|
570
|
+
* - sound_volume: float - 声音音量(默认值:1.0)
|
|
571
|
+
* - sound_pitch: float - 声音音调(默认值:1.0)
|
|
572
|
+
* - sounds: Array of sound objects - 触发事件时播放的声音数组
|
|
552
573
|
*/
|
|
553
|
-
declare class
|
|
574
|
+
declare class Sound {
|
|
554
575
|
/**
|
|
555
|
-
*
|
|
556
|
-
* @param {
|
|
576
|
+
* 设置声音名称。
|
|
577
|
+
* @param {string} name - 声音名称(定义在 RP/sounds/sound_definitions.json 文件中)
|
|
578
|
+
* @returns {Sound} 返回当前实例以支持链式调用
|
|
557
579
|
*/
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
extent: number[];
|
|
580
|
+
setSoundName(name: string): Sound;
|
|
581
|
+
sound_name: string | undefined;
|
|
561
582
|
/**
|
|
562
|
-
*
|
|
563
|
-
* @
|
|
583
|
+
* 设置声音音量。
|
|
584
|
+
* @param {number} volume - 音量(范围:0.0 到 1.0,默认值:1.0)
|
|
585
|
+
* @returns {Sound} 返回当前实例以支持链式调用
|
|
564
586
|
*/
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
/**
|
|
569
|
-
* 表示功能规则分布配置的类
|
|
570
|
-
*/
|
|
571
|
-
declare class FeatureDistribution {
|
|
572
|
-
distribution: {
|
|
573
|
-
iterations: number;
|
|
574
|
-
coordinate_eval_order: string;
|
|
575
|
-
x: Object;
|
|
576
|
-
y: Object;
|
|
577
|
-
z: Object;
|
|
578
|
-
};
|
|
587
|
+
setSoundVolume(volume?: number): Sound;
|
|
588
|
+
sound_volume: number | undefined;
|
|
579
589
|
/**
|
|
580
|
-
*
|
|
581
|
-
* @param {number}
|
|
582
|
-
* @returns {
|
|
590
|
+
* 设置声音音调。
|
|
591
|
+
* @param {number} pitch - 音调(默认值:1.0)
|
|
592
|
+
* @returns {Sound} 返回当前实例以支持链式调用
|
|
583
593
|
*/
|
|
584
|
-
|
|
594
|
+
setSoundPitch(pitch?: number): Sound;
|
|
595
|
+
sound_pitch: number | undefined;
|
|
585
596
|
/**
|
|
586
|
-
*
|
|
587
|
-
* @param {
|
|
588
|
-
* @
|
|
589
|
-
* @returns {FeatureDistribution} 返回自身以支持链式调用
|
|
597
|
+
* 设置触发事件时播放的声音数组。
|
|
598
|
+
* @param {object[]} sounds - 声音对象数组
|
|
599
|
+
* @returns {Sound} 返回当前实例以支持链式调用
|
|
590
600
|
*/
|
|
591
|
-
|
|
601
|
+
setSounds(sounds: object[]): Sound;
|
|
602
|
+
sounds: object[] | undefined;
|
|
592
603
|
/**
|
|
593
|
-
*
|
|
594
|
-
* @
|
|
604
|
+
* 添加一个声音对象到声音数组。
|
|
605
|
+
* @param {object} sound - 声音对象
|
|
606
|
+
* @returns {Sound} 返回当前实例以支持链式调用
|
|
595
607
|
*/
|
|
596
|
-
|
|
597
|
-
}
|
|
598
|
-
|
|
599
|
-
declare class FeatureRule {
|
|
600
|
-
constructor(identifier: any, places_feature: any);
|
|
601
|
-
identifier: any;
|
|
602
|
-
places_feature: any;
|
|
603
|
-
condition: FeatureConditions;
|
|
604
|
-
distribution: FeatureDistribution;
|
|
605
|
-
setPlacementPass(pass: any): void;
|
|
606
|
-
setBiomeFilter(biomeFilter: any): void;
|
|
607
|
-
setIterations(iterations: any): void;
|
|
608
|
-
setAxisDistribution(axis: any, config: any): void;
|
|
609
|
-
toJson(): {
|
|
610
|
-
format_version: any;
|
|
611
|
-
"minecraft:feature_rules": any;
|
|
612
|
-
};
|
|
613
|
-
}
|
|
614
|
-
|
|
615
|
-
declare class OreBlock {
|
|
616
|
-
constructor(identifier: any, category: any, textures_arr: any, options?: {});
|
|
617
|
-
block: BasicBlock;
|
|
618
|
-
feature: OreFeature;
|
|
619
|
-
feature_rules: FeatureRule;
|
|
620
|
-
}
|
|
621
|
-
|
|
622
|
-
declare class CropBlock extends Block {
|
|
623
|
-
stageNum: number;
|
|
624
|
-
}
|
|
625
|
-
|
|
626
|
-
declare namespace BlockAPI {
|
|
627
|
-
function createBasicBlock(identifier: string, category: string, textures_arr: any[], options?: {
|
|
628
|
-
group: string;
|
|
629
|
-
hide_in_command: boolean;
|
|
630
|
-
}): BasicBlock;
|
|
631
|
-
function createBlock(identifier: string, category: string, variantDatas: any[], options?: {
|
|
632
|
-
group: string;
|
|
633
|
-
hide_in_command: boolean;
|
|
634
|
-
ambient_occlusion: boolean;
|
|
635
|
-
face_dimming: boolean;
|
|
636
|
-
render_method: string;
|
|
637
|
-
}): Block;
|
|
638
|
-
function createRotatableBlock(identifier: string, category: string, textures_arr: any[], options?: {
|
|
639
|
-
group: string;
|
|
640
|
-
hide_in_command: boolean;
|
|
641
|
-
rotationType: string;
|
|
642
|
-
yRotationOffset: number;
|
|
643
|
-
}): RotatableBlock;
|
|
644
|
-
function createGeometryBlock(identifier: any, category: any, geometry: any, material_instances: any, options?: {}): GeometryBlock;
|
|
645
|
-
function createOreBlock(identifier: any, category: any, textures_arr: any, options?: {}): OreBlock;
|
|
646
|
-
function createCropBlock(identifier: string, category: string, variantDatas: any[], options?: {
|
|
647
|
-
group: string;
|
|
648
|
-
hide_in_command: boolean;
|
|
649
|
-
ambient_occlusion: boolean;
|
|
650
|
-
face_dimming: boolean;
|
|
651
|
-
render_method: string;
|
|
652
|
-
}): CropBlock;
|
|
653
|
-
}
|
|
654
|
-
|
|
655
|
-
declare namespace FeatureAPI {
|
|
656
|
-
function createOreFeature(identifier: any, count: any, replace_rules: any): OreFeature;
|
|
657
|
-
function createFeatureRules(identifier: any, places_feature: any): FeatureRule;
|
|
608
|
+
addSound(sound: object): Sound;
|
|
658
609
|
}
|
|
659
610
|
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
events?: Object | undefined;
|
|
681
|
-
});
|
|
682
|
-
identifier: string;
|
|
683
|
-
is_spawnable: boolean;
|
|
684
|
-
is_summonable: boolean;
|
|
685
|
-
runtime_identifier: string | undefined;
|
|
686
|
-
properties: any;
|
|
687
|
-
components: Map<string, any>;
|
|
688
|
-
component_groups: Map<string, any>;
|
|
689
|
-
events: Map<string, any>;
|
|
690
|
-
/**
|
|
691
|
-
* 添加属性到实体
|
|
692
|
-
* @param {string} name 属性名称
|
|
693
|
-
* @param {Object} value 属性值
|
|
694
|
-
* @returns
|
|
695
|
-
*/
|
|
696
|
-
addProperty(name: string, value: Object): this;
|
|
697
|
-
/**
|
|
698
|
-
* 移除属性
|
|
699
|
-
* @param {string} name 属性名称
|
|
700
|
-
* @returns
|
|
701
|
-
*/
|
|
702
|
-
removeProperty(name: string): this;
|
|
611
|
+
/**
|
|
612
|
+
* Layout 类
|
|
613
|
+
*
|
|
614
|
+
* 该类表示一个具有各种属性和方法的 UI 布局元素,用于操作其布局和大小。
|
|
615
|
+
*
|
|
616
|
+
* 属性:
|
|
617
|
+
* - size: Vector [width, height] - UI 元素的大小(默认值:["default", "default"])
|
|
618
|
+
* - max_size: Vector [width, height] - UI 元素的最大大小(默认值:["default", "default"])
|
|
619
|
+
* - min_size: Vector [width, height] - UI 元素的最小大小(默认值:["default", "default"])
|
|
620
|
+
* - offset: Vector [x, y] - UI 元素相对于父元素的位置(默认值:[0, 0])
|
|
621
|
+
* - anchor_from: enum - 父元素中的锚点(默认值:center)
|
|
622
|
+
* - anchor_to: enum - 元素自身的锚点(默认值:center)
|
|
623
|
+
* - inherit_max_sibling_width: boolean - 是否使用兄弟元素的最大宽度(默认值:false)
|
|
624
|
+
* - inherit_max_sibling_height: boolean - 是否使用兄弟元素的最大高度(默认值:false)
|
|
625
|
+
* - use_anchored_offset: boolean - 是否使用基于锚点的偏移(默认值:false)
|
|
626
|
+
* - contained: boolean - 是否限制元素在父元素边界内(默认值:false)
|
|
627
|
+
* - draggable: enum - 是否使元素可拖动(可能值:vertical, horizontal, both)
|
|
628
|
+
* - follows_cursor: boolean - 是否使元素跟随光标(默认值:false)
|
|
629
|
+
*/
|
|
630
|
+
declare class Layout {
|
|
703
631
|
/**
|
|
704
|
-
*
|
|
705
|
-
* @
|
|
632
|
+
* 设置 UI 元素的大小。
|
|
633
|
+
* @param {any[]} size - 大小,格式为 [width, height](默认值:["default", "default"])
|
|
634
|
+
* @returns {Layout} 返回当前实例以支持链式调用
|
|
706
635
|
*/
|
|
707
|
-
|
|
636
|
+
setSize(size?: any[]): Layout;
|
|
637
|
+
size: any[] | undefined;
|
|
708
638
|
/**
|
|
709
|
-
*
|
|
710
|
-
* @param {string}
|
|
711
|
-
* @
|
|
712
|
-
* @returns {BasicEntity} - 返回当前实例以支持链式调用
|
|
639
|
+
* 设置 UI 元素的最大大小。
|
|
640
|
+
* @param {string[]} maxSize - 最大大小,格式为 [width, height](默认值:["default", "default"])
|
|
641
|
+
* @returns {Layout} 返回当前实例以支持链式调用
|
|
713
642
|
*/
|
|
714
|
-
|
|
643
|
+
setMaxSize(maxSize?: string[]): Layout;
|
|
644
|
+
max_size: string[] | undefined;
|
|
715
645
|
/**
|
|
716
|
-
*
|
|
717
|
-
* @param {string}
|
|
718
|
-
* @returns {
|
|
646
|
+
* 设置 UI 元素的最小大小。
|
|
647
|
+
* @param {string[]} minSize - 最小大小,格式为 [width, height](默认值:["default", "default"])
|
|
648
|
+
* @returns {Layout} 返回当前实例以支持链式调用
|
|
719
649
|
*/
|
|
720
|
-
|
|
650
|
+
setMinSize(minSize?: string[]): Layout;
|
|
651
|
+
min_size: string[] | undefined;
|
|
721
652
|
/**
|
|
722
|
-
*
|
|
723
|
-
* @
|
|
653
|
+
* 设置 UI 元素相对于父元素的位置。
|
|
654
|
+
* @param {number[]} offset - 偏移量,格式为 [x, y](默认值:[0, 0])
|
|
655
|
+
* @returns {Layout} 返回当前实例以支持链式调用
|
|
724
656
|
*/
|
|
725
|
-
|
|
657
|
+
setOffset(offset?: number[]): Layout;
|
|
658
|
+
offset: number[] | undefined;
|
|
726
659
|
/**
|
|
727
|
-
*
|
|
728
|
-
* @param {string}
|
|
729
|
-
* @
|
|
730
|
-
* @returns {BasicEntity} - 返回当前实例以支持链式调用
|
|
660
|
+
* 设置父元素中的锚点。
|
|
661
|
+
* @param {string} anchorFrom - 锚点(可能值:top_left, top_middle, top_right, left_middle, center, right_middle, bottom_left, bottom_middle, bottom_right)(默认值:center)
|
|
662
|
+
* @returns {Layout} 返回当前实例以支持链式调用
|
|
731
663
|
*/
|
|
732
|
-
|
|
664
|
+
setAnchorFrom(anchorFrom?: string): Layout;
|
|
665
|
+
anchor_from: string | undefined;
|
|
733
666
|
/**
|
|
734
|
-
*
|
|
735
|
-
* @param {string}
|
|
736
|
-
* @returns {
|
|
667
|
+
* 设置元素自身的锚点。
|
|
668
|
+
* @param {string} anchorTo - 锚点(可能值:top_left, top_middle, top_right, left_middle, center, right_middle, bottom_left, bottom_middle, bottom_right)(默认值:center)
|
|
669
|
+
* @returns {Layout} 返回当前实例以支持链式调用
|
|
737
670
|
*/
|
|
738
|
-
|
|
671
|
+
setAnchorTo(anchorTo?: string): Layout;
|
|
672
|
+
anchor_to: string | undefined;
|
|
739
673
|
/**
|
|
740
|
-
*
|
|
741
|
-
* @
|
|
674
|
+
* 设置是否使用兄弟元素的最大宽度。
|
|
675
|
+
* @param {boolean} inherit - 是否使用兄弟元素的最大宽度(默认值:false)
|
|
676
|
+
* @returns {Layout} 返回当前实例以支持链式调用
|
|
742
677
|
*/
|
|
743
|
-
|
|
678
|
+
setInheritMaxSiblingWidth(inherit?: boolean): Layout;
|
|
679
|
+
inherit_max_sibling_width: boolean | undefined;
|
|
744
680
|
/**
|
|
745
|
-
*
|
|
746
|
-
* @param {
|
|
747
|
-
* @returns {
|
|
681
|
+
* 设置是否使用兄弟元素的最大高度。
|
|
682
|
+
* @param {boolean} inherit - 是否使用兄弟元素的最大高度(默认值:false)
|
|
683
|
+
* @returns {Layout} 返回当前实例以支持链式调用
|
|
748
684
|
*/
|
|
749
|
-
|
|
685
|
+
setInheritMaxSiblingHeight(inherit?: boolean): Layout;
|
|
686
|
+
inherit_max_sibling_height: boolean | undefined;
|
|
750
687
|
/**
|
|
751
|
-
*
|
|
752
|
-
* @param {
|
|
753
|
-
* @returns {
|
|
688
|
+
* 设置是否使用基于锚点的偏移。
|
|
689
|
+
* @param {boolean} use - 是否使用基于锚点的偏移(默认值:false)
|
|
690
|
+
* @returns {Layout} 返回当前实例以支持链式调用
|
|
754
691
|
*/
|
|
755
|
-
|
|
692
|
+
setUseAnchoredOffset(use?: boolean): Layout;
|
|
693
|
+
use_anchored_offset: boolean | undefined;
|
|
756
694
|
/**
|
|
757
|
-
*
|
|
758
|
-
* @
|
|
695
|
+
* 设置是否限制元素在父元素边界内。
|
|
696
|
+
* @param {boolean} contained - 是否限制元素在父元素边界内(默认值:false)
|
|
697
|
+
* @returns {Layout} 返回当前实例以支持链式调用
|
|
759
698
|
*/
|
|
760
|
-
|
|
699
|
+
setContained(contained?: boolean): Layout;
|
|
700
|
+
contained: boolean | undefined;
|
|
761
701
|
/**
|
|
762
|
-
*
|
|
702
|
+
* 设置是否使元素可拖动。
|
|
703
|
+
* @param {string} draggable - 是否使元素可拖动(可能值:vertical, horizontal, both)
|
|
704
|
+
* @returns {Layout} 返回当前实例以支持链式调用
|
|
763
705
|
*/
|
|
764
|
-
|
|
706
|
+
setDraggable(draggable: string): Layout;
|
|
707
|
+
draggable: string | undefined;
|
|
765
708
|
/**
|
|
766
|
-
*
|
|
767
|
-
* @
|
|
709
|
+
* 设置是否使元素跟随光标。
|
|
710
|
+
* @param {boolean} follows - 是否使元素跟随光标(默认值:false)
|
|
711
|
+
* @returns {Layout} 返回当前实例以支持链式调用
|
|
768
712
|
*/
|
|
769
|
-
|
|
713
|
+
setFollowsCursor(follows?: boolean): Layout;
|
|
714
|
+
follows_cursor: boolean | undefined;
|
|
770
715
|
}
|
|
771
716
|
|
|
772
|
-
declare class
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
717
|
+
declare class DataBinding {
|
|
718
|
+
setBinding(binding: any): this;
|
|
719
|
+
bindings: any[] | undefined;
|
|
720
|
+
binding: any;
|
|
721
|
+
addDataBinding(dataBindingObject: any): this;
|
|
722
|
+
}
|
|
723
|
+
|
|
724
|
+
/**
|
|
725
|
+
* Factory 类
|
|
726
|
+
*
|
|
727
|
+
* 该类表示一个工厂控件,用于管理子控件的名称和 ID。
|
|
728
|
+
*
|
|
729
|
+
* 属性:
|
|
730
|
+
* - control_name: string - 工厂的子控件名
|
|
731
|
+
* - control_ids: object - 工厂的子控件 ID 对象组
|
|
732
|
+
*/
|
|
733
|
+
declare class Factory {
|
|
789
734
|
/**
|
|
790
|
-
*
|
|
791
|
-
* @param {string} name
|
|
792
|
-
* @
|
|
793
|
-
* @returns {AddonClientEntityDescription} 返回当前实例以支持链式调用
|
|
735
|
+
* 设置工厂的名。
|
|
736
|
+
* @param {string} name - 名(格式:name)
|
|
737
|
+
* @returns {Factory} 返回当前实例以支持链式调用
|
|
794
738
|
*/
|
|
795
|
-
|
|
796
|
-
|
|
739
|
+
setName(name: string): Factory;
|
|
740
|
+
factory: {} | undefined;
|
|
797
741
|
/**
|
|
798
|
-
*
|
|
799
|
-
* @param {string} name
|
|
800
|
-
* @
|
|
801
|
-
* @returns {AddonClientEntityDescription} 返回当前实例以支持链式调用
|
|
742
|
+
* 设置工厂的子控件名。
|
|
743
|
+
* @param {string} name - 子控件名(格式:namespace.controls_name)
|
|
744
|
+
* @returns {Factory} 返回当前实例以支持链式调用
|
|
802
745
|
*/
|
|
803
|
-
|
|
804
|
-
textures: {} | undefined;
|
|
746
|
+
setControlName(name: string): Factory;
|
|
805
747
|
/**
|
|
806
|
-
*
|
|
807
|
-
* @param {
|
|
808
|
-
* @
|
|
809
|
-
* @returns {AddonClientEntityDescription} 返回当前实例以支持链式调用
|
|
748
|
+
* 设置工厂的子控件 ID 对象组。
|
|
749
|
+
* @param {object} ids - 子控件 ID 对象组
|
|
750
|
+
* @returns {Factory} 返回当前实例以支持链式调用
|
|
810
751
|
*/
|
|
811
|
-
|
|
812
|
-
geometry: {} | undefined;
|
|
752
|
+
setControlIds(ids: object): Factory;
|
|
813
753
|
/**
|
|
814
|
-
*
|
|
815
|
-
* @param {string}
|
|
816
|
-
* @param {string}
|
|
817
|
-
* @returns {
|
|
754
|
+
* 添加一个子控件 ID。
|
|
755
|
+
* @param {string} key - 子控件的键名
|
|
756
|
+
* @param {string} value - 子控件的 ID 值
|
|
757
|
+
* @returns {Factory} 返回当前实例以支持链式调用
|
|
818
758
|
*/
|
|
819
|
-
|
|
820
|
-
|
|
759
|
+
addControlId(key: string, value: string): Factory;
|
|
760
|
+
}
|
|
761
|
+
|
|
762
|
+
declare class Button extends UIElement {
|
|
763
|
+
constructor(id: any, template: any);
|
|
764
|
+
input: Input;
|
|
765
|
+
sound: Sound;
|
|
766
|
+
layout: Layout;
|
|
767
|
+
dataBinding: DataBinding;
|
|
768
|
+
factory: Factory;
|
|
769
|
+
setDefaultControl(default_control: any): this;
|
|
770
|
+
setHoverControl(hover_control: any): this;
|
|
771
|
+
setPressedControl(pressed_control: any): this;
|
|
772
|
+
setLockedControl(locked_control: any): this;
|
|
773
|
+
setInput(input: any): this;
|
|
774
|
+
setSound(sound: any): this;
|
|
775
|
+
setLayout(layout: any): this;
|
|
776
|
+
}
|
|
777
|
+
|
|
778
|
+
declare class CollectionPanel extends UIElement {
|
|
779
|
+
constructor(id: any, template: any);
|
|
780
|
+
layout: Layout;
|
|
781
|
+
dataBinding: DataBinding;
|
|
782
|
+
factory: Factory;
|
|
783
|
+
setCollectionName(collection_name: any): this;
|
|
784
|
+
setLayout(layout: any): this;
|
|
785
|
+
}
|
|
786
|
+
|
|
787
|
+
/**
|
|
788
|
+
* Grid 类
|
|
789
|
+
*
|
|
790
|
+
* 该类表示一个网格控件属性,用于管理网格布局及其相关属性。
|
|
791
|
+
*
|
|
792
|
+
* 属性:
|
|
793
|
+
* - grid_dimensions: Vector [columns, rows] - 网格的列数和行数
|
|
794
|
+
* - maximum_grid_items: int - 网格生成的最大项目数
|
|
795
|
+
* - grid_dimension_binding: string - 网格尺寸的绑定名称
|
|
796
|
+
* - grid_rescaling_type: enum - 网格重新缩放方向(可能值:vertical, horizontal, none,默认值:none)
|
|
797
|
+
* - grid_fill_direction: enum - 网格填充方向(可能值:vertical, horizontal, none,默认值:none)
|
|
798
|
+
* - grid_item_template: string - 处理集合的子元素名称(例如:"common.container_item")
|
|
799
|
+
* - precached_grid_item_count: int - 预缓存的网格项目数量
|
|
800
|
+
*/
|
|
801
|
+
declare class GridProp {
|
|
821
802
|
/**
|
|
822
|
-
*
|
|
823
|
-
* @param {
|
|
824
|
-
* @
|
|
825
|
-
* @returns {AddonClientEntityDescription} 返回当前实例以支持链式调用
|
|
803
|
+
* 设置网格的列数和行数。
|
|
804
|
+
* @param {number[]} dimensions - 格式为 [columns, rows]
|
|
805
|
+
* @returns {GridProp} 返回当前实例以支持链式调用
|
|
826
806
|
*/
|
|
827
|
-
|
|
828
|
-
|
|
807
|
+
setGridDimensions(dimensions: number[]): GridProp;
|
|
808
|
+
grid_dimensions: number[] | undefined;
|
|
829
809
|
/**
|
|
830
|
-
*
|
|
831
|
-
* @param {
|
|
832
|
-
* @returns {
|
|
810
|
+
* 设置网格生成的最大项目数。
|
|
811
|
+
* @param {number} maxItems - 最大项目数
|
|
812
|
+
* @returns {GridProp} 返回当前实例以支持链式调用
|
|
833
813
|
*/
|
|
834
|
-
|
|
835
|
-
|
|
814
|
+
setMaximumGridItems(maxItems: number): GridProp;
|
|
815
|
+
maximum_grid_items: number | undefined;
|
|
836
816
|
/**
|
|
837
|
-
*
|
|
838
|
-
* @param {string}
|
|
839
|
-
* @
|
|
840
|
-
* @returns {AddonClientEntityDescription} 返回当前实例以支持链式调用
|
|
817
|
+
* 设置网格尺寸的绑定名称。
|
|
818
|
+
* @param {string} binding - 绑定名称
|
|
819
|
+
* @returns {GridProp} 返回当前实例以支持链式调用
|
|
841
820
|
*/
|
|
842
|
-
|
|
843
|
-
|
|
821
|
+
setGridDimensionBinding(binding: string): GridProp;
|
|
822
|
+
grid_dimension_binding: string | undefined;
|
|
844
823
|
/**
|
|
845
|
-
*
|
|
846
|
-
* @param {string}
|
|
847
|
-
* @
|
|
848
|
-
* @returns {AddonClientEntityDescription} 返回当前实例以支持链式调用
|
|
824
|
+
* 设置网格重新缩放方向。
|
|
825
|
+
* @param {string} type - 可能值:vertical, horizontal, none(默认值:none)
|
|
826
|
+
* @returns {GridProp} 返回当前实例以支持链式调用
|
|
849
827
|
*/
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
texture: string;
|
|
853
|
-
texture_index: number;
|
|
854
|
-
} | undefined;
|
|
828
|
+
setGridRescalingType(type?: string): GridProp;
|
|
829
|
+
grid_rescaling_type: string | undefined;
|
|
855
830
|
/**
|
|
856
|
-
*
|
|
857
|
-
* @param {string}
|
|
858
|
-
* @
|
|
859
|
-
* @returns {AddonClientEntityDescription} 返回当前实例以支持链式调用
|
|
831
|
+
* 设置网格填充方向。
|
|
832
|
+
* @param {string} direction - 可能值:vertical, horizontal, none(默认值:none)
|
|
833
|
+
* @returns {GridProp} 返回当前实例以支持链式调用
|
|
860
834
|
*/
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
}
|
|
864
|
-
|
|
865
|
-
/**
|
|
866
|
-
* ClientEntity 类,用于表示客户端实体。
|
|
867
|
-
* 继承自 AddonClientEntityDescription,并扩展了实体的数据加载和 JSON 序列化功能。
|
|
868
|
-
*/
|
|
869
|
-
declare class ClientEntity extends AddonClientEntityDescription {
|
|
835
|
+
setGridFillDirection(direction?: string): GridProp;
|
|
836
|
+
grid_fill_direction: string | undefined;
|
|
870
837
|
/**
|
|
871
|
-
*
|
|
872
|
-
*
|
|
873
|
-
* @
|
|
874
|
-
* @param {Object} data - 实体的初始数据,默认为空对象。
|
|
838
|
+
* 设置处理集合的子元素名称。
|
|
839
|
+
* @param {string} template - 元素名称(例如:"common.container_item")
|
|
840
|
+
* @returns {GridProp} 返回当前实例以支持链式调用
|
|
875
841
|
*/
|
|
876
|
-
|
|
842
|
+
setGridItemTemplate(template: string): GridProp;
|
|
843
|
+
grid_item_template: string | undefined;
|
|
877
844
|
/**
|
|
878
|
-
*
|
|
879
|
-
*
|
|
880
|
-
* @returns {
|
|
845
|
+
* 设置预缓存的网格项目数量。
|
|
846
|
+
* @param {number} count - 预缓存数量
|
|
847
|
+
* @returns {GridProp} 返回当前实例以支持链式调用
|
|
881
848
|
*/
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
declare namespace EntityAPI {
|
|
886
|
-
function createNativeEntity(identifier: string, proto_id: string, options?: Object): {
|
|
887
|
-
behavior: BasicEntity;
|
|
888
|
-
resource: ClientEntity;
|
|
889
|
-
};
|
|
890
|
-
function createEntity(identifier: string, texture: string, behData: Object, resData: Object, options?: Object): {
|
|
891
|
-
behavior: BasicEntity;
|
|
892
|
-
resource: ClientEntity;
|
|
893
|
-
};
|
|
894
|
-
function createProjectile(identifier: string, texture: string, options?: Object): {
|
|
895
|
-
behavior: BasicEntity;
|
|
896
|
-
resource: ClientEntity;
|
|
897
|
-
};
|
|
898
|
-
function createDummyEntity(identifier: string, texture: string, options: Object | undefined, behData: Object, resData: Object): {
|
|
899
|
-
behavior: BasicEntity;
|
|
900
|
-
resource: ClientEntity;
|
|
901
|
-
};
|
|
849
|
+
setPrecachedGridItemCount(count: number): GridProp;
|
|
850
|
+
precached_grid_item_count: number | undefined;
|
|
902
851
|
}
|
|
903
852
|
|
|
904
|
-
declare class
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
getId(): any;
|
|
910
|
-
identifier(identifier: any): this;
|
|
911
|
-
tags(tags: any): this;
|
|
912
|
-
toJson(): {
|
|
913
|
-
format_version: any;
|
|
914
|
-
};
|
|
853
|
+
declare class Grid extends CollectionPanel {
|
|
854
|
+
gridNum: number;
|
|
855
|
+
grid: GridProp;
|
|
856
|
+
setGridProp(grid_prop: any): this;
|
|
857
|
+
addGridItem(grid_position: any, content: any): this;
|
|
915
858
|
}
|
|
916
859
|
|
|
917
|
-
|
|
860
|
+
/**
|
|
861
|
+
* Sprite 类
|
|
862
|
+
*
|
|
863
|
+
* 该类表示一个 Sprite 控件,用于管理图像纹理及其相关属性。
|
|
864
|
+
*
|
|
865
|
+
* 属性:
|
|
866
|
+
* - texture: string - 图像路径(从包根目录开始,例如:"textures/ui/White")
|
|
867
|
+
* - allow_debug_missing_texture: boolean - 是否在纹理未找到时显示缺失纹理(默认值:true)
|
|
868
|
+
* - uv: Vector [u, v] - 纹理映射的起始位置
|
|
869
|
+
* - uv_size: Vector [width, height] - 纹理映射的大小
|
|
870
|
+
* - texture_file_system: string - 纹理来源(默认值:InUserPackage)
|
|
871
|
+
* - nineslice_size: int or Vector [x0, y0, x1, y1] - 9-slice 分割大小
|
|
872
|
+
* - tiled: boolean or enum - 是否平铺纹理(可能值:true/false, x, y)
|
|
873
|
+
* - tiled_scale: Vector [sX, sY] - 平铺纹理的缩放比例(默认值:false)
|
|
874
|
+
* - clip_direction: enum - 裁剪方向的起始点(可能值:left, right, up, down, center)
|
|
875
|
+
* - clip_ratio: float - 裁剪比例(范围:0.0 到 1.0)
|
|
876
|
+
* - clip_pixelperfect: boolean - 是否尽可能保持像素精确裁剪
|
|
877
|
+
* - keep_ratio: boolean - 是否在调整大小时保持比例(默认值:true)
|
|
878
|
+
* - bilinear: boolean - 是否在调整大小时使用双线性函数(默认值:false)
|
|
879
|
+
* - fill: boolean - 是否拉伸图像以适应大小(默认值:false)
|
|
880
|
+
* - $fit_to_width: boolean - 是否适应宽度
|
|
881
|
+
* - zip_folder: string - 压缩文件夹路径
|
|
882
|
+
* - grayscale: boolean - 是否以黑白渲染图像(默认值:false)
|
|
883
|
+
* - force_texture_reload: boolean - 是否在纹理路径更改时强制重新加载图像
|
|
884
|
+
* - base_size: Vector [width, height] - 基础大小
|
|
885
|
+
*/
|
|
886
|
+
declare class Sprite {
|
|
918
887
|
/**
|
|
919
|
-
*
|
|
920
|
-
* @param {
|
|
888
|
+
* 设置图像纹理路径。
|
|
889
|
+
* @param {string} texture - 图像路径(例如:"textures/ui/White")
|
|
890
|
+
* @returns {Sprite} 返回当前实例以支持链式调用
|
|
921
891
|
*/
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
input(item: any, data: any, count: any): this;
|
|
925
|
-
output(item: any): this;
|
|
926
|
-
}
|
|
927
|
-
declare class AddonRecipeFurnace_1_17 extends AddonRecipeFurnace {
|
|
928
|
-
constructor(definitions?: {});
|
|
929
|
-
}
|
|
930
|
-
|
|
931
|
-
declare class AddonRecipeShaped extends AddonRecipe {
|
|
892
|
+
setTexture(texture: string): Sprite;
|
|
893
|
+
texture: string | undefined;
|
|
932
894
|
/**
|
|
933
|
-
*
|
|
934
|
-
* @param {
|
|
895
|
+
* 设置是否在纹理未找到时显示缺失纹理。
|
|
896
|
+
* @param {boolean} allow - 是否显示缺失纹理(默认值:true)
|
|
897
|
+
* @returns {Sprite} 返回当前实例以支持链式调用
|
|
935
898
|
*/
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
assumeSymmetry(): void;
|
|
939
|
-
key(key: any): this;
|
|
940
|
-
pattern(pattern: any): this;
|
|
941
|
-
priority(priority: any): this;
|
|
942
|
-
output(item: any): this;
|
|
943
|
-
}
|
|
944
|
-
declare class AddonRecipeShaped_1_20 extends AddonRecipeShaped {
|
|
945
|
-
constructor(definitions: any);
|
|
946
|
-
}
|
|
947
|
-
|
|
948
|
-
declare class AddonRecipeShapeless extends AddonRecipe {
|
|
899
|
+
setAllowDebugMissingTexture(allow?: boolean): Sprite;
|
|
900
|
+
allow_debug_missing_texture: boolean | undefined;
|
|
949
901
|
/**
|
|
950
|
-
*
|
|
951
|
-
* @param {
|
|
902
|
+
* 设置纹理映射的起始位置。
|
|
903
|
+
* @param {number[]} uv - 起始位置,格式为 [u, v]
|
|
904
|
+
* @returns {Sprite} 返回当前实例以支持链式调用
|
|
952
905
|
*/
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
priority(priority: any): this;
|
|
956
|
-
ingredients(ingredients: any): this;
|
|
957
|
-
output(item: any): this;
|
|
958
|
-
}
|
|
959
|
-
declare class AddonRecipeShapeless_1_17 extends AddonRecipeShapeless {
|
|
960
|
-
constructor(definitions: any);
|
|
961
|
-
}
|
|
962
|
-
|
|
963
|
-
declare const RecipeAPI: RecipeRegistry;
|
|
964
|
-
declare class RecipeRegistry {
|
|
906
|
+
setUV(uv: number[]): Sprite;
|
|
907
|
+
uv: number[] | undefined;
|
|
965
908
|
/**
|
|
966
|
-
*
|
|
967
|
-
* @param {
|
|
909
|
+
* 设置纹理映射的大小。
|
|
910
|
+
* @param {number[]} uvSize - 大小,格式为 [width, height]
|
|
911
|
+
* @returns {Sprite} 返回当前实例以支持链式调用
|
|
968
912
|
*/
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
registerFurnace(identifier: any): AddonRecipeFurnace_1_17;
|
|
972
|
-
registerSimpleShaped(identifier: any, output: any, pattern: any, key: any): AddonRecipeShaped_1_20;
|
|
973
|
-
registerShaped(identifier: any): AddonRecipeShaped_1_20;
|
|
974
|
-
registerSimpleShapeless(identifier: any, output: any, ingredients: any): AddonRecipeShapeless_1_17;
|
|
975
|
-
registerShapeless(identifier: any): AddonRecipeShapeless_1_17;
|
|
976
|
-
}
|
|
977
|
-
|
|
978
|
-
declare class BlockComponent {
|
|
979
|
-
static setTick(interval_range: any, looping: any): Map<any, any>;
|
|
913
|
+
setUVSize(uvSize: number[]): Sprite;
|
|
914
|
+
uv_size: number[] | undefined;
|
|
980
915
|
/**
|
|
981
|
-
*
|
|
982
|
-
* @param {
|
|
983
|
-
* @returns
|
|
916
|
+
* 设置纹理来源。
|
|
917
|
+
* @param {string} source - 纹理来源(可能值:InUserPackage, InAppPackage, RawPath, RawPersistent, InSettingsDir, InExternalDir, InServerPackage, InDataDir, InUserDir, InWorldDir, StoreCache, Usage is Unknown)
|
|
918
|
+
* @returns {Sprite} 返回当前实例以支持链式调用
|
|
984
919
|
*/
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
* 创建一个用于 Minecraft 方块的变换对象,并返回一个 Map。
|
|
988
|
-
* @param {number[]} [translation=[0, 0, 0]] - 平移向量 [x, y, z]。
|
|
989
|
-
* @param {number[]} [scale=[1, 1, 1]] - 缩放向量 [x, y, z]。
|
|
990
|
-
* @param {number[]} [scale_pivot=[0, 0, 0]] - 缩放的枢轴点 [x, y, z]。
|
|
991
|
-
* @param {number[]} [rotation=[0, 0, 0]] - 旋转向量(角度)[x, y, z]。
|
|
992
|
-
* @param {number[]} [rotation_pivot=[0, 0, 0]] - 旋转的枢轴点 [x, y, z]。
|
|
993
|
-
* @returns {Map} - 一个包含变换数据的 Map 对象。
|
|
994
|
-
* @throws {Error} - 如果任何参数无效,则抛出错误。
|
|
995
|
-
*/
|
|
996
|
-
static setTransformation(translation?: number[], scale?: number[], scale_pivot?: number[], rotation?: number[], rotation_pivot?: number[]): Map<any, any>;
|
|
920
|
+
setTextureFileSystem(source?: string): Sprite;
|
|
921
|
+
texture_file_system: string | undefined;
|
|
997
922
|
/**
|
|
998
|
-
*
|
|
999
|
-
* @param {
|
|
1000
|
-
* @returns {
|
|
923
|
+
* 设置 9-slice 分割大小。
|
|
924
|
+
* @param {number|number[]} size - 9-slice 分割大小(可以是单个数字或 [x0, y0, x1, y1] 数组)
|
|
925
|
+
* @returns {Sprite} 返回当前实例以支持链式调用
|
|
1001
926
|
*/
|
|
1002
|
-
|
|
927
|
+
setNineSliceSize(size: number | number[]): Sprite;
|
|
928
|
+
nineslice_size: number | number[] | undefined;
|
|
1003
929
|
/**
|
|
1004
|
-
*
|
|
1005
|
-
* @param {
|
|
1006
|
-
* @returns {
|
|
930
|
+
* 设置是否平铺纹理。
|
|
931
|
+
* @param {boolean|string} tiled - 是否平铺纹理(可能值:true/false, x, y)
|
|
932
|
+
* @returns {Sprite} 返回当前实例以支持链式调用
|
|
1007
933
|
*/
|
|
1008
|
-
|
|
934
|
+
setTiled(tiled: boolean | string): Sprite;
|
|
935
|
+
tiled: string | boolean | undefined;
|
|
1009
936
|
/**
|
|
1010
|
-
*
|
|
1011
|
-
* @param {
|
|
1012
|
-
* @
|
|
1013
|
-
* @returns {Map} - 新的组件集合。
|
|
937
|
+
* 设置平铺纹理的缩放比例。
|
|
938
|
+
* @param {number[]} scale - 缩放比例,格式为 [sX, sY](默认值:[1, 1])
|
|
939
|
+
* @returns {Sprite} 返回当前实例以支持链式调用
|
|
1014
940
|
*/
|
|
1015
|
-
|
|
941
|
+
setTiledScale(scale?: number[]): Sprite;
|
|
942
|
+
tiled_scale: number[] | undefined;
|
|
1016
943
|
/**
|
|
1017
|
-
*
|
|
1018
|
-
* @param {
|
|
1019
|
-
* @
|
|
1020
|
-
* @returns {Map} - 新的组件集合。
|
|
944
|
+
* 设置裁剪方向的起始点。
|
|
945
|
+
* @param {string} direction - 裁剪方向(可能值:left, right, up, down, center)
|
|
946
|
+
* @returns {Sprite} 返回当前实例以支持链式调用
|
|
1021
947
|
*/
|
|
1022
|
-
|
|
948
|
+
setClipDirection(direction: string): Sprite;
|
|
949
|
+
clip_direction: string | undefined;
|
|
1023
950
|
/**
|
|
1024
|
-
*
|
|
1025
|
-
* @param {
|
|
1026
|
-
* @returns {
|
|
951
|
+
* 设置裁剪比例。
|
|
952
|
+
* @param {number} ratio - 裁剪比例(范围:0.0 到 1.0)
|
|
953
|
+
* @returns {Sprite} 返回当前实例以支持链式调用
|
|
1027
954
|
*/
|
|
1028
|
-
|
|
955
|
+
setClipRatio(ratio: number): Sprite;
|
|
956
|
+
clip_ratio: number | undefined;
|
|
1029
957
|
/**
|
|
1030
|
-
*
|
|
1031
|
-
* @param {
|
|
1032
|
-
* @returns {
|
|
958
|
+
* 设置是否尽可能保持像素精确裁剪。
|
|
959
|
+
* @param {boolean} pixelPerfect - 是否保持像素精确裁剪
|
|
960
|
+
* @returns {Sprite} 返回当前实例以支持链式调用
|
|
1033
961
|
*/
|
|
1034
|
-
|
|
962
|
+
setClipPixelPerfect(pixelPerfect?: boolean): Sprite;
|
|
963
|
+
clip_pixelperfect: boolean | undefined;
|
|
1035
964
|
/**
|
|
1036
|
-
*
|
|
1037
|
-
* @param {
|
|
1038
|
-
* @returns {
|
|
965
|
+
* 设置是否在调整大小时保持比例。
|
|
966
|
+
* @param {boolean} keep - 是否保持比例(默认值:true)
|
|
967
|
+
* @returns {Sprite} 返回当前实例以支持链式调用
|
|
1039
968
|
*/
|
|
1040
|
-
|
|
969
|
+
setKeepRatio(keep?: boolean): Sprite;
|
|
970
|
+
keep_ratio: boolean | undefined;
|
|
1041
971
|
/**
|
|
1042
|
-
*
|
|
1043
|
-
* @param {
|
|
1044
|
-
* @
|
|
1045
|
-
* @returns {Map} - 新的组件集合。
|
|
972
|
+
* 设置是否在调整大小时使用双线性函数。
|
|
973
|
+
* @param {boolean} bilinear - 是否使用双线性函数(默认值:false)
|
|
974
|
+
* @returns {Sprite} 返回当前实例以支持链式调用
|
|
1046
975
|
*/
|
|
1047
|
-
|
|
976
|
+
setBilinear(bilinear?: boolean): Sprite;
|
|
977
|
+
bilinear: boolean | undefined;
|
|
1048
978
|
/**
|
|
1049
|
-
*
|
|
1050
|
-
* @param {
|
|
1051
|
-
* @returns {
|
|
979
|
+
* 设置是否拉伸图像以适应大小。
|
|
980
|
+
* @param {boolean} fill - 是否拉伸图像(默认值:false)
|
|
981
|
+
* @returns {Sprite} 返回当前实例以支持链式调用
|
|
1052
982
|
*/
|
|
1053
|
-
|
|
983
|
+
setFill(fill?: boolean): Sprite;
|
|
984
|
+
fill: boolean | undefined;
|
|
1054
985
|
/**
|
|
1055
|
-
*
|
|
1056
|
-
* @param {
|
|
1057
|
-
* @returns {
|
|
986
|
+
* 设置是否适应宽度。
|
|
987
|
+
* @param {boolean} fit - 是否适应宽度
|
|
988
|
+
* @returns {Sprite} 返回当前实例以支持链式调用
|
|
1058
989
|
*/
|
|
1059
|
-
|
|
990
|
+
setFitToWidth(fit?: boolean): Sprite;
|
|
991
|
+
$fit_to_width: boolean | undefined;
|
|
1060
992
|
/**
|
|
1061
|
-
*
|
|
1062
|
-
* @param {
|
|
1063
|
-
* @
|
|
1064
|
-
* @returns {Map} - 新的组件集合。
|
|
993
|
+
* 设置压缩文件夹路径。
|
|
994
|
+
* @param {string} folder - 压缩文件夹路径
|
|
995
|
+
* @returns {Sprite} 返回当前实例以支持链式调用
|
|
1065
996
|
*/
|
|
1066
|
-
|
|
997
|
+
setZipFolder(folder: string): Sprite;
|
|
998
|
+
zip_folder: string | undefined;
|
|
1067
999
|
/**
|
|
1068
|
-
*
|
|
1069
|
-
* @param {
|
|
1070
|
-
* @returns {
|
|
1000
|
+
* 设置是否以黑白渲染图像。
|
|
1001
|
+
* @param {boolean} grayscale - 是否以黑白渲染图像(默认值:false)
|
|
1002
|
+
* @returns {Sprite} 返回当前实例以支持链式调用
|
|
1071
1003
|
*/
|
|
1072
|
-
|
|
1004
|
+
setGrayscale(grayscale?: boolean): Sprite;
|
|
1005
|
+
grayscale: boolean | undefined;
|
|
1073
1006
|
/**
|
|
1074
|
-
*
|
|
1075
|
-
* @param {
|
|
1076
|
-
* @
|
|
1077
|
-
* @returns {Map} - 新的组件集合。
|
|
1007
|
+
* 设置是否在纹理路径更改时强制重新加载图像。
|
|
1008
|
+
* @param {boolean} force - 是否强制重新加载图像
|
|
1009
|
+
* @returns {Sprite} 返回当前实例以支持链式调用
|
|
1078
1010
|
*/
|
|
1079
|
-
|
|
1011
|
+
setForceTextureReload(force?: boolean): Sprite;
|
|
1012
|
+
force_texture_reload: boolean | undefined;
|
|
1080
1013
|
/**
|
|
1081
|
-
*
|
|
1082
|
-
* @param {
|
|
1083
|
-
* @
|
|
1084
|
-
* @returns {Map} - 新的组件集合。
|
|
1014
|
+
* 设置基础大小。
|
|
1015
|
+
* @param {number[]} size - 基础大小,格式为 [width, height]
|
|
1016
|
+
* @returns {Sprite} 返回当前实例以支持链式调用
|
|
1085
1017
|
*/
|
|
1086
|
-
|
|
1018
|
+
setBaseSize(size: number[]): Sprite;
|
|
1019
|
+
base_size: number[] | undefined;
|
|
1020
|
+
}
|
|
1021
|
+
|
|
1022
|
+
declare class Image extends UIElement {
|
|
1023
|
+
constructor(id: any, template: any);
|
|
1024
|
+
sprite: Sprite;
|
|
1025
|
+
layout: Layout;
|
|
1026
|
+
dataBinding: DataBinding;
|
|
1027
|
+
factory: Factory;
|
|
1028
|
+
setSprite(sprite: any): this;
|
|
1029
|
+
}
|
|
1030
|
+
|
|
1031
|
+
/**
|
|
1032
|
+
* Text 类
|
|
1033
|
+
*
|
|
1034
|
+
* 该类表示一个文本控件,用于管理文本内容及其样式属性。
|
|
1035
|
+
*
|
|
1036
|
+
* 属性:
|
|
1037
|
+
* - text: string - 文本内容(默认值:空字符串)
|
|
1038
|
+
* - color: Vector [r, g, b] - 文本颜色(RGB 值,范围 0.0 到 1.0,默认值:[1.0, 1.0, 1.0])
|
|
1039
|
+
* - locked_color: Vector [r, g, b] - 父级禁用时的文本颜色
|
|
1040
|
+
* - shadow: boolean - 是否显示文本阴影(默认值:false)
|
|
1041
|
+
* - hide_hyphen: boolean - 是否隐藏断词连字符(默认值:false)
|
|
1042
|
+
* - notify_on_ellipses: string[] - 文本出现省略号时需通知的控件名称数组
|
|
1043
|
+
* - enable_profanity_filter: boolean - 是否启用脏话过滤(默认值:false)
|
|
1044
|
+
* - locked_alpha: float - 父级禁用时的透明度
|
|
1045
|
+
* - font_size: enum - 字体大小(可能值:small, normal, large, extra_large,默认值:normal)
|
|
1046
|
+
* - font_scale_factor: float - 字体缩放比例(默认值:1.0)
|
|
1047
|
+
* - localize: boolean - 是否启用本地化翻译(默认值:false)
|
|
1048
|
+
* - line_padding: number - 行间距
|
|
1049
|
+
* - font_type: enum - 字体类型(可能值:default, rune, unicode, smooth, MinecraftTen 或自定义字体,默认值:default)
|
|
1050
|
+
* - backup_font_type: enum - 备用字体类型(默认值:default)
|
|
1051
|
+
* - text_alignment: enum - 文本对齐方式(未定义时根据 anchor_from 和 anchor_to 自动调整)
|
|
1052
|
+
*/
|
|
1053
|
+
declare class Text {
|
|
1087
1054
|
/**
|
|
1088
|
-
*
|
|
1089
|
-
* @param {
|
|
1090
|
-
* @returns {
|
|
1055
|
+
* 设置文本内容。
|
|
1056
|
+
* @param {string} text - 文本内容
|
|
1057
|
+
* @returns {Text} 返回当前实例以支持链式调用
|
|
1091
1058
|
*/
|
|
1092
|
-
|
|
1059
|
+
setText(text?: string): Text;
|
|
1060
|
+
text: string | undefined;
|
|
1093
1061
|
/**
|
|
1094
|
-
*
|
|
1095
|
-
* @param {
|
|
1096
|
-
* @returns {
|
|
1062
|
+
* 设置文本颜色。
|
|
1063
|
+
* @param {number[]} color - RGB 颜色值(格式:[r, g, b],默认值:[1.0, 1.0, 1.0])
|
|
1064
|
+
* @returns {Text} 返回当前实例以支持链式调用
|
|
1097
1065
|
*/
|
|
1098
|
-
|
|
1066
|
+
setColor(color?: number[]): Text;
|
|
1067
|
+
color: number[] | undefined;
|
|
1099
1068
|
/**
|
|
1100
|
-
*
|
|
1101
|
-
* @param {
|
|
1102
|
-
* @
|
|
1103
|
-
* @param {String} onLiquidTouches - 对液体的反应方式。
|
|
1104
|
-
* @param {Array} stopsLiquidFlowingFromDirection - 阻止液体流动的方向。
|
|
1105
|
-
* @returns {Map} - 新的组件集合。
|
|
1069
|
+
* 设置父级禁用时的文本颜色。
|
|
1070
|
+
* @param {number[]} lockedColor - RGB 颜色值(格式:[r, g, b])
|
|
1071
|
+
* @returns {Text} 返回当前实例以支持链式调用
|
|
1106
1072
|
*/
|
|
1107
|
-
|
|
1073
|
+
setLockedColor(lockedColor: number[]): Text;
|
|
1074
|
+
locked_color: number[] | undefined;
|
|
1108
1075
|
/**
|
|
1109
|
-
*
|
|
1110
|
-
* @param {
|
|
1111
|
-
* @returns {
|
|
1076
|
+
* 设置是否显示文本阴影。
|
|
1077
|
+
* @param {boolean} shadow - 是否显示阴影(默认值:false)
|
|
1078
|
+
* @returns {Text} 返回当前实例以支持链式调用
|
|
1112
1079
|
*/
|
|
1113
|
-
|
|
1080
|
+
setShadow(shadow?: boolean): Text;
|
|
1081
|
+
shadow: boolean | undefined;
|
|
1114
1082
|
/**
|
|
1115
|
-
*
|
|
1116
|
-
* @param {
|
|
1117
|
-
* @returns {
|
|
1083
|
+
* 设置是否隐藏断词连字符。
|
|
1084
|
+
* @param {boolean} hide - 是否隐藏连字符(默认值:false)
|
|
1085
|
+
* @returns {Text} 返回当前实例以支持链式调用
|
|
1118
1086
|
*/
|
|
1119
|
-
|
|
1087
|
+
setHideHyphen(hide?: boolean): Text;
|
|
1088
|
+
hide_hyphen: boolean | undefined;
|
|
1120
1089
|
/**
|
|
1121
|
-
*
|
|
1122
|
-
* @param {
|
|
1123
|
-
* @returns {
|
|
1090
|
+
* 设置文本出现省略号时需通知的控件名称数组。
|
|
1091
|
+
* @param {string[]} controls - 控件名称数组
|
|
1092
|
+
* @returns {Text} 返回当前实例以支持链式调用
|
|
1124
1093
|
*/
|
|
1125
|
-
|
|
1094
|
+
setNotifyOnEllipses(controls: string[]): Text;
|
|
1095
|
+
notify_on_ellipses: string[] | undefined;
|
|
1126
1096
|
/**
|
|
1127
|
-
*
|
|
1128
|
-
* @param {
|
|
1129
|
-
* @returns {
|
|
1097
|
+
* 添加一个需通知省略号事件的控件名称。
|
|
1098
|
+
* @param {string} controlName - 控件名称
|
|
1099
|
+
* @returns {Text} 返回当前实例以支持链式调用
|
|
1130
1100
|
*/
|
|
1131
|
-
|
|
1101
|
+
addNotifyOnEllipses(controlName: string): Text;
|
|
1132
1102
|
/**
|
|
1133
|
-
*
|
|
1134
|
-
* @param {
|
|
1135
|
-
* @
|
|
1136
|
-
* @returns {Map} - 新的组件集合。
|
|
1103
|
+
* 设置是否启用脏话过滤。
|
|
1104
|
+
* @param {boolean} enable - 是否启用过滤(默认值:false)
|
|
1105
|
+
* @returns {Text} 返回当前实例以支持链式调用
|
|
1137
1106
|
*/
|
|
1138
|
-
|
|
1107
|
+
setEnableProfanityFilter(enable?: boolean): Text;
|
|
1108
|
+
enable_profanity_filter: boolean | undefined;
|
|
1139
1109
|
/**
|
|
1140
|
-
*
|
|
1141
|
-
* @param {
|
|
1142
|
-
* @returns {
|
|
1110
|
+
* 设置父级禁用时的透明度。
|
|
1111
|
+
* @param {number} alpha - 透明度(范围:0.0 到 1.0)
|
|
1112
|
+
* @returns {Text} 返回当前实例以支持链式调用
|
|
1143
1113
|
*/
|
|
1144
|
-
|
|
1114
|
+
setLockedAlpha(alpha: number): Text;
|
|
1115
|
+
locked_alpha: number | undefined;
|
|
1145
1116
|
/**
|
|
1146
|
-
*
|
|
1147
|
-
* @param {
|
|
1148
|
-
* @
|
|
1149
|
-
* @returns {Map} - 新的组件集合。
|
|
1117
|
+
* 设置字体大小。
|
|
1118
|
+
* @param {string} size - 字体大小(可能值:small, normal, large, extra_large,默认值:normal)
|
|
1119
|
+
* @returns {Text} 返回当前实例以支持链式调用
|
|
1150
1120
|
*/
|
|
1151
|
-
|
|
1121
|
+
setFontSize(size?: string): Text;
|
|
1122
|
+
font_size: string | undefined;
|
|
1152
1123
|
/**
|
|
1153
|
-
*
|
|
1154
|
-
* @param {
|
|
1155
|
-
* @returns {
|
|
1124
|
+
* 设置字体缩放比例。
|
|
1125
|
+
* @param {number} factor - 缩放比例(默认值:1.0)
|
|
1126
|
+
* @returns {Text} 返回当前实例以支持链式调用
|
|
1156
1127
|
*/
|
|
1157
|
-
|
|
1128
|
+
setFontScaleFactor(factor?: number): Text;
|
|
1129
|
+
font_scale_factor: number | undefined;
|
|
1158
1130
|
/**
|
|
1159
|
-
*
|
|
1160
|
-
* @param {
|
|
1161
|
-
* @returns {
|
|
1131
|
+
* 设置是否启用本地化翻译。
|
|
1132
|
+
* @param {boolean} localize - 是否启用本地化(默认值:false)
|
|
1133
|
+
* @returns {Text} 返回当前实例以支持链式调用
|
|
1162
1134
|
*/
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
declare class ItemComponent {
|
|
1135
|
+
setLocalize(localize?: boolean): Text;
|
|
1136
|
+
localize: boolean | undefined;
|
|
1167
1137
|
/**
|
|
1168
|
-
*
|
|
1169
|
-
* @param {number}
|
|
1170
|
-
* @
|
|
1171
|
-
* @param {number} damage_chance_max 损坏最大几率
|
|
1172
|
-
* @returns {ItemComponent}
|
|
1138
|
+
* 设置行间距。
|
|
1139
|
+
* @param {number} padding - 行间距
|
|
1140
|
+
* @returns {Text} 返回当前实例以支持链式调用
|
|
1173
1141
|
*/
|
|
1174
|
-
|
|
1175
|
-
|
|
1142
|
+
setLinePadding(padding: number): Text;
|
|
1143
|
+
line_padding: number | undefined;
|
|
1176
1144
|
/**
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1145
|
+
* 设置字体类型。
|
|
1146
|
+
* @param {string} font - 字体类型(可能值:default, rune, unicode 等,默认值:default)
|
|
1147
|
+
* @returns {Text} 返回当前实例以支持链式调用
|
|
1148
|
+
*/
|
|
1149
|
+
setFontType(font?: string): Text;
|
|
1150
|
+
font_type: string | undefined;
|
|
1182
1151
|
/**
|
|
1183
|
-
*
|
|
1184
|
-
* @param {
|
|
1185
|
-
* @
|
|
1186
|
-
* @param {Number} maxDrawDuration - 最大蓄力时间。
|
|
1187
|
-
* @param {Number} maxLaunchPower - 最大投掷力量。
|
|
1188
|
-
* @param {Number} minDrawDuration - 最小蓄力时间。
|
|
1189
|
-
* @param {Boolean} scalePowerByDrawDuration - 投掷力量是否随蓄力时间增加。
|
|
1190
|
-
* @returns {Map} - 新的组件集合。
|
|
1152
|
+
* 设置备用字体类型。
|
|
1153
|
+
* @param {string} backupFont - 备用字体类型(默认值:default)
|
|
1154
|
+
* @returns {Text} 返回当前实例以支持链式调用
|
|
1191
1155
|
*/
|
|
1192
|
-
|
|
1156
|
+
setBackupFontType(backupFont?: string): Text;
|
|
1157
|
+
backup_font_type: string | undefined;
|
|
1193
1158
|
/**
|
|
1194
|
-
*
|
|
1195
|
-
* @param {
|
|
1196
|
-
* @returns {
|
|
1159
|
+
* 设置文本对齐方式。
|
|
1160
|
+
* @param {string} alignment - 对齐方式(例如:left, right, center)
|
|
1161
|
+
* @returns {Text} 返回当前实例以支持链式调用
|
|
1197
1162
|
*/
|
|
1198
|
-
|
|
1163
|
+
setTextAlignment(alignment: string): Text;
|
|
1164
|
+
text_alignment: string | undefined;
|
|
1165
|
+
}
|
|
1166
|
+
|
|
1167
|
+
declare class Label extends UIElement {
|
|
1168
|
+
constructor(id: any, template: any);
|
|
1169
|
+
text: Text;
|
|
1170
|
+
layout: Layout;
|
|
1171
|
+
dataBinding: DataBinding;
|
|
1172
|
+
factory: Factory;
|
|
1173
|
+
setLayout(layout: any): this;
|
|
1174
|
+
setText(text: any): this;
|
|
1175
|
+
}
|
|
1176
|
+
|
|
1177
|
+
declare class Panel extends UIElement {
|
|
1199
1178
|
/**
|
|
1200
|
-
*
|
|
1201
|
-
* @param {
|
|
1202
|
-
* @param {
|
|
1203
|
-
* @param {Number} saturationModifier - 饱和度修正值。
|
|
1204
|
-
* @param {String} [usingConvertsTo] - 食用后转换的目标物品。
|
|
1205
|
-
* @returns {Map} - 新的组件集合。
|
|
1179
|
+
*
|
|
1180
|
+
* @param {*} id
|
|
1181
|
+
* @param {*} [template]
|
|
1206
1182
|
*/
|
|
1207
|
-
|
|
1183
|
+
constructor(id: any, template?: any);
|
|
1184
|
+
layout: Layout;
|
|
1185
|
+
dataBinding: DataBinding;
|
|
1186
|
+
factory: Factory;
|
|
1187
|
+
setLayout(layout: any): this;
|
|
1188
|
+
}
|
|
1189
|
+
|
|
1190
|
+
/**
|
|
1191
|
+
* ScrollView 类
|
|
1192
|
+
*
|
|
1193
|
+
* 该类表示一个滚动视图控件,用于管理滚动行为及其相关属性。
|
|
1194
|
+
*
|
|
1195
|
+
* 属性:
|
|
1196
|
+
* - scrollbar_track_button: string - 滚动条轨道按钮的 ID
|
|
1197
|
+
* - scrollbar_touch_button: string - 滚动条触摸按钮的 ID
|
|
1198
|
+
* - scroll_speed: number - 滚动速度
|
|
1199
|
+
* - gesture_control_enabled: boolean - 是否启用手势控制
|
|
1200
|
+
* - always_handle_scrolling: boolean - 是否始终处理滚动
|
|
1201
|
+
* - touch_mode: boolean - 是否启用触摸模式
|
|
1202
|
+
* - scrollbar_box: string - 滚动条滑块子元素的名称
|
|
1203
|
+
* - scrollbar_track: string - 滚动条轨道子元素的名称
|
|
1204
|
+
* - scroll_view_port: string - 视口子元素的名称
|
|
1205
|
+
* - scroll_content: string - 内容根父元素的名称
|
|
1206
|
+
* - scroll_box_and_track_panel: string - 包含滚动条滑块和轨道的子元素名称
|
|
1207
|
+
* - jump_to_bottom_on_update: boolean - 是否在更新时跳转到底部
|
|
1208
|
+
*/
|
|
1209
|
+
declare class ScrollView {
|
|
1208
1210
|
/**
|
|
1209
|
-
*
|
|
1210
|
-
* @param {
|
|
1211
|
-
* @returns {
|
|
1211
|
+
* 设置滚动条轨道按钮的 ID。
|
|
1212
|
+
* @param {string} buttonId - 滚动条轨道按钮的 ID
|
|
1213
|
+
* @returns {ScrollView} 返回当前实例以支持链式调用
|
|
1212
1214
|
*/
|
|
1213
|
-
|
|
1215
|
+
setScrollbarTrackButton(buttonId: string): ScrollView;
|
|
1216
|
+
scrollbar_track_button: string | undefined;
|
|
1214
1217
|
/**
|
|
1215
|
-
*
|
|
1216
|
-
* @param {
|
|
1217
|
-
* @returns {
|
|
1218
|
+
* 设置滚动条触摸按钮的 ID。
|
|
1219
|
+
* @param {string} buttonId - 滚动条触摸按钮的 ID
|
|
1220
|
+
* @returns {ScrollView} 返回当前实例以支持链式调用
|
|
1218
1221
|
*/
|
|
1219
|
-
|
|
1222
|
+
setScrollbarTouchButton(buttonId: string): ScrollView;
|
|
1223
|
+
scrollbar_touch_button: string | undefined;
|
|
1220
1224
|
/**
|
|
1221
|
-
*
|
|
1222
|
-
* @param {
|
|
1223
|
-
* @returns {
|
|
1225
|
+
* 设置滚动速度。
|
|
1226
|
+
* @param {number} speed - 滚动速度
|
|
1227
|
+
* @returns {ScrollView} 返回当前实例以支持链式调用
|
|
1224
1228
|
*/
|
|
1225
|
-
|
|
1229
|
+
setScrollSpeed(speed: number): ScrollView;
|
|
1230
|
+
scroll_speed: number | undefined;
|
|
1226
1231
|
/**
|
|
1227
|
-
*
|
|
1228
|
-
* @param {
|
|
1229
|
-
* @returns {
|
|
1232
|
+
* 设置是否启用手势控制。
|
|
1233
|
+
* @param {boolean} enabled - 是否启用手势控制(默认值:false)
|
|
1234
|
+
* @returns {ScrollView} 返回当前实例以支持链式调用
|
|
1230
1235
|
*/
|
|
1231
|
-
|
|
1236
|
+
setGestureControlEnabled(enabled?: boolean): ScrollView;
|
|
1237
|
+
gesture_control_enabled: boolean | undefined;
|
|
1232
1238
|
/**
|
|
1233
|
-
*
|
|
1234
|
-
* @param {
|
|
1235
|
-
* @returns {
|
|
1239
|
+
* 设置是否始终处理滚动。
|
|
1240
|
+
* @param {boolean} alwaysHandle - 是否始终处理滚动(默认值:false)
|
|
1241
|
+
* @returns {ScrollView} 返回当前实例以支持链式调用
|
|
1236
1242
|
*/
|
|
1237
|
-
|
|
1243
|
+
setAlwaysHandleScrolling(alwaysHandle?: boolean): ScrollView;
|
|
1244
|
+
always_handle_scrolling: boolean | undefined;
|
|
1238
1245
|
/**
|
|
1239
|
-
*
|
|
1240
|
-
* @param {
|
|
1241
|
-
* @
|
|
1242
|
-
* @returns {Map} - 新的组件集合。
|
|
1246
|
+
* 设置是否启用触摸模式。
|
|
1247
|
+
* @param {boolean} touchMode - 是否启用触摸模式(默认值:false)
|
|
1248
|
+
* @returns {ScrollView} 返回当前实例以支持链式调用
|
|
1243
1249
|
*/
|
|
1244
|
-
|
|
1250
|
+
setTouchMode(touchMode?: boolean): ScrollView;
|
|
1251
|
+
touch_mode: boolean | undefined;
|
|
1245
1252
|
/**
|
|
1246
|
-
*
|
|
1247
|
-
* @param {
|
|
1248
|
-
* @
|
|
1249
|
-
* @returns {Map} - 新的组件集合。
|
|
1253
|
+
* 设置滚动条滑块子元素的名称。
|
|
1254
|
+
* @param {string} boxName - 滚动条滑块子元素的名称
|
|
1255
|
+
* @returns {ScrollView} 返回当前实例以支持链式调用
|
|
1250
1256
|
*/
|
|
1251
|
-
|
|
1257
|
+
setScrollbarBox(boxName: string): ScrollView;
|
|
1258
|
+
scrollbar_box: string | undefined;
|
|
1252
1259
|
/**
|
|
1253
|
-
*
|
|
1254
|
-
* @param {
|
|
1255
|
-
* @
|
|
1256
|
-
* @returns {Map} - 新的组件集合。
|
|
1260
|
+
* 设置滚动条轨道子元素的名称。
|
|
1261
|
+
* @param {string} trackName - 滚动条轨道子元素的名称
|
|
1262
|
+
* @returns {ScrollView} 返回当前实例以支持链式调用
|
|
1257
1263
|
*/
|
|
1258
|
-
|
|
1264
|
+
setScrollbarTrack(trackName: string): ScrollView;
|
|
1265
|
+
scrollbar_track: string | undefined;
|
|
1259
1266
|
/**
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1267
|
+
* 设置视口子元素的名称。
|
|
1268
|
+
* @param {string} viewPortName - 视口子元素的名称
|
|
1269
|
+
* @returns {ScrollView} 返回当前实例以支持链式调用
|
|
1270
|
+
*/
|
|
1271
|
+
setScrollViewPort(viewPortName: string): ScrollView;
|
|
1272
|
+
scroll_view_port: string | undefined;
|
|
1266
1273
|
/**
|
|
1267
|
-
*
|
|
1268
|
-
* @param {
|
|
1269
|
-
* @returns {
|
|
1274
|
+
* 设置内容根父元素的名称。
|
|
1275
|
+
* @param {string} contentName - 内容根父元素的名称
|
|
1276
|
+
* @returns {ScrollView} 返回当前实例以支持链式调用
|
|
1270
1277
|
*/
|
|
1271
|
-
|
|
1278
|
+
setScrollContent(contentName: string): ScrollView;
|
|
1279
|
+
scroll_content: string | undefined;
|
|
1272
1280
|
/**
|
|
1273
|
-
*
|
|
1274
|
-
* @param {
|
|
1275
|
-
* @returns {
|
|
1281
|
+
* 设置包含滚动条滑块和轨道的子元素名称。
|
|
1282
|
+
* @param {string} panelName - 包含滚动条滑块和轨道的子元素名称
|
|
1283
|
+
* @returns {ScrollView} 返回当前实例以支持链式调用
|
|
1276
1284
|
*/
|
|
1277
|
-
|
|
1285
|
+
setScrollBoxAndTrackPanel(panelName: string): ScrollView;
|
|
1286
|
+
scroll_box_and_track_panel: string | undefined;
|
|
1287
|
+
/**
|
|
1288
|
+
* 设置是否在更新时跳转到底部。
|
|
1289
|
+
* @param {boolean} jump - 是否在更新时跳转到底部(默认值:false)
|
|
1290
|
+
* @returns {ScrollView} 返回当前实例以支持链式调用
|
|
1291
|
+
*/
|
|
1292
|
+
setJumpToBottomOnUpdate(jump?: boolean): ScrollView;
|
|
1293
|
+
jump_to_bottom_on_update: boolean | undefined;
|
|
1278
1294
|
}
|
|
1279
1295
|
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1296
|
+
declare class ScrollingPanel extends UIElement {
|
|
1297
|
+
constructor(id: any, template: any);
|
|
1298
|
+
input: Input;
|
|
1299
|
+
scrollView: ScrollView;
|
|
1300
|
+
layout: Layout;
|
|
1301
|
+
dataBinding: DataBinding;
|
|
1302
|
+
factory: Factory;
|
|
1303
|
+
}
|
|
1304
|
+
|
|
1305
|
+
declare class StackPanel extends Panel {
|
|
1306
|
+
constructor(id: any, template: any);
|
|
1307
|
+
type: string;
|
|
1308
|
+
orientation: string;
|
|
1309
|
+
stackNum: number;
|
|
1310
|
+
addStack(size: any, content: any, debug?: boolean): this;
|
|
1311
|
+
/**
|
|
1312
|
+
* Possible values:
|
|
1313
|
+
vertical
|
|
1314
|
+
horizontal
|
|
1315
|
+
* @param {*} orientation
|
|
1316
|
+
*/
|
|
1317
|
+
setOrientation(orientation: any): this;
|
|
1318
|
+
}
|
|
1319
|
+
|
|
1320
|
+
declare class UISystem {
|
|
1321
|
+
constructor(identifier: any, path: any);
|
|
1322
|
+
identifier: any;
|
|
1323
|
+
namespace: any;
|
|
1324
|
+
name: any;
|
|
1325
|
+
path: any;
|
|
1326
|
+
elements: Map<any, any>;
|
|
1327
|
+
animations: Map<any, any>;
|
|
1328
|
+
addElement(element: any): this;
|
|
1329
|
+
getElement(element_name: any): any;
|
|
1330
|
+
addAnimation(name: any, value: any): void;
|
|
1331
|
+
getAnimation(animation_name: any): any;
|
|
1332
|
+
toObject(): {
|
|
1333
|
+
namespace: any;
|
|
1334
|
+
};
|
|
1335
|
+
}
|
|
1336
|
+
|
|
1337
|
+
declare class ChestUISystem {
|
|
1338
|
+
static chest_screen: UISystem;
|
|
1339
|
+
static registerContainerUI(new_container_title: any, ui_system_root_panel: any): void;
|
|
1340
|
+
}
|
|
1341
|
+
|
|
1342
|
+
/**
|
|
1343
|
+
* 自定义容器 UI 系统类,用于创建和管理容器界面。
|
|
1344
|
+
* 支持动态添加网格项、设置标题、调整尺寸等功能。
|
|
1308
1345
|
*/
|
|
1346
|
+
declare class ContainerUISystem {
|
|
1347
|
+
/**
|
|
1348
|
+
* 构造函数,初始化容器 UI 系统。
|
|
1349
|
+
* @param {string} identifier - 容器的唯一标识符。
|
|
1350
|
+
* @param {string} path - 资源路径。
|
|
1351
|
+
*/
|
|
1352
|
+
constructor(identifier: string, path: string);
|
|
1353
|
+
system: UISystem;
|
|
1354
|
+
title: string;
|
|
1355
|
+
root_panel_size: number[];
|
|
1356
|
+
gridDimension: number[];
|
|
1357
|
+
output_grids: any[];
|
|
1358
|
+
main_panel: Panel;
|
|
1359
|
+
grids: Grid;
|
|
1360
|
+
setInputGrid(output_arr: any): void;
|
|
1361
|
+
/**
|
|
1362
|
+
* 向网格中添加一个网格项。
|
|
1363
|
+
* @param {number[]} grid_position - 网格项的位置 [行, 列] 用于定位实体的背包槽。
|
|
1364
|
+
* @param {number[]} offset - 网格项的偏移量 [x, y]。
|
|
1365
|
+
* @param {Object} [options] - 可选参数,用于配置网格项。
|
|
1366
|
+
* @param {boolean} [options.enable=true] - 是否启用该网格项,默认为 true。
|
|
1367
|
+
* @param {number[]} [options.size] - 网格项的大小 [宽度, 高度]。
|
|
1368
|
+
* @param {UIElement[]} [options.background_images] - 网格项的背景图片控件。
|
|
1369
|
+
* @returns {ContainerUISystem} 返回当前实例以支持链式调用。
|
|
1370
|
+
*/
|
|
1371
|
+
addGridItem(grid_position: number[], offset: number[], options?: {
|
|
1372
|
+
enable?: boolean | undefined;
|
|
1373
|
+
size?: number[] | undefined;
|
|
1374
|
+
background_images?: UIElement[] | undefined;
|
|
1375
|
+
}): ContainerUISystem;
|
|
1376
|
+
addInputGrid(grid_position: any, offset: any, options: any): void;
|
|
1377
|
+
addOutputGrid(grid_position: any, offset: any, options: any): void;
|
|
1378
|
+
/**
|
|
1379
|
+
* 向主面板中添加一个 UI 元素。
|
|
1380
|
+
* @param {Object} element - 要添加的 UI 元素。
|
|
1381
|
+
* @returns {ContainerUISystem} 返回当前实例以支持链式调用。
|
|
1382
|
+
*/
|
|
1383
|
+
addElementToMain(element: Object): ContainerUISystem;
|
|
1384
|
+
/**
|
|
1385
|
+
* 设置网格的维度(行和列)。
|
|
1386
|
+
* @param {number[]} dimension - 网格的维度 [行数, 列数]。
|
|
1387
|
+
* @returns {ContainerUISystem} 返回当前实例以支持链式调用。
|
|
1388
|
+
*/
|
|
1389
|
+
setGridDimension(dimension: number[]): ContainerUISystem;
|
|
1390
|
+
/**
|
|
1391
|
+
* 设置容器的标题。
|
|
1392
|
+
* @param {string} title - 容器的标题。
|
|
1393
|
+
* @returns {ContainerUISystem} 返回当前实例以支持链式调用。
|
|
1394
|
+
*/
|
|
1395
|
+
setTitle(title: string): ContainerUISystem;
|
|
1396
|
+
/**
|
|
1397
|
+
* 设置根面板的尺寸。
|
|
1398
|
+
* @param {number[]} size - 根面板的尺寸 [宽度, 高度]。
|
|
1399
|
+
* @returns {ContainerUISystem} 返回当前实例以支持链式调用。
|
|
1400
|
+
*/
|
|
1401
|
+
setSize(size: number[]): ContainerUISystem;
|
|
1402
|
+
setItemMatrix(n: any, matrix: any): void;
|
|
1403
|
+
#private;
|
|
1404
|
+
}
|
|
1405
|
+
|
|
1406
|
+
declare const ServerFormSystem: UISystem;
|
|
1407
|
+
declare const form_button_panel: Panel;
|
|
1408
|
+
declare class ServerUISystem {
|
|
1409
|
+
static "__#1053@#binding_map": Map<any, any>;
|
|
1410
|
+
static "__#1053@#binding_title_list": any[];
|
|
1411
|
+
static addBindingTitle(title_name: any): void;
|
|
1412
|
+
static getBindingTitleList(): any[];
|
|
1413
|
+
static getBindingContentList(): any[];
|
|
1414
|
+
static bindingTitlewithContent(title_name: any, content: any): void;
|
|
1415
|
+
static "__#1053@#updateServerFormSystem"(): void;
|
|
1416
|
+
}
|
|
1417
|
+
|
|
1418
|
+
declare class Guidebook {
|
|
1419
|
+
constructor(identifier: any, path: any);
|
|
1420
|
+
system: UISystem;
|
|
1421
|
+
addPageBinding(page_name: any, left_control_name: any, right_control_name: any): this;
|
|
1422
|
+
addPage(page_name: any, left_control: any, right_control: any): this;
|
|
1423
|
+
addElement(element: any): this;
|
|
1424
|
+
#private;
|
|
1425
|
+
}
|
|
1426
|
+
|
|
1309
1427
|
/**
|
|
1310
|
-
*
|
|
1428
|
+
* ButtonMapping 类
|
|
1311
1429
|
*
|
|
1312
|
-
*
|
|
1430
|
+
* 该类表示按钮映射配置,用于定义输入事件的映射关系。
|
|
1313
1431
|
*
|
|
1314
1432
|
* 属性:
|
|
1315
|
-
* -
|
|
1316
|
-
* -
|
|
1317
|
-
* -
|
|
1318
|
-
* -
|
|
1319
|
-
* -
|
|
1320
|
-
* -
|
|
1321
|
-
* -
|
|
1322
|
-
* -
|
|
1323
|
-
* -
|
|
1324
|
-
* -
|
|
1325
|
-
* -
|
|
1326
|
-
* - selected: boolean - 文本框是否默认被选中
|
|
1327
|
-
* - use_child_anchors: boolean - 是否使用 UI 元素子元素的 anchor_from 和 anchor_to(默认值:false)
|
|
1328
|
-
* - controls: array - 用于向元素添加子元素
|
|
1329
|
-
* - anims: string[] - 动画名称数组
|
|
1330
|
-
* - disable_anim_fast_forward: boolean - 是否禁用动画快进
|
|
1331
|
-
* - animation_reset_name: string - 重置动画的名称
|
|
1332
|
-
* - ignored: boolean - 是否忽略该 UI 元素(默认值:false)
|
|
1333
|
-
* - variables: array 或 object - 一组条件,用于更改变量的值
|
|
1334
|
-
* - modifications: array - 允许修改资源包中的 UI 文件(最底层为原版资源包)
|
|
1335
|
-
* - grid_position: Vector [row, column] - 控件在网格中的位置。此属性还允许修改硬编码网格中的特定网格项
|
|
1336
|
-
* - collection_index: int - 控件在集合中的索引
|
|
1433
|
+
* - ignored: boolean - 是否忽略映射(默认值:false)
|
|
1434
|
+
* - from_button_id: string - 触发事件的按钮 ID
|
|
1435
|
+
* - to_button_id: string - 事件触发时执行的按钮 ID
|
|
1436
|
+
* - mapping_type: enum - 映射类型(可能值:global, pressed, double_pressed, focused)
|
|
1437
|
+
* - scope: enum - 映射范围(可能值:view, controller)
|
|
1438
|
+
* - input_mode_condition: enum - 输入模式条件(可能值:not_gaze, not_gamepad, gamepad_and_not_gaze)
|
|
1439
|
+
* - ignore_input_scope: boolean - 是否忽略输入范围
|
|
1440
|
+
* - consume_event: boolean - 是否消耗事件
|
|
1441
|
+
* - handle_select: boolean - 是否处理选择事件
|
|
1442
|
+
* - handle_deselect: boolean - 是否处理取消选择事件
|
|
1443
|
+
* - button_up_right_of_first_refusal: boolean - 是否在首次拒绝后处理按钮释放事件
|
|
1337
1444
|
*/
|
|
1338
|
-
declare class
|
|
1445
|
+
declare class ButtonMapping$1 {
|
|
1446
|
+
ignored: boolean;
|
|
1447
|
+
from_button_id: string;
|
|
1448
|
+
to_button_id: string;
|
|
1449
|
+
mapping_type: string | null;
|
|
1450
|
+
scope: string | null;
|
|
1451
|
+
input_mode_condition: string | null;
|
|
1452
|
+
ignore_input_scope: boolean;
|
|
1453
|
+
consume_event: boolean;
|
|
1454
|
+
handle_select: boolean;
|
|
1455
|
+
handle_deselect: boolean;
|
|
1456
|
+
button_up_right_of_first_refusal: boolean;
|
|
1339
1457
|
/**
|
|
1340
|
-
*
|
|
1341
|
-
* @param {boolean}
|
|
1342
|
-
* @returns {
|
|
1458
|
+
* 设置是否忽略映射。
|
|
1459
|
+
* @param {boolean} ignored - 是否忽略映射(默认值:false)
|
|
1460
|
+
* @returns {ButtonMapping} 返回当前实例以支持链式调用
|
|
1343
1461
|
*/
|
|
1344
|
-
|
|
1345
|
-
visible: boolean | undefined;
|
|
1462
|
+
setIgnored(ignored?: boolean): ButtonMapping$1;
|
|
1346
1463
|
/**
|
|
1347
|
-
*
|
|
1348
|
-
* @param {
|
|
1349
|
-
* @returns {
|
|
1464
|
+
* 设置触发事件的按钮 ID。
|
|
1465
|
+
* @param {string} fromButtonId - 触发事件的按钮 ID
|
|
1466
|
+
* @returns {ButtonMapping} 返回当前实例以支持链式调用
|
|
1350
1467
|
*/
|
|
1351
|
-
|
|
1352
|
-
enabled: boolean | undefined;
|
|
1468
|
+
setFromButtonId(fromButtonId: string): ButtonMapping$1;
|
|
1353
1469
|
/**
|
|
1354
|
-
*
|
|
1355
|
-
* @param {
|
|
1356
|
-
* @returns {
|
|
1470
|
+
* 设置事件触发时执行的按钮 ID。
|
|
1471
|
+
* @param {string} toButtonId - 事件触发时执行的按钮 ID
|
|
1472
|
+
* @returns {ButtonMapping} 返回当前实例以支持链式调用
|
|
1357
1473
|
*/
|
|
1358
|
-
|
|
1359
|
-
layer: number | undefined;
|
|
1474
|
+
setToButtonId(toButtonId: string): ButtonMapping$1;
|
|
1360
1475
|
/**
|
|
1361
|
-
*
|
|
1362
|
-
* @param {
|
|
1363
|
-
* @returns {
|
|
1476
|
+
* 设置映射类型。
|
|
1477
|
+
* @param {string} mappingType - 映射类型(可能值:global, pressed, double_pressed, focused)
|
|
1478
|
+
* @returns {ButtonMapping} 返回当前实例以支持链式调用
|
|
1364
1479
|
*/
|
|
1365
|
-
|
|
1366
|
-
|
|
1480
|
+
setMappingType(mappingType: string): ButtonMapping$1;
|
|
1481
|
+
/**
|
|
1482
|
+
* 设置映射范围。
|
|
1483
|
+
* @param {string} scope - 映射范围(可能值:view, controller)
|
|
1484
|
+
* @returns {ButtonMapping} 返回当前实例以支持链式调用
|
|
1485
|
+
*/
|
|
1486
|
+
setScope(scope: string): ButtonMapping$1;
|
|
1487
|
+
/**
|
|
1488
|
+
* 设置输入模式条件。
|
|
1489
|
+
* @param {string} condition - 输入模式条件(可能值:not_gaze, not_gamepad, gamepad_and_not_gaze)
|
|
1490
|
+
* @returns {ButtonMapping} 返回当前实例以支持链式调用
|
|
1491
|
+
*/
|
|
1492
|
+
setInputModeCondition(condition: string): ButtonMapping$1;
|
|
1493
|
+
/**
|
|
1494
|
+
* 设置是否忽略输入范围。
|
|
1495
|
+
* @param {boolean} ignore - 是否忽略输入范围
|
|
1496
|
+
* @returns {ButtonMapping} 返回当前实例以支持链式调用
|
|
1497
|
+
*/
|
|
1498
|
+
setIgnoreInputScope(ignore?: boolean): ButtonMapping$1;
|
|
1499
|
+
/**
|
|
1500
|
+
* 设置是否消耗事件。
|
|
1501
|
+
* @param {boolean} consume - 是否消耗事件
|
|
1502
|
+
* @returns {ButtonMapping} 返回当前实例以支持链式调用
|
|
1503
|
+
*/
|
|
1504
|
+
setConsumeEvent(consume?: boolean): ButtonMapping$1;
|
|
1505
|
+
/**
|
|
1506
|
+
* 设置是否处理选择事件。
|
|
1507
|
+
* @param {boolean} handle - 是否处理选择事件
|
|
1508
|
+
* @returns {ButtonMapping} 返回当前实例以支持链式调用
|
|
1509
|
+
*/
|
|
1510
|
+
setHandleSelect(handle?: boolean): ButtonMapping$1;
|
|
1511
|
+
/**
|
|
1512
|
+
* 设置是否处理取消选择事件。
|
|
1513
|
+
* @param {boolean} handle - 是否处理取消选择事件
|
|
1514
|
+
* @returns {ButtonMapping} 返回当前实例以支持链式调用
|
|
1515
|
+
*/
|
|
1516
|
+
setHandleDeselect(handle?: boolean): ButtonMapping$1;
|
|
1517
|
+
/**
|
|
1518
|
+
* 设置是否在首次拒绝后处理按钮释放事件。
|
|
1519
|
+
* @param {boolean} handle - 是否处理按钮释放事件
|
|
1520
|
+
* @returns {ButtonMapping} 返回当前实例以支持链式调用
|
|
1521
|
+
*/
|
|
1522
|
+
setButtonUpRightOfFirstRefusal(handle?: boolean): ButtonMapping$1;
|
|
1523
|
+
}
|
|
1524
|
+
|
|
1525
|
+
/**
|
|
1526
|
+
* DataBinding 类
|
|
1527
|
+
*
|
|
1528
|
+
* 该类表示数据绑定配置,用于将硬编码值或变量绑定到元素属性。
|
|
1529
|
+
*
|
|
1530
|
+
* 属性:
|
|
1531
|
+
* - ignored: boolean - 是否忽略绑定(默认值:false)
|
|
1532
|
+
* - binding_type: enum - 绑定类型(可能值:global, view, collection, collection_details, none)
|
|
1533
|
+
* - binding_name: string - 数据绑定名称或条件的值
|
|
1534
|
+
* - binding_name_override: string - 应用 binding_name 值的 UI 元素属性名称
|
|
1535
|
+
* - binding_collection_name: string - 要使用的集合名称
|
|
1536
|
+
* - binding_collection_prefix: string - 集合前缀
|
|
1537
|
+
* - binding_condition: enum - 数据绑定的条件(可能值:always, always_when_visible, visible, once, none, visibility_changed)
|
|
1538
|
+
* - source_control_name: string - 要观察其属性值的 UI 元素名称
|
|
1539
|
+
* - source_property_name: string - 存储 source_control_name 引用的 UI 元素的属性值
|
|
1540
|
+
* - target_property_name: string - 应用 source_property_name 值的 UI 元素属性
|
|
1541
|
+
* - resolve_sibling_scope: boolean - 是否允许选择同级元素而非子元素(默认值:false)
|
|
1542
|
+
*/
|
|
1543
|
+
declare class DataBindingObject {
|
|
1544
|
+
/**
|
|
1545
|
+
* 设置是否忽略绑定。
|
|
1546
|
+
* @param {boolean} ignored - 是否忽略绑定(默认值:false)
|
|
1547
|
+
* @returns {DataBindingObject} 返回当前实例以支持链式调用
|
|
1548
|
+
*/
|
|
1549
|
+
setIgnored(ignored?: boolean): DataBindingObject;
|
|
1550
|
+
ignored: boolean | undefined;
|
|
1551
|
+
/**
|
|
1552
|
+
* 设置绑定类型。
|
|
1553
|
+
* @param {string} type - 绑定类型(可能值:global, view, collection, collection_details, none)
|
|
1554
|
+
* @returns {DataBindingObject} 返回当前实例以支持链式调用
|
|
1555
|
+
*/
|
|
1556
|
+
setBindingType(type: string): DataBindingObject;
|
|
1557
|
+
binding_type: string | undefined;
|
|
1558
|
+
/**
|
|
1559
|
+
* 设置数据绑定名称或条件的值。
|
|
1560
|
+
* @param {string} name - 数据绑定名称或条件的值
|
|
1561
|
+
* @returns {DataBindingObject} 返回当前实例以支持链式调用
|
|
1562
|
+
*/
|
|
1563
|
+
setBindingName(name: string): DataBindingObject;
|
|
1564
|
+
binding_name: string | undefined;
|
|
1565
|
+
/**
|
|
1566
|
+
* 设置应用 binding_name 值的 UI 元素属性名称。
|
|
1567
|
+
* @param {string} nameOverride - 应用 binding_name 值的 UI 元素属性名称
|
|
1568
|
+
* @returns {DataBindingObject} 返回当前实例以支持链式调用
|
|
1569
|
+
*/
|
|
1570
|
+
setBindingNameOverride(nameOverride: string): DataBindingObject;
|
|
1571
|
+
binding_name_override: string | undefined;
|
|
1572
|
+
/**
|
|
1573
|
+
* 设置要使用的集合名称。
|
|
1574
|
+
* @param {string} collectionName - 集合名称
|
|
1575
|
+
* @returns {DataBindingObject} 返回当前实例以支持链式调用
|
|
1576
|
+
*/
|
|
1577
|
+
setBindingCollectionName(collectionName: string): DataBindingObject;
|
|
1578
|
+
binding_collection_name: string | undefined;
|
|
1579
|
+
/**
|
|
1580
|
+
* 设置集合前缀。
|
|
1581
|
+
* @param {string} prefix - 集合前缀
|
|
1582
|
+
* @returns {DataBindingObject} 返回当前实例以支持链式调用
|
|
1583
|
+
*/
|
|
1584
|
+
setBindingCollectionPrefix(prefix: string): DataBindingObject;
|
|
1585
|
+
binding_collection_prefix: string | undefined;
|
|
1586
|
+
/**
|
|
1587
|
+
* 设置数据绑定的条件。
|
|
1588
|
+
* @param {string} condition - 数据绑定的条件(可能值:always, always_when_visible, visible, once, none, visibility_changed)
|
|
1589
|
+
* @returns {DataBindingObject} 返回当前实例以支持链式调用
|
|
1590
|
+
*/
|
|
1591
|
+
setBindingCondition(condition: string): DataBindingObject;
|
|
1592
|
+
binding_condition: string | undefined;
|
|
1593
|
+
/**
|
|
1594
|
+
* 设置要观察其属性值的 UI 元素名称。
|
|
1595
|
+
* @param {string} controlName - UI 元素名称
|
|
1596
|
+
* @returns {DataBindingObject} 返回当前实例以支持链式调用
|
|
1597
|
+
*/
|
|
1598
|
+
setSourceControlName(controlName: string): DataBindingObject;
|
|
1599
|
+
source_control_name: string | undefined;
|
|
1600
|
+
/**
|
|
1601
|
+
* 设置存储 source_control_name 引用的 UI 元素的属性值。
|
|
1602
|
+
* @param {string} propertyName - 属性名称
|
|
1603
|
+
* @returns {DataBindingObject} 返回当前实例以支持链式调用
|
|
1604
|
+
*/
|
|
1605
|
+
setSourcePropertyName(propertyName: string): DataBindingObject;
|
|
1606
|
+
source_property_name: string | undefined;
|
|
1607
|
+
/**
|
|
1608
|
+
* 设置应用 source_property_name 值的 UI 元素属性。
|
|
1609
|
+
* @param {string} propertyName - 属性名称
|
|
1610
|
+
* @returns {DataBindingObject} 返回当前实例以支持链式调用
|
|
1611
|
+
*/
|
|
1612
|
+
setTargetPropertyName(propertyName: string): DataBindingObject;
|
|
1613
|
+
target_property_name: string | undefined;
|
|
1614
|
+
/**
|
|
1615
|
+
* 设置是否允许选择同级元素而非子元素。
|
|
1616
|
+
* @param {boolean} resolve - 是否允许选择同级元素(默认值:false)
|
|
1617
|
+
* @returns {DataBindingObject} 返回当前实例以支持链式调用
|
|
1618
|
+
*/
|
|
1619
|
+
setResolveSiblingScope(resolve?: boolean): DataBindingObject;
|
|
1620
|
+
resolve_sibling_scope: boolean | undefined;
|
|
1621
|
+
}
|
|
1622
|
+
|
|
1623
|
+
declare class UISystemRegistry {
|
|
1624
|
+
static "__#1050@#ui_system_map": {};
|
|
1625
|
+
static "__#1050@#ui_def_list": any[];
|
|
1626
|
+
static registerUISystem(ui_system: any): void;
|
|
1627
|
+
static addOuterUIdefs(ui_defs: any): void;
|
|
1628
|
+
static submit(): void;
|
|
1629
|
+
}
|
|
1630
|
+
declare class UISystemRegistryServer {
|
|
1631
|
+
static "__#1051@#ui_system_map": {};
|
|
1632
|
+
static "__#1051@#ui_def_list": any[];
|
|
1633
|
+
static getUISystemList(): any[];
|
|
1634
|
+
static getUIdefList(): any[];
|
|
1635
|
+
static startServer(): void;
|
|
1636
|
+
}
|
|
1637
|
+
|
|
1638
|
+
declare namespace registry {
|
|
1639
|
+
function submit(): void;
|
|
1640
|
+
}
|
|
1641
|
+
|
|
1642
|
+
declare class Item {
|
|
1643
|
+
/**
|
|
1644
|
+
* 物品类
|
|
1645
|
+
* @param {string} identifier 物品唯一标识符
|
|
1646
|
+
* @param {string} category 菜单栏分类 可选:"construction", "nature", "equipment", "items", and "none"
|
|
1647
|
+
* @param {string} texture 物品纹理
|
|
1648
|
+
* @param {Object} options 可选参数
|
|
1649
|
+
* @param {string} options.group 分组
|
|
1650
|
+
* @param {boolean} options.hide_in_command 是否在命令中隐藏,默认为 false
|
|
1651
|
+
*/
|
|
1652
|
+
constructor(identifier: string, category: string, texture: string, options?: {
|
|
1653
|
+
group: string;
|
|
1654
|
+
hide_in_command: boolean;
|
|
1655
|
+
});
|
|
1656
|
+
identifier: string;
|
|
1657
|
+
category: string;
|
|
1658
|
+
texture: string;
|
|
1659
|
+
group: string;
|
|
1660
|
+
hide_in_command: boolean;
|
|
1661
|
+
components: Map<any, any>;
|
|
1662
|
+
/**
|
|
1663
|
+
* 添加组件
|
|
1664
|
+
* @param {Map} componentMap 组件 Map
|
|
1665
|
+
*/
|
|
1666
|
+
addComponent(componentMap: Map<any, any>): this;
|
|
1667
|
+
/**
|
|
1668
|
+
* 移除组件
|
|
1669
|
+
* @param {string} key 组件名称
|
|
1670
|
+
*/
|
|
1671
|
+
removeComponent(key: string): this;
|
|
1672
|
+
/**
|
|
1673
|
+
* 将物品转换为 JSON 格式
|
|
1674
|
+
* @returns {Object} JSON 格式的物品对象
|
|
1675
|
+
*/
|
|
1676
|
+
toObject(): Object;
|
|
1677
|
+
}
|
|
1678
|
+
|
|
1679
|
+
declare class Food extends Item {
|
|
1680
|
+
/**
|
|
1681
|
+
* 物品类
|
|
1682
|
+
* @param {string} identifier 物品唯一标识符
|
|
1683
|
+
* @param {string} category 菜单栏分类 可选:"construction", "nature", "equipment", "items", and "none"
|
|
1684
|
+
* @param {string} texture 物品纹理
|
|
1685
|
+
* @param {Object} options 可选参数
|
|
1686
|
+
* @param {string} options.group 分组
|
|
1687
|
+
* @param {boolean} options.hide_in_command 是否在命令中隐藏,默认为 false
|
|
1688
|
+
* @param {string} options.animation 使用动画,默认为 "eat"
|
|
1689
|
+
* @param {boolean} options.canAlwaysEat 是否总是可以食用,默认为 false
|
|
1690
|
+
* @param {number} options.nutrition 营养价值,默认为 0
|
|
1691
|
+
* @param {number} options.saturationModifier 饱和度修正值,默认为 1
|
|
1692
|
+
*/
|
|
1693
|
+
constructor(identifier: string, category: string, texture: string, options?: {
|
|
1694
|
+
group: string;
|
|
1695
|
+
hide_in_command: boolean;
|
|
1696
|
+
animation: string;
|
|
1697
|
+
canAlwaysEat: boolean;
|
|
1698
|
+
nutrition: number;
|
|
1699
|
+
saturationModifier: number;
|
|
1700
|
+
});
|
|
1701
|
+
}
|
|
1702
|
+
|
|
1703
|
+
declare class AddonAttachableDescription {
|
|
1704
|
+
/**
|
|
1705
|
+
* 可附着物描述类
|
|
1706
|
+
* @param {string} identifier 标识符
|
|
1707
|
+
*/
|
|
1708
|
+
constructor(identifier: string);
|
|
1709
|
+
identifier: string;
|
|
1710
|
+
/**
|
|
1711
|
+
* 添加材质
|
|
1712
|
+
* @param {string} name 材质名称
|
|
1713
|
+
* @param {string} material 材质路径
|
|
1714
|
+
* @returns {AddonAttachableDescription} 返回当前实例以支持链式调用
|
|
1715
|
+
*/
|
|
1716
|
+
addMaterial(name: string, material: string): AddonAttachableDescription;
|
|
1717
|
+
materials: {} | undefined;
|
|
1718
|
+
/**
|
|
1719
|
+
* 添加纹理
|
|
1720
|
+
* @param {string} name 纹理名称
|
|
1721
|
+
* @param {string} texture 纹理路径
|
|
1722
|
+
* @returns {AddonAttachableDescription} 返回当前实例以支持链式调用
|
|
1723
|
+
*/
|
|
1724
|
+
addTexture(name: string, texture: string): AddonAttachableDescription;
|
|
1725
|
+
textures: {} | undefined;
|
|
1726
|
+
/**
|
|
1727
|
+
* 添加几何体
|
|
1728
|
+
* @param {string} name 几何体名称
|
|
1729
|
+
* @param {string} geometry 几何体路径
|
|
1730
|
+
* @returns {AddonAttachableDescription} 返回当前实例以支持链式调用
|
|
1731
|
+
*/
|
|
1732
|
+
addGeometry(name: string, geometry: string): AddonAttachableDescription;
|
|
1733
|
+
geometry: {} | undefined;
|
|
1734
|
+
/**
|
|
1735
|
+
* 添加动画
|
|
1736
|
+
* @param {string} name 动画名称
|
|
1737
|
+
* @param {string} animation 动画路径
|
|
1738
|
+
* @returns {AddonAttachableDescription} 返回当前实例以支持链式调用
|
|
1739
|
+
*/
|
|
1740
|
+
addAnimation(name: string, animation: string): AddonAttachableDescription;
|
|
1741
|
+
animations: {} | undefined;
|
|
1742
|
+
/**
|
|
1743
|
+
* 添加动画控制器
|
|
1744
|
+
* @param {string} name 控制器名称
|
|
1745
|
+
* @param {string} controller 控制器路径
|
|
1746
|
+
* @returns {AddonAttachableDescription} 返回当前实例以支持链式调用
|
|
1747
|
+
*/
|
|
1748
|
+
addAnimationController(name: string, controller: string): AddonAttachableDescription;
|
|
1749
|
+
animation_controllers: any[] | undefined;
|
|
1750
|
+
/**
|
|
1751
|
+
* 添加渲染控制器
|
|
1752
|
+
* @param {string} controller 渲染控制器路径
|
|
1753
|
+
* @returns {AddonAttachableDescription} 返回当前实例以支持链式调用
|
|
1754
|
+
*/
|
|
1755
|
+
addRenderController(controller: string): AddonAttachableDescription;
|
|
1756
|
+
render_controllers: any[] | undefined;
|
|
1757
|
+
/**
|
|
1758
|
+
* 添加定位器
|
|
1759
|
+
* @param {string} name 定位器名称
|
|
1760
|
+
* @param {Object} locator 定位器数据
|
|
1761
|
+
* @returns {AddonAttachableDescription} 返回当前实例以支持链式调用
|
|
1762
|
+
*/
|
|
1763
|
+
addLocator(name: string, locator: Object): AddonAttachableDescription;
|
|
1764
|
+
locators: {} | undefined;
|
|
1765
|
+
/**
|
|
1766
|
+
* 设置脚本
|
|
1767
|
+
* @param {string} key 脚本键
|
|
1768
|
+
* @param {string} value 脚本值
|
|
1769
|
+
* @returns {AddonAttachableDescription} 返回当前实例以支持链式调用
|
|
1770
|
+
*/
|
|
1771
|
+
setScript(key: string, value: string): AddonAttachableDescription;
|
|
1772
|
+
scripts: {} | undefined;
|
|
1773
|
+
}
|
|
1774
|
+
|
|
1775
|
+
declare class Attachable extends AddonAttachableDescription {
|
|
1776
|
+
constructor(identifier: any);
|
|
1777
|
+
getId(): string;
|
|
1778
|
+
toObject(): any;
|
|
1779
|
+
}
|
|
1780
|
+
|
|
1781
|
+
declare class Armor {
|
|
1782
|
+
constructor(identifier: any, category: any, item_texture: any, texture_path: any, options?: {});
|
|
1783
|
+
identifier: any;
|
|
1784
|
+
item: Item;
|
|
1785
|
+
attachable: Attachable;
|
|
1786
|
+
setArrachableGeometry(key: any, geometry: any): this;
|
|
1787
|
+
}
|
|
1788
|
+
declare class Chestplate extends Armor {
|
|
1789
|
+
constructor(identifier: any, item_texture: any, texture_path: any, options?: {});
|
|
1790
|
+
}
|
|
1791
|
+
declare class Boot extends Armor {
|
|
1792
|
+
constructor(identifier: any, item_texture: any, texture_path: any, options?: {});
|
|
1793
|
+
}
|
|
1794
|
+
declare class Leggings extends Armor {
|
|
1795
|
+
constructor(identifier: any, item_texture: any, texture_path: any, options?: {});
|
|
1796
|
+
}
|
|
1797
|
+
declare class Helmet extends Armor {
|
|
1798
|
+
constructor(identifier: any, item_texture: any, texture_path: any, options?: {});
|
|
1799
|
+
}
|
|
1800
|
+
|
|
1801
|
+
declare namespace ItemAPI {
|
|
1802
|
+
function createItem(identifier: string, category: string, texture: string, options?: {
|
|
1803
|
+
group: string;
|
|
1804
|
+
hight_resolution: boolean;
|
|
1805
|
+
hide_in_command: boolean;
|
|
1806
|
+
}): Item;
|
|
1807
|
+
function createFood(identifier: string, category: string, texture: string, options?: {
|
|
1808
|
+
group: string;
|
|
1809
|
+
hide_in_command: boolean;
|
|
1810
|
+
animation: string;
|
|
1811
|
+
canAlwaysEat: boolean;
|
|
1812
|
+
nutrition: number;
|
|
1813
|
+
saturationModifier: number;
|
|
1814
|
+
}): Food;
|
|
1815
|
+
function createAttachable(identifier: string, texture: string, material: string, options?: Object): Attachable;
|
|
1816
|
+
function createChestplateArmor(identifier: any, item_texture: any, texture_path: any, options?: {}): Chestplate;
|
|
1817
|
+
function createHelmetArmor(identifier: any, item_texture: any, texture_path: any, options?: {}): Helmet;
|
|
1818
|
+
function createBootArmor(identifier: any, item_texture: any, texture_path: any, options?: {}): Boot;
|
|
1819
|
+
function createLeggingsArmor(identifier: any, item_texture: any, texture_path: any, options?: {}): Leggings;
|
|
1820
|
+
}
|
|
1821
|
+
|
|
1822
|
+
declare class BasicBlock {
|
|
1823
|
+
/**
|
|
1824
|
+
* 基础方块类
|
|
1825
|
+
* @param {string} identifier 方块唯一标识符
|
|
1826
|
+
* @param {string} category 菜单栏分类 可选:"construction", "nature", "equipment", "items", and "none"
|
|
1827
|
+
* @param {Array} textures_arr 纹理数组 [上,下,东,西,南,北]
|
|
1828
|
+
* @param {Object} options 可选参数
|
|
1829
|
+
* @param {string} options.group 分组,默认为 "construction"
|
|
1830
|
+
* @param {boolean} options.hide_in_command 是否在命令中隐藏,默认为 false
|
|
1831
|
+
*/
|
|
1832
|
+
constructor(identifier: string, category: string, textures_arr: any[], options?: {
|
|
1833
|
+
group: string;
|
|
1834
|
+
hide_in_command: boolean;
|
|
1835
|
+
});
|
|
1836
|
+
identifier: string;
|
|
1837
|
+
category: string;
|
|
1838
|
+
textures: any[];
|
|
1839
|
+
group: string;
|
|
1840
|
+
hide_in_command: boolean;
|
|
1841
|
+
traits: Map<any, any>;
|
|
1842
|
+
states: Map<any, any>;
|
|
1843
|
+
components: Map<any, any>;
|
|
1844
|
+
permutations: any[];
|
|
1845
|
+
getId(): string;
|
|
1846
|
+
registerTrait(key: any, value: any): this;
|
|
1847
|
+
registerState(key: any, value: any): this;
|
|
1848
|
+
/**
|
|
1849
|
+
* 添加组件
|
|
1850
|
+
* @param {Map} componentMap 组件 Map
|
|
1851
|
+
*/
|
|
1852
|
+
addComponent(componentMap: Map<any, any>): this;
|
|
1853
|
+
/**
|
|
1854
|
+
* 移除组件
|
|
1855
|
+
* @param {string} key 组件名称
|
|
1856
|
+
*/
|
|
1857
|
+
removeComponent(key: string): this;
|
|
1858
|
+
/**
|
|
1859
|
+
* 添加方块变体
|
|
1860
|
+
* @param {string} condition 变体条件
|
|
1861
|
+
* @param {Map} componentMap 组件 Map
|
|
1862
|
+
*/
|
|
1863
|
+
addPermutation(condition: string, componentMap: Map<any, any>): this;
|
|
1864
|
+
/**
|
|
1865
|
+
* 将方块对象转换为 JSON 格式
|
|
1866
|
+
* @returns {Object} JSON 格式的方块对象
|
|
1867
|
+
*/
|
|
1868
|
+
toObject(): Object;
|
|
1869
|
+
}
|
|
1870
|
+
|
|
1871
|
+
declare class Block extends BasicBlock {
|
|
1872
|
+
/**
|
|
1873
|
+
* 方块类
|
|
1874
|
+
* @param {string} identifier 方块的唯一标识符
|
|
1875
|
+
* @param {string} category 方块的分类 "construction", "nature", "equipment", "items", and "none"
|
|
1876
|
+
* @param {Array} variantDatas 方块的变体数据,包含每个变体的状态标签和纹理
|
|
1877
|
+
* @param {Object} options 可选参数
|
|
1878
|
+
* @param {string} options.group 分组,默认为 "construction"
|
|
1879
|
+
* @param {boolean} options.hide_in_command 是否在命令中隐藏,默认为 false
|
|
1880
|
+
* @param {boolean} options.ambient_occlusion 是否应用环境光遮蔽,默认为 false
|
|
1881
|
+
* @param {boolean} options.face_dimming 是否根据面的方向进行亮度调整,默认为 false
|
|
1882
|
+
* @param {string} options.render_method 渲染方法,默认为 "alpha_test"
|
|
1883
|
+
*/
|
|
1884
|
+
constructor(identifier: string, category: string, variantDatas: any[], options?: {
|
|
1885
|
+
group: string;
|
|
1886
|
+
hide_in_command: boolean;
|
|
1887
|
+
ambient_occlusion: boolean;
|
|
1888
|
+
face_dimming: boolean;
|
|
1889
|
+
render_method: string;
|
|
1890
|
+
});
|
|
1891
|
+
options: {
|
|
1892
|
+
group: string;
|
|
1893
|
+
hide_in_command: boolean;
|
|
1894
|
+
ambient_occlusion: boolean;
|
|
1895
|
+
face_dimming: boolean;
|
|
1896
|
+
render_method: string;
|
|
1897
|
+
};
|
|
1898
|
+
variantDatas: any[];
|
|
1899
|
+
addVariantComponent(variantIndex: any, componentMap: any): this;
|
|
1900
|
+
#private;
|
|
1901
|
+
}
|
|
1902
|
+
|
|
1903
|
+
declare class RotatableBlock extends BasicBlock {
|
|
1904
|
+
/**
|
|
1905
|
+
* 可旋转方块类
|
|
1906
|
+
* @param {string} identifier 方块唯一标识符
|
|
1907
|
+
* @param {string} category 菜单栏分类
|
|
1908
|
+
* @param {Array} textures_arr 纹理数组 [上,下,东,西,南,北]
|
|
1909
|
+
* @param {Object} options 可选参数
|
|
1910
|
+
* @param {string} options.group 分组,默认为 "construction"
|
|
1911
|
+
* @param {boolean} options.hide_in_command 是否在命令中隐藏,默认为 false
|
|
1912
|
+
* @param {string} options.rotationType 旋转类型,默认为 "cardinal"
|
|
1913
|
+
* @param {number} options.yRotationOffset 初始旋转偏移量,默认为 180
|
|
1914
|
+
*/
|
|
1915
|
+
constructor(identifier: string, category: string, textures_arr: any[], options?: {
|
|
1916
|
+
group: string;
|
|
1917
|
+
hide_in_command: boolean;
|
|
1918
|
+
rotationType: string;
|
|
1919
|
+
yRotationOffset: number;
|
|
1920
|
+
});
|
|
1921
|
+
#private;
|
|
1922
|
+
}
|
|
1923
|
+
|
|
1924
|
+
declare class GeometryBlock extends BasicBlock {
|
|
1925
|
+
/**
|
|
1926
|
+
* 带模型方块类
|
|
1927
|
+
* @param {string} identifier 方块标识符 由命名空间和方块名组成 例如 "my_mod:stone"
|
|
1928
|
+
* @param {string} category 方块的分类 "construction", "nature", "equipment", "items", and "none"
|
|
1929
|
+
* @param {string} geometry 模型标识符
|
|
1930
|
+
* @param {Object} material_instances 材质实例对象
|
|
1931
|
+
* @param {Object} options 可选参数
|
|
1932
|
+
*/
|
|
1933
|
+
constructor(identifier: string, category: string, geometry: string, material_instances: Object, options?: Object);
|
|
1934
|
+
}
|
|
1935
|
+
|
|
1936
|
+
declare class OreFeature {
|
|
1937
|
+
constructor(identifier: any, count: any, replace_rules: any);
|
|
1938
|
+
identifier: any;
|
|
1939
|
+
count: any;
|
|
1940
|
+
replace_rules: any;
|
|
1941
|
+
toObject(): any;
|
|
1942
|
+
}
|
|
1943
|
+
|
|
1944
|
+
/**
|
|
1945
|
+
* 表示生物群系过滤条件的类
|
|
1946
|
+
*/
|
|
1947
|
+
declare class BiomeFilter {
|
|
1948
|
+
filters: any[];
|
|
1949
|
+
/**
|
|
1950
|
+
* 添加一个逻辑条件组(如 any_of, all_of)
|
|
1951
|
+
* @param {"any_of" | "all_of"} logicType - 逻辑类型
|
|
1952
|
+
* @param {Array<Object>} conditions - 条件数组
|
|
1953
|
+
* @returns {BiomeFilter} 返回自身以支持链式调用
|
|
1954
|
+
*/
|
|
1955
|
+
addLogicGroup(logicType: "any_of" | "all_of", conditions: Array<Object>): BiomeFilter;
|
|
1367
1956
|
/**
|
|
1368
|
-
*
|
|
1369
|
-
* @param {
|
|
1370
|
-
* @
|
|
1957
|
+
* 添加一个简单条件(如 has_biome_tag)
|
|
1958
|
+
* @param {string} test - 测试类型(如 "has_biome_tag")
|
|
1959
|
+
* @param {"==" | "!="} operator - 操作符
|
|
1960
|
+
* @param {string} value - 目标值(如 "overworld")
|
|
1961
|
+
* @returns {BiomeFilter} 返回自身以支持链式调用
|
|
1371
1962
|
*/
|
|
1372
|
-
|
|
1373
|
-
propagate_alpha: boolean | undefined;
|
|
1963
|
+
addSimpleCondition(test: string, operator: "==" | "!=", value: string): BiomeFilter;
|
|
1374
1964
|
/**
|
|
1375
|
-
*
|
|
1376
|
-
* @
|
|
1377
|
-
* @returns {Control} 返回当前实例以支持链式调用
|
|
1965
|
+
* 转换为 JSON 格式
|
|
1966
|
+
* @returns {Array<Object>} 返回生物群系过滤条件数组
|
|
1378
1967
|
*/
|
|
1379
|
-
|
|
1380
|
-
|
|
1968
|
+
toObject(): Array<Object>;
|
|
1969
|
+
}
|
|
1970
|
+
|
|
1971
|
+
/**
|
|
1972
|
+
* 表示功能规则生成条件的类
|
|
1973
|
+
*/
|
|
1974
|
+
declare class FeatureConditions {
|
|
1975
|
+
conditions: {
|
|
1976
|
+
placement_pass: string;
|
|
1977
|
+
"minecraft:biome_filter": never[];
|
|
1978
|
+
};
|
|
1381
1979
|
/**
|
|
1382
|
-
*
|
|
1383
|
-
* @param {
|
|
1384
|
-
* @returns {
|
|
1980
|
+
* 设置生成阶段(placement_pass)
|
|
1981
|
+
* @param {string} pass - 生成阶段标识符(如 "underground_pass")
|
|
1982
|
+
* @returns {FeatureConditions} 返回自身以支持链式调用
|
|
1385
1983
|
*/
|
|
1386
|
-
|
|
1387
|
-
allow_clipping: boolean | undefined;
|
|
1984
|
+
setPlacementPass(pass: string): FeatureConditions;
|
|
1388
1985
|
/**
|
|
1389
|
-
*
|
|
1390
|
-
* @param {
|
|
1391
|
-
* @returns {
|
|
1986
|
+
* 设置生物群系过滤器
|
|
1987
|
+
* @param {BiomeFilter} biomeFilter - 生物群系过滤条件对象
|
|
1988
|
+
* @returns {FeatureConditions} 返回自身以支持链式调用
|
|
1392
1989
|
*/
|
|
1393
|
-
|
|
1394
|
-
clip_offset: number[] | undefined;
|
|
1990
|
+
setBiomeFilter(biomeFilter: BiomeFilter): FeatureConditions;
|
|
1395
1991
|
/**
|
|
1396
|
-
*
|
|
1397
|
-
* @
|
|
1398
|
-
* @returns {Control} 返回当前实例以支持链式调用
|
|
1992
|
+
* 转换为 JSON 格式
|
|
1993
|
+
* @returns {Object} 返回生成条件对象
|
|
1399
1994
|
*/
|
|
1400
|
-
|
|
1401
|
-
|
|
1995
|
+
toObject(): Object;
|
|
1996
|
+
}
|
|
1997
|
+
|
|
1998
|
+
/**
|
|
1999
|
+
* 表示单个坐标轴(x/y/z)分布规则的类
|
|
2000
|
+
*/
|
|
2001
|
+
declare class CoordinateDistribution {
|
|
1402
2002
|
/**
|
|
1403
|
-
*
|
|
1404
|
-
* @param {
|
|
1405
|
-
* @returns {Control} 返回当前实例以支持链式调用
|
|
2003
|
+
* @param {"uniform" | "triangle"} distribution - 分布类型
|
|
2004
|
+
* @param {Array<number>} extent - 范围(如 [0, 16])
|
|
1406
2005
|
*/
|
|
1407
|
-
|
|
1408
|
-
|
|
2006
|
+
constructor(distribution?: "uniform" | "triangle", extent?: Array<number>);
|
|
2007
|
+
distribution: "uniform" | "triangle";
|
|
2008
|
+
extent: number[];
|
|
1409
2009
|
/**
|
|
1410
|
-
*
|
|
1411
|
-
* @
|
|
1412
|
-
* @returns {Control} 返回当前实例以支持链式调用
|
|
2010
|
+
* 转换为 JSON 格式
|
|
2011
|
+
* @returns {Object} 返回坐标分布配置
|
|
1413
2012
|
*/
|
|
1414
|
-
|
|
1415
|
-
|
|
2013
|
+
toObject(): Object;
|
|
2014
|
+
}
|
|
2015
|
+
|
|
2016
|
+
/**
|
|
2017
|
+
* 表示功能规则分布配置的类
|
|
2018
|
+
*/
|
|
2019
|
+
declare class FeatureDistribution {
|
|
2020
|
+
distribution: {
|
|
2021
|
+
iterations: number;
|
|
2022
|
+
coordinate_eval_order: string;
|
|
2023
|
+
x: any;
|
|
2024
|
+
y: any;
|
|
2025
|
+
z: any;
|
|
2026
|
+
};
|
|
1416
2027
|
/**
|
|
1417
|
-
*
|
|
1418
|
-
* @param {
|
|
1419
|
-
* @returns {
|
|
2028
|
+
* 设置迭代次数
|
|
2029
|
+
* @param {number} iterations - 放置尝试次数
|
|
2030
|
+
* @returns {FeatureDistribution} 返回自身以支持链式调用
|
|
1420
2031
|
*/
|
|
1421
|
-
|
|
1422
|
-
selected: boolean | undefined;
|
|
2032
|
+
setIterations(iterations: number): FeatureDistribution;
|
|
1423
2033
|
/**
|
|
1424
|
-
*
|
|
1425
|
-
* @param {
|
|
1426
|
-
* @
|
|
2034
|
+
* 设置坐标轴的分布规则
|
|
2035
|
+
* @param {"x" | "y" | "z"} axis - 坐标轴
|
|
2036
|
+
* @param {CoordinateDistribution} config - 分布配置
|
|
2037
|
+
* @returns {FeatureDistribution} 返回自身以支持链式调用
|
|
1427
2038
|
*/
|
|
1428
|
-
|
|
1429
|
-
use_child_anchors: boolean | undefined;
|
|
2039
|
+
setAxisDistribution(axis: "x" | "y" | "z", config: CoordinateDistribution): FeatureDistribution;
|
|
1430
2040
|
/**
|
|
1431
|
-
*
|
|
1432
|
-
* @
|
|
1433
|
-
* @returns {Control} 返回当前实例以支持链式调用
|
|
2041
|
+
* 转换为 JSON 格式
|
|
2042
|
+
* @returns {Object} 返回分布规则对象
|
|
1434
2043
|
*/
|
|
1435
|
-
|
|
1436
|
-
|
|
2044
|
+
toObject(): Object;
|
|
2045
|
+
}
|
|
2046
|
+
|
|
2047
|
+
declare class FeatureRule {
|
|
2048
|
+
constructor(identifier: any, places_feature: any);
|
|
2049
|
+
identifier: any;
|
|
2050
|
+
places_feature: any;
|
|
2051
|
+
condition: FeatureConditions;
|
|
2052
|
+
distribution: FeatureDistribution;
|
|
2053
|
+
setPlacementPass(pass: any): void;
|
|
2054
|
+
setBiomeFilter(biomeFilter: any): void;
|
|
2055
|
+
setIterations(iterations: any): void;
|
|
2056
|
+
setAxisDistribution(axis: any, config: any): void;
|
|
2057
|
+
toObject(): any;
|
|
2058
|
+
}
|
|
2059
|
+
|
|
2060
|
+
declare class OreBlock {
|
|
2061
|
+
constructor(identifier: any, category: any, textures_arr: any, options?: {});
|
|
2062
|
+
block: BasicBlock;
|
|
2063
|
+
feature: OreFeature;
|
|
2064
|
+
feature_rules: FeatureRule;
|
|
2065
|
+
}
|
|
2066
|
+
|
|
2067
|
+
declare class CropBlock extends Block {
|
|
2068
|
+
stageNum: number;
|
|
2069
|
+
}
|
|
2070
|
+
|
|
2071
|
+
declare namespace BlockAPI {
|
|
2072
|
+
function createBasicBlock(identifier: string, category: string, textures_arr: any[], options?: {
|
|
2073
|
+
group: string;
|
|
2074
|
+
hide_in_command: boolean;
|
|
2075
|
+
}): BasicBlock;
|
|
2076
|
+
function createBlock(identifier: string, category: string, variantDatas: any[], options?: {
|
|
2077
|
+
group: string;
|
|
2078
|
+
hide_in_command: boolean;
|
|
2079
|
+
ambient_occlusion: boolean;
|
|
2080
|
+
face_dimming: boolean;
|
|
2081
|
+
render_method: string;
|
|
2082
|
+
}): Block;
|
|
2083
|
+
function createRotatableBlock(identifier: string, category: string, textures_arr: any[], options?: {
|
|
2084
|
+
group: string;
|
|
2085
|
+
hide_in_command: boolean;
|
|
2086
|
+
rotationType: string;
|
|
2087
|
+
yRotationOffset: number;
|
|
2088
|
+
}): RotatableBlock;
|
|
2089
|
+
function createGeometryBlock(identifier: any, category: any, geometry: any, material_instances: any, options?: {}): GeometryBlock;
|
|
2090
|
+
function createOreBlock(identifier: any, category: any, textures_arr: any, options?: {}): OreBlock;
|
|
2091
|
+
function createCropBlock(identifier: string, category: string, variantDatas: any[], options?: {
|
|
2092
|
+
group: string;
|
|
2093
|
+
hide_in_command: boolean;
|
|
2094
|
+
ambient_occlusion: boolean;
|
|
2095
|
+
face_dimming: boolean;
|
|
2096
|
+
render_method: string;
|
|
2097
|
+
}): CropBlock;
|
|
2098
|
+
}
|
|
2099
|
+
|
|
2100
|
+
declare namespace FeatureAPI {
|
|
2101
|
+
function createOreFeature(identifier: any, count: any, replace_rules: any): OreFeature;
|
|
2102
|
+
function createFeatureRules(identifier: any, places_feature: any): FeatureRule;
|
|
2103
|
+
}
|
|
2104
|
+
|
|
2105
|
+
declare class BasicEntity {
|
|
1437
2106
|
/**
|
|
1438
|
-
*
|
|
1439
|
-
* @param {string
|
|
1440
|
-
* @
|
|
2107
|
+
* 构造函数
|
|
2108
|
+
* @param {string} identifier - 实体的唯一标识符
|
|
2109
|
+
* @param {Object} options - 配置选项
|
|
2110
|
+
* @param {boolean} [options.is_spawnable=true] - 是否可生成
|
|
2111
|
+
* @param {boolean} [options.is_summonable=true] - 是否可召唤
|
|
2112
|
+
* @param {string} [options.runtime_identifier] - 复刻标识符
|
|
2113
|
+
* @param {Object} data - 继承的数据
|
|
2114
|
+
* @param {Object} [data.components={}] - 继承的组件
|
|
2115
|
+
* @param {Object} [data.component_groups={}] - 继承的组件组
|
|
2116
|
+
* @param {Object} [data.events={}] - 继承的事件
|
|
1441
2117
|
*/
|
|
1442
|
-
|
|
1443
|
-
|
|
2118
|
+
constructor(identifier: string, options?: {
|
|
2119
|
+
is_spawnable?: boolean | undefined;
|
|
2120
|
+
is_summonable?: boolean | undefined;
|
|
2121
|
+
runtime_identifier?: string | undefined;
|
|
2122
|
+
}, data?: {
|
|
2123
|
+
components?: Object | undefined;
|
|
2124
|
+
component_groups?: Object | undefined;
|
|
2125
|
+
events?: Object | undefined;
|
|
2126
|
+
});
|
|
2127
|
+
identifier: string;
|
|
2128
|
+
is_spawnable: boolean;
|
|
2129
|
+
is_summonable: boolean;
|
|
2130
|
+
runtime_identifier: string | undefined;
|
|
2131
|
+
properties: any;
|
|
2132
|
+
components: Map<string, any>;
|
|
2133
|
+
component_groups: Map<string, any>;
|
|
2134
|
+
events: Map<string, any>;
|
|
1444
2135
|
/**
|
|
1445
|
-
*
|
|
1446
|
-
* @param {
|
|
1447
|
-
* @
|
|
2136
|
+
* 添加属性到实体
|
|
2137
|
+
* @param {string} name 属性名称
|
|
2138
|
+
* @param {Object} value 属性值
|
|
2139
|
+
* @returns
|
|
1448
2140
|
*/
|
|
1449
|
-
|
|
1450
|
-
disable_anim_fast_forward: boolean | undefined;
|
|
2141
|
+
addProperty(name: string, value: Object): this;
|
|
1451
2142
|
/**
|
|
1452
|
-
*
|
|
1453
|
-
* @param {string} name
|
|
1454
|
-
* @returns
|
|
2143
|
+
* 移除属性
|
|
2144
|
+
* @param {string} name 属性名称
|
|
2145
|
+
* @returns
|
|
1455
2146
|
*/
|
|
1456
|
-
|
|
1457
|
-
animation_reset_name: string | undefined;
|
|
2147
|
+
removeProperty(name: string): this;
|
|
1458
2148
|
/**
|
|
1459
|
-
*
|
|
1460
|
-
* @
|
|
1461
|
-
* @returns {Control} 返回当前实例以支持链式调用
|
|
2149
|
+
* 移除所有属性
|
|
2150
|
+
* @returns
|
|
1462
2151
|
*/
|
|
1463
|
-
|
|
1464
|
-
ignored: boolean | undefined;
|
|
2152
|
+
clearProperties(): this;
|
|
1465
2153
|
/**
|
|
1466
|
-
*
|
|
1467
|
-
* @param {
|
|
1468
|
-
* @
|
|
2154
|
+
* 添加事件到实体
|
|
2155
|
+
* @param {string} name - 事件名称
|
|
2156
|
+
* @param {Map} eventMap - 事件的键值对 Map
|
|
2157
|
+
* @returns {BasicEntity} - 返回当前实例以支持链式调用
|
|
1469
2158
|
*/
|
|
1470
|
-
|
|
1471
|
-
variables: object | undefined;
|
|
2159
|
+
addEvent(name: string, eventMap: Map<any, any>): BasicEntity;
|
|
1472
2160
|
/**
|
|
1473
|
-
*
|
|
1474
|
-
* @param {
|
|
1475
|
-
* @returns {
|
|
2161
|
+
* 删除事件
|
|
2162
|
+
* @param {string} name - 事件名称
|
|
2163
|
+
* @returns {BasicEntity} - 返回当前实例以支持链式调用
|
|
1476
2164
|
*/
|
|
1477
|
-
|
|
1478
|
-
modifications: any;
|
|
2165
|
+
removeEvent(name: string): BasicEntity;
|
|
1479
2166
|
/**
|
|
1480
|
-
*
|
|
1481
|
-
* @
|
|
1482
|
-
* @returns {Control} 返回当前实例以支持链式调用
|
|
2167
|
+
* 清除所有事件
|
|
2168
|
+
* @returns {BasicEntity} - 返回当前实例以支持链式调用
|
|
1483
2169
|
*/
|
|
1484
|
-
|
|
1485
|
-
grid_position: number[] | undefined;
|
|
2170
|
+
clearEvents(): BasicEntity;
|
|
1486
2171
|
/**
|
|
1487
|
-
*
|
|
1488
|
-
* @param {
|
|
1489
|
-
* @
|
|
2172
|
+
* 添加组件组到实体
|
|
2173
|
+
* @param {string} name - 组件组名称
|
|
2174
|
+
* @param {Map} componentMap - 组件组的键值对 Map
|
|
2175
|
+
* @returns {BasicEntity} - 返回当前实例以支持链式调用
|
|
1490
2176
|
*/
|
|
1491
|
-
|
|
1492
|
-
collection_index: number | undefined;
|
|
1493
|
-
}
|
|
1494
|
-
|
|
1495
|
-
declare class UIElement {
|
|
1496
|
-
constructor(name: any, type: any, template: any);
|
|
1497
|
-
type: any;
|
|
1498
|
-
id: any;
|
|
1499
|
-
name: any;
|
|
1500
|
-
control: Control;
|
|
1501
|
-
properties: Map<any, any>;
|
|
1502
|
-
variables: Map<any, any>;
|
|
1503
|
-
modifications: any[];
|
|
1504
|
-
enableDebug(): this;
|
|
1505
|
-
setControl(control: any): this;
|
|
1506
|
-
addControl(control: any): this;
|
|
1507
|
-
addControls(controls: any): this;
|
|
1508
|
-
addVariable(name: any, value: any): this;
|
|
1509
|
-
addProp(name: any, value: any): this;
|
|
1510
|
-
addModification(modification: any): this;
|
|
1511
|
-
serialize(): {
|
|
1512
|
-
[x: number]: any;
|
|
1513
|
-
};
|
|
1514
|
-
}
|
|
1515
|
-
|
|
1516
|
-
/**
|
|
1517
|
-
* Sprite 类
|
|
1518
|
-
*
|
|
1519
|
-
* 该类表示一个 Sprite 控件,用于管理图像纹理及其相关属性。
|
|
1520
|
-
*
|
|
1521
|
-
* 属性:
|
|
1522
|
-
* - texture: string - 图像路径(从包根目录开始,例如:"textures/ui/White")
|
|
1523
|
-
* - allow_debug_missing_texture: boolean - 是否在纹理未找到时显示缺失纹理(默认值:true)
|
|
1524
|
-
* - uv: Vector [u, v] - 纹理映射的起始位置
|
|
1525
|
-
* - uv_size: Vector [width, height] - 纹理映射的大小
|
|
1526
|
-
* - texture_file_system: string - 纹理来源(默认值:InUserPackage)
|
|
1527
|
-
* - nineslice_size: int or Vector [x0, y0, x1, y1] - 9-slice 分割大小
|
|
1528
|
-
* - tiled: boolean or enum - 是否平铺纹理(可能值:true/false, x, y)
|
|
1529
|
-
* - tiled_scale: Vector [sX, sY] - 平铺纹理的缩放比例(默认值:false)
|
|
1530
|
-
* - clip_direction: enum - 裁剪方向的起始点(可能值:left, right, up, down, center)
|
|
1531
|
-
* - clip_ratio: float - 裁剪比例(范围:0.0 到 1.0)
|
|
1532
|
-
* - clip_pixelperfect: boolean - 是否尽可能保持像素精确裁剪
|
|
1533
|
-
* - keep_ratio: boolean - 是否在调整大小时保持比例(默认值:true)
|
|
1534
|
-
* - bilinear: boolean - 是否在调整大小时使用双线性函数(默认值:false)
|
|
1535
|
-
* - fill: boolean - 是否拉伸图像以适应大小(默认值:false)
|
|
1536
|
-
* - $fit_to_width: boolean - 是否适应宽度
|
|
1537
|
-
* - zip_folder: string - 压缩文件夹路径
|
|
1538
|
-
* - grayscale: boolean - 是否以黑白渲染图像(默认值:false)
|
|
1539
|
-
* - force_texture_reload: boolean - 是否在纹理路径更改时强制重新加载图像
|
|
1540
|
-
* - base_size: Vector [width, height] - 基础大小
|
|
1541
|
-
*/
|
|
1542
|
-
declare class Sprite {
|
|
2177
|
+
addComponentGroup(name: string, componentMap: Map<any, any>): BasicEntity;
|
|
1543
2178
|
/**
|
|
1544
|
-
*
|
|
1545
|
-
* @param {string}
|
|
1546
|
-
* @returns {
|
|
2179
|
+
* 删除组件组
|
|
2180
|
+
* @param {string} name - 组件组名称
|
|
2181
|
+
* @returns {BasicEntity} - 返回当前实例以支持链式调用
|
|
1547
2182
|
*/
|
|
1548
|
-
|
|
1549
|
-
texture: string | undefined;
|
|
2183
|
+
removeComponentGroup(name: string): BasicEntity;
|
|
1550
2184
|
/**
|
|
1551
|
-
*
|
|
1552
|
-
* @
|
|
1553
|
-
* @returns {Sprite} 返回当前实例以支持链式调用
|
|
2185
|
+
* 清除所有组件组
|
|
2186
|
+
* @returns {BasicEntity} - 返回当前实例以支持链式调用
|
|
1554
2187
|
*/
|
|
1555
|
-
|
|
1556
|
-
allow_debug_missing_texture: boolean | undefined;
|
|
2188
|
+
clearComponentGroups(): BasicEntity;
|
|
1557
2189
|
/**
|
|
1558
|
-
*
|
|
1559
|
-
* @param {
|
|
1560
|
-
* @returns {
|
|
2190
|
+
* 添加组件到实体
|
|
2191
|
+
* @param {Map} componentMap - 组件的键值对 Map
|
|
2192
|
+
* @returns {BasicEntity} - 返回当前实例以支持链式调用
|
|
1561
2193
|
*/
|
|
1562
|
-
|
|
1563
|
-
uv: number[] | undefined;
|
|
2194
|
+
addComponent(componentMap: Map<any, any>): BasicEntity;
|
|
1564
2195
|
/**
|
|
1565
|
-
*
|
|
1566
|
-
* @param {
|
|
1567
|
-
* @returns {
|
|
2196
|
+
* 删除组件
|
|
2197
|
+
* @param {string} key - 组件名称
|
|
2198
|
+
* @returns {BasicEntity} - 返回当前实例以支持链式调用
|
|
1568
2199
|
*/
|
|
1569
|
-
|
|
1570
|
-
uv_size: number[] | undefined;
|
|
2200
|
+
removeComponent(key: string): BasicEntity;
|
|
1571
2201
|
/**
|
|
1572
|
-
*
|
|
1573
|
-
* @
|
|
1574
|
-
* @returns {Sprite} 返回当前实例以支持链式调用
|
|
2202
|
+
* 清除所有组件
|
|
2203
|
+
* @returns {BasicEntity} - 返回当前实例以支持链式调用
|
|
1575
2204
|
*/
|
|
1576
|
-
|
|
1577
|
-
texture_file_system: string | undefined;
|
|
2205
|
+
clearComponents(): BasicEntity;
|
|
1578
2206
|
/**
|
|
1579
|
-
*
|
|
1580
|
-
* @param {number|number[]} size - 9-slice 分割大小(可以是单个数字或 [x0, y0, x1, y1] 数组)
|
|
1581
|
-
* @returns {Sprite} 返回当前实例以支持链式调用
|
|
2207
|
+
* 清除所有数据
|
|
1582
2208
|
*/
|
|
1583
|
-
|
|
1584
|
-
nineslice_size: number | number[] | undefined;
|
|
2209
|
+
clearAll(): this;
|
|
1585
2210
|
/**
|
|
1586
|
-
*
|
|
1587
|
-
* @
|
|
1588
|
-
* @returns {Sprite} 返回当前实例以支持链式调用
|
|
2211
|
+
* 将实体转换为 JSON 格式
|
|
2212
|
+
* @returns {Object} - 返回 JSON 格式的实体数据
|
|
1589
2213
|
*/
|
|
1590
|
-
|
|
1591
|
-
|
|
2214
|
+
toObject(): Object;
|
|
2215
|
+
}
|
|
2216
|
+
|
|
2217
|
+
declare class AddonClientEntityDescription {
|
|
1592
2218
|
/**
|
|
1593
|
-
*
|
|
1594
|
-
* @param {
|
|
1595
|
-
* @
|
|
2219
|
+
* 实体描述类
|
|
2220
|
+
* @param {string} identifier 实体标识符
|
|
2221
|
+
* @param {string} min_engine_version 最低引擎版本
|
|
1596
2222
|
*/
|
|
1597
|
-
|
|
1598
|
-
|
|
2223
|
+
constructor(identifier: string, min_engine_version: string);
|
|
2224
|
+
identifier: string;
|
|
2225
|
+
min_engine_version: string;
|
|
1599
2226
|
/**
|
|
1600
|
-
*
|
|
1601
|
-
* @param {string}
|
|
1602
|
-
* @
|
|
2227
|
+
* 注册粒子效果
|
|
2228
|
+
* @param {string} name 组件名称
|
|
2229
|
+
* @param {Object} component 组件数据
|
|
2230
|
+
* @returns {AddonClientEntityDescription} 返回当前实例以支持链式调用
|
|
2231
|
+
*/
|
|
2232
|
+
addParticleEffect(name: string, particle: any): AddonClientEntityDescription;
|
|
2233
|
+
particle_effects: {} | undefined;
|
|
2234
|
+
/**
|
|
2235
|
+
* 添加材质
|
|
2236
|
+
* @param {string} name 材质名称
|
|
2237
|
+
* @param {string} material 材质路径
|
|
2238
|
+
* @returns {AddonClientEntityDescription} 返回当前实例以支持链式调用
|
|
1603
2239
|
*/
|
|
1604
|
-
|
|
1605
|
-
|
|
2240
|
+
addMaterial(name: string, material: string): AddonClientEntityDescription;
|
|
2241
|
+
materials: {} | undefined;
|
|
1606
2242
|
/**
|
|
1607
|
-
*
|
|
1608
|
-
* @param {
|
|
1609
|
-
* @
|
|
2243
|
+
* 添加纹理
|
|
2244
|
+
* @param {string} name 纹理名称
|
|
2245
|
+
* @param {string} texture 纹理路径
|
|
2246
|
+
* @returns {AddonClientEntityDescription} 返回当前实例以支持链式调用
|
|
1610
2247
|
*/
|
|
1611
|
-
|
|
1612
|
-
|
|
2248
|
+
addTexture(name: string, texture: string): AddonClientEntityDescription;
|
|
2249
|
+
textures: {} | undefined;
|
|
1613
2250
|
/**
|
|
1614
|
-
*
|
|
1615
|
-
* @param {
|
|
1616
|
-
* @
|
|
2251
|
+
* 添加几何体
|
|
2252
|
+
* @param {string} name 几何体名称
|
|
2253
|
+
* @param {string} geometry 几何体路径
|
|
2254
|
+
* @returns {AddonClientEntityDescription} 返回当前实例以支持链式调用
|
|
1617
2255
|
*/
|
|
1618
|
-
|
|
1619
|
-
|
|
2256
|
+
addGeometry(name: string, geometry: string): AddonClientEntityDescription;
|
|
2257
|
+
geometry: {} | undefined;
|
|
1620
2258
|
/**
|
|
1621
|
-
*
|
|
1622
|
-
* @param {
|
|
1623
|
-
* @
|
|
2259
|
+
* 添加动画
|
|
2260
|
+
* @param {string} name 动画名称
|
|
2261
|
+
* @param {string} animation 动画路径
|
|
2262
|
+
* @returns {AddonClientEntityDescription} 返回当前实例以支持链式调用
|
|
1624
2263
|
*/
|
|
1625
|
-
|
|
1626
|
-
|
|
2264
|
+
addAnimation(name: string, animation: string): AddonClientEntityDescription;
|
|
2265
|
+
animations: {} | undefined;
|
|
1627
2266
|
/**
|
|
1628
|
-
*
|
|
1629
|
-
* @param {
|
|
1630
|
-
* @
|
|
2267
|
+
* 添加动画控制器
|
|
2268
|
+
* @param {string} name 控制器名称
|
|
2269
|
+
* @param {string} controller 控制器路径
|
|
2270
|
+
* @returns {AddonClientEntityDescription} 返回当前实例以支持链式调用
|
|
1631
2271
|
*/
|
|
1632
|
-
|
|
1633
|
-
|
|
2272
|
+
addAnimationController(name: string, controller: string): AddonClientEntityDescription;
|
|
2273
|
+
animation_controllers: any[] | undefined;
|
|
1634
2274
|
/**
|
|
1635
|
-
*
|
|
1636
|
-
* @param {
|
|
1637
|
-
* @returns {
|
|
2275
|
+
* 添加渲染控制器
|
|
2276
|
+
* @param {string} controller 渲染控制器路径
|
|
2277
|
+
* @returns {AddonClientEntityDescription} 返回当前实例以支持链式调用
|
|
1638
2278
|
*/
|
|
1639
|
-
|
|
1640
|
-
|
|
2279
|
+
addRenderController(controller: string): AddonClientEntityDescription;
|
|
2280
|
+
render_controllers: any[] | undefined;
|
|
1641
2281
|
/**
|
|
1642
|
-
*
|
|
1643
|
-
* @param {
|
|
1644
|
-
* @
|
|
2282
|
+
* 添加定位器
|
|
2283
|
+
* @param {string} name 定位器名称
|
|
2284
|
+
* @param {Object} locator 定位器数据
|
|
2285
|
+
* @returns {AddonClientEntityDescription} 返回当前实例以支持链式调用
|
|
1645
2286
|
*/
|
|
1646
|
-
|
|
1647
|
-
|
|
2287
|
+
addLocator(name: string, locator: Object): AddonClientEntityDescription;
|
|
2288
|
+
locators: {} | undefined;
|
|
1648
2289
|
/**
|
|
1649
|
-
*
|
|
1650
|
-
* @param {string}
|
|
1651
|
-
* @
|
|
2290
|
+
* 设置生成蛋
|
|
2291
|
+
* @param {string} texture 生成蛋纹理
|
|
2292
|
+
* @param {number} texture_index 生成蛋纹理索引
|
|
2293
|
+
* @returns {AddonClientEntityDescription} 返回当前实例以支持链式调用
|
|
1652
2294
|
*/
|
|
1653
|
-
|
|
1654
|
-
|
|
2295
|
+
setSpawnEgg(texture: string, texture_index: number): AddonClientEntityDescription;
|
|
2296
|
+
spawn_egg: {
|
|
2297
|
+
texture: string;
|
|
2298
|
+
texture_index: number;
|
|
2299
|
+
} | undefined;
|
|
1655
2300
|
/**
|
|
1656
|
-
*
|
|
1657
|
-
* @param {
|
|
1658
|
-
* @
|
|
2301
|
+
* 设置脚本
|
|
2302
|
+
* @param {string} key 脚本键
|
|
2303
|
+
* @param {string} value 脚本值
|
|
2304
|
+
* @returns {AddonClientEntityDescription} 返回当前实例以支持链式调用
|
|
1659
2305
|
*/
|
|
1660
|
-
|
|
1661
|
-
|
|
2306
|
+
setScript(key: string, value: string): AddonClientEntityDescription;
|
|
2307
|
+
scripts: {} | undefined;
|
|
2308
|
+
}
|
|
2309
|
+
|
|
2310
|
+
/**
|
|
2311
|
+
* ClientEntity 类,用于表示客户端实体。
|
|
2312
|
+
* 继承自 AddonClientEntityDescription,并扩展了实体的数据加载和 JSON 序列化功能。
|
|
2313
|
+
*/
|
|
2314
|
+
declare class ClientEntity extends AddonClientEntityDescription {
|
|
1662
2315
|
/**
|
|
1663
|
-
*
|
|
1664
|
-
*
|
|
1665
|
-
* @
|
|
2316
|
+
* 构造函数,用于创建一个客户端实体实例。
|
|
2317
|
+
*
|
|
2318
|
+
* @param {string} identifier - 实体的唯一标识符。
|
|
2319
|
+
* @param {Object} data - 实体的初始数据,默认为空对象。
|
|
1666
2320
|
*/
|
|
1667
|
-
|
|
1668
|
-
force_texture_reload: boolean | undefined;
|
|
2321
|
+
constructor(identifier: string, data?: Object);
|
|
1669
2322
|
/**
|
|
1670
|
-
*
|
|
1671
|
-
*
|
|
1672
|
-
* @returns {
|
|
2323
|
+
* 将当前实体实例转换为 JSON 格式。
|
|
2324
|
+
*
|
|
2325
|
+
* @returns {Object} - 表示实体的 JSON 对象。
|
|
1673
2326
|
*/
|
|
1674
|
-
|
|
1675
|
-
base_size: number[] | undefined;
|
|
2327
|
+
toObject(): Object;
|
|
1676
2328
|
}
|
|
1677
2329
|
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
declare class
|
|
2330
|
+
declare namespace EntityAPI {
|
|
2331
|
+
function createNativeEntity(identifier: string, proto_id: string, options?: Object): {
|
|
2332
|
+
behavior: BasicEntity;
|
|
2333
|
+
resource: ClientEntity;
|
|
2334
|
+
};
|
|
2335
|
+
function createEntity(identifier: string, texture: string, behData: Object, resData: Object, options?: Object): {
|
|
2336
|
+
behavior: BasicEntity;
|
|
2337
|
+
resource: ClientEntity;
|
|
2338
|
+
};
|
|
2339
|
+
function createProjectile(identifier: string, texture: string, options?: Object): {
|
|
2340
|
+
behavior: BasicEntity;
|
|
2341
|
+
resource: ClientEntity;
|
|
2342
|
+
};
|
|
2343
|
+
function createDummyEntity(identifier: string, texture: string, options: Object | undefined, behData: Object, resData: Object): {
|
|
2344
|
+
behavior: BasicEntity;
|
|
2345
|
+
resource: ClientEntity;
|
|
2346
|
+
};
|
|
2347
|
+
}
|
|
2348
|
+
|
|
2349
|
+
declare class AddonRecipe {
|
|
2350
|
+
constructor(format_version: any, recipe_type: any, definitions?: {});
|
|
2351
|
+
format_version: any;
|
|
2352
|
+
recipe_type: any;
|
|
2353
|
+
definitions: {};
|
|
2354
|
+
getId(): any;
|
|
2355
|
+
identifier(identifier: any): this;
|
|
2356
|
+
tags(tags: any): this;
|
|
2357
|
+
toObject(): {
|
|
2358
|
+
format_version: any;
|
|
2359
|
+
};
|
|
2360
|
+
}
|
|
2361
|
+
|
|
2362
|
+
declare class AddonRecipeFurnace extends AddonRecipe {
|
|
1698
2363
|
/**
|
|
1699
|
-
*
|
|
1700
|
-
* @param {any
|
|
1701
|
-
* @returns {Layout} 返回当前实例以支持链式调用
|
|
2364
|
+
* @param {'1.12'|'1.17'} ver
|
|
2365
|
+
* @param {any} def
|
|
1702
2366
|
*/
|
|
1703
|
-
|
|
1704
|
-
|
|
2367
|
+
static create(ver: "1.12" | "1.17", def: any): AddonRecipeFurnace;
|
|
2368
|
+
constructor(format_version: any, definitions: any);
|
|
2369
|
+
input(item: any, data: any, count: any): this;
|
|
2370
|
+
output(item: any): this;
|
|
2371
|
+
}
|
|
2372
|
+
declare class AddonRecipeFurnace_1_17 extends AddonRecipeFurnace {
|
|
2373
|
+
constructor(definitions?: {});
|
|
2374
|
+
}
|
|
2375
|
+
|
|
2376
|
+
declare class AddonRecipeShaped extends AddonRecipe {
|
|
1705
2377
|
/**
|
|
1706
|
-
*
|
|
1707
|
-
* @param {
|
|
1708
|
-
* @returns {Layout} 返回当前实例以支持链式调用
|
|
2378
|
+
* @param {'1.12'|'1.17'|'1.19'|'1.20'} ver
|
|
2379
|
+
* @param {any} def
|
|
1709
2380
|
*/
|
|
1710
|
-
|
|
1711
|
-
|
|
2381
|
+
static create(ver: "1.12" | "1.17" | "1.19" | "1.20", def: any): AddonRecipeShaped;
|
|
2382
|
+
constructor(format_version: any, definitions: any);
|
|
2383
|
+
assumeSymmetry(): void;
|
|
2384
|
+
key(key: any): this;
|
|
2385
|
+
pattern(pattern: any): this;
|
|
2386
|
+
priority(priority: any): this;
|
|
2387
|
+
output(item: any): this;
|
|
2388
|
+
}
|
|
2389
|
+
declare class AddonRecipeShaped_1_20 extends AddonRecipeShaped {
|
|
2390
|
+
constructor(definitions: any);
|
|
2391
|
+
}
|
|
2392
|
+
|
|
2393
|
+
declare class AddonRecipeShapeless extends AddonRecipe {
|
|
1712
2394
|
/**
|
|
1713
|
-
*
|
|
1714
|
-
* @param {
|
|
1715
|
-
* @returns {Layout} 返回当前实例以支持链式调用
|
|
2395
|
+
* @param {'1.12'|'1.17'} ver
|
|
2396
|
+
* @param {any} def
|
|
1716
2397
|
*/
|
|
1717
|
-
|
|
1718
|
-
|
|
2398
|
+
static create(ver: "1.12" | "1.17", def: any): AddonRecipeShapeless;
|
|
2399
|
+
constructor(format_version: any, definitions: any);
|
|
2400
|
+
priority(priority: any): this;
|
|
2401
|
+
ingredients(ingredients: any): this;
|
|
2402
|
+
output(item: any): this;
|
|
2403
|
+
}
|
|
2404
|
+
declare class AddonRecipeShapeless_1_17 extends AddonRecipeShapeless {
|
|
2405
|
+
constructor(definitions: any);
|
|
2406
|
+
}
|
|
2407
|
+
|
|
2408
|
+
declare const RecipeAPI: RecipeRegistry;
|
|
2409
|
+
declare class RecipeRegistry {
|
|
1719
2410
|
/**
|
|
1720
|
-
*
|
|
1721
|
-
* @param {
|
|
1722
|
-
* @returns {Layout} 返回当前实例以支持链式调用
|
|
2411
|
+
*
|
|
2412
|
+
* @param {AddonRecipeFurnace_1_17} recipe
|
|
1723
2413
|
*/
|
|
1724
|
-
|
|
1725
|
-
|
|
2414
|
+
registerRecipe(recipe: AddonRecipeFurnace_1_17): void;
|
|
2415
|
+
registerSimpleFurnace(identifier: any, output: any, input: any): AddonRecipeFurnace_1_17;
|
|
2416
|
+
registerFurnace(identifier: any): AddonRecipeFurnace_1_17;
|
|
2417
|
+
registerSimpleShaped(identifier: any, output: any, pattern: any, key: any): AddonRecipeShaped_1_20;
|
|
2418
|
+
registerShaped(identifier: any): AddonRecipeShaped_1_20;
|
|
2419
|
+
registerSimpleShapeless(identifier: any, output: any, ingredients: any): AddonRecipeShapeless_1_17;
|
|
2420
|
+
registerShapeless(identifier: any): AddonRecipeShapeless_1_17;
|
|
2421
|
+
}
|
|
2422
|
+
|
|
2423
|
+
declare class BlockComponent {
|
|
2424
|
+
static setTick(interval_range: any, looping: any): Map<any, any>;
|
|
1726
2425
|
/**
|
|
1727
|
-
*
|
|
1728
|
-
* @param {
|
|
1729
|
-
* @returns
|
|
2426
|
+
*
|
|
2427
|
+
* @param {Array} custom_components
|
|
2428
|
+
* @returns
|
|
1730
2429
|
*/
|
|
1731
|
-
|
|
1732
|
-
anchor_from: string | undefined;
|
|
2430
|
+
static setCustomComponents(custom_components: any[]): Map<any, any>;
|
|
1733
2431
|
/**
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
2432
|
+
* 创建一个用于 Minecraft 方块的变换对象,并返回一个 Map。
|
|
2433
|
+
* @param {number[]} [translation=[0, 0, 0]] - 平移向量 [x, y, z]。
|
|
2434
|
+
* @param {number[]} [scale=[1, 1, 1]] - 缩放向量 [x, y, z]。
|
|
2435
|
+
* @param {number[]} [scale_pivot=[0, 0, 0]] - 缩放的枢轴点 [x, y, z]。
|
|
2436
|
+
* @param {number[]} [rotation=[0, 0, 0]] - 旋转向量(角度)[x, y, z]。
|
|
2437
|
+
* @param {number[]} [rotation_pivot=[0, 0, 0]] - 旋转的枢轴点 [x, y, z]。
|
|
2438
|
+
* @returns {Map} - 一个包含变换数据的 Map 对象。
|
|
2439
|
+
* @throws {Error} - 如果任何参数无效,则抛出错误。
|
|
2440
|
+
*/
|
|
2441
|
+
static setTransformation(translation?: number[], scale?: number[], scale_pivot?: number[], rotation?: number[], rotation_pivot?: number[]): Map<any, any>;
|
|
1740
2442
|
/**
|
|
1741
|
-
*
|
|
1742
|
-
* @param {
|
|
1743
|
-
* @returns {
|
|
2443
|
+
* 设置方块的呼吸行为。
|
|
2444
|
+
* @param {String} value - 呼吸行为,可选值为 "solid" 或 "air"。
|
|
2445
|
+
* @returns {Map} - 新的组件集合。
|
|
1744
2446
|
*/
|
|
1745
|
-
|
|
1746
|
-
inherit_max_sibling_width: boolean | undefined;
|
|
2447
|
+
static setBreathability(value: string): Map<any, any>;
|
|
1747
2448
|
/**
|
|
1748
|
-
*
|
|
1749
|
-
* @param {
|
|
1750
|
-
* @returns {
|
|
2449
|
+
* 启用或禁用方块的碰撞箱。
|
|
2450
|
+
* @param {Boolean} enabled - 是否启用碰撞箱。
|
|
2451
|
+
* @returns {Map} - 新的组件集合。
|
|
1751
2452
|
*/
|
|
1752
|
-
|
|
1753
|
-
inherit_max_sibling_height: boolean | undefined;
|
|
2453
|
+
static setCollisionBoxEnabled(enabled: boolean): Map<any, any>;
|
|
1754
2454
|
/**
|
|
1755
|
-
*
|
|
1756
|
-
* @param {
|
|
1757
|
-
* @
|
|
2455
|
+
* 设置自定义的碰撞箱。
|
|
2456
|
+
* @param {Array} origin - 碰撞箱的起点坐标 [x, y, z]。
|
|
2457
|
+
* @param {Array} size - 碰撞箱的大小 [width, height, depth]。
|
|
2458
|
+
* @returns {Map} - 新的组件集合。
|
|
1758
2459
|
*/
|
|
1759
|
-
|
|
1760
|
-
use_anchored_offset: boolean | undefined;
|
|
2460
|
+
static setCollisionBoxCustom(origin: any[], size: any[]): Map<any, any>;
|
|
1761
2461
|
/**
|
|
1762
|
-
*
|
|
1763
|
-
* @param {
|
|
1764
|
-
* @
|
|
2462
|
+
* 设置方块的合成台属性。
|
|
2463
|
+
* @param {Array} craftingTags - 合成标签。
|
|
2464
|
+
* @param {String} tableName - 合成台名称。
|
|
2465
|
+
* @returns {Map} - 新的组件集合。
|
|
1765
2466
|
*/
|
|
1766
|
-
|
|
1767
|
-
contained: boolean | undefined;
|
|
2467
|
+
static setCraftingTable(craftingTags: any[], tableName: string): Map<any, any>;
|
|
1768
2468
|
/**
|
|
1769
|
-
*
|
|
1770
|
-
* @param {
|
|
1771
|
-
* @returns {
|
|
2469
|
+
* 启用或禁用方块的爆炸抗性。
|
|
2470
|
+
* @param {Boolean} enabled - 是否启用爆炸抗性。
|
|
2471
|
+
* @returns {Map} - 新的组件集合。
|
|
1772
2472
|
*/
|
|
1773
|
-
|
|
1774
|
-
draggable: string | undefined;
|
|
2473
|
+
static setDestructibleByExplosionEnabled(enabled: boolean): Map<any, any>;
|
|
1775
2474
|
/**
|
|
1776
|
-
*
|
|
1777
|
-
* @param {
|
|
1778
|
-
* @returns {
|
|
2475
|
+
* 设置自定义的爆炸抗性。
|
|
2476
|
+
* @param {Number} explosionResistance - 爆炸抗性值。
|
|
2477
|
+
* @returns {Map} - 新的组件集合。
|
|
1779
2478
|
*/
|
|
1780
|
-
|
|
1781
|
-
follows_cursor: boolean | undefined;
|
|
1782
|
-
}
|
|
1783
|
-
|
|
1784
|
-
declare class DataBinding {
|
|
1785
|
-
setBinding(binding: any): this;
|
|
1786
|
-
bindings: any[] | undefined;
|
|
1787
|
-
binding: any;
|
|
1788
|
-
addDataBinding(dataBindingObject: any): this;
|
|
1789
|
-
}
|
|
1790
|
-
|
|
1791
|
-
/**
|
|
1792
|
-
* Factory 类
|
|
1793
|
-
*
|
|
1794
|
-
* 该类表示一个工厂控件,用于管理子控件的名称和 ID。
|
|
1795
|
-
*
|
|
1796
|
-
* 属性:
|
|
1797
|
-
* - control_name: string - 工厂的子控件名
|
|
1798
|
-
* - control_ids: object - 工厂的子控件 ID 对象组
|
|
1799
|
-
*/
|
|
1800
|
-
declare class Factory {
|
|
2479
|
+
static setDestructibleByExplosionCustom(explosionResistance: number): Map<any, any>;
|
|
1801
2480
|
/**
|
|
1802
|
-
*
|
|
1803
|
-
* @param {
|
|
1804
|
-
* @returns {
|
|
2481
|
+
* 启用或禁用方块的挖掘抗性。
|
|
2482
|
+
* @param {Boolean} enabled - 是否启用挖掘抗性。
|
|
2483
|
+
* @returns {Map} - 新的组件集合。
|
|
1805
2484
|
*/
|
|
1806
|
-
|
|
1807
|
-
factory: {} | undefined;
|
|
2485
|
+
static setDestructibleByMiningEnabled(enabled: boolean): Map<any, any>;
|
|
1808
2486
|
/**
|
|
1809
|
-
*
|
|
1810
|
-
* @param {
|
|
1811
|
-
* @
|
|
2487
|
+
* 设置自定义的挖掘抗性。
|
|
2488
|
+
* @param {Number} secondsToDestroy - 破坏所需时间(秒)。
|
|
2489
|
+
* @param {Array} itemSpecificSpeeds - 特定工具的挖掘速度。
|
|
2490
|
+
* @returns {Map} - 新的组件集合。
|
|
1812
2491
|
*/
|
|
1813
|
-
|
|
2492
|
+
static setDestructibleByMiningCustom(secondsToDestroy: number, itemSpecificSpeeds: any[]): Map<any, any>;
|
|
1814
2493
|
/**
|
|
1815
|
-
*
|
|
1816
|
-
* @param {
|
|
1817
|
-
* @returns {
|
|
2494
|
+
* 设置方块的显示名称。
|
|
2495
|
+
* @param {String} displayName - 显示名称。
|
|
2496
|
+
* @returns {Map} - 新的组件集合。
|
|
1818
2497
|
*/
|
|
1819
|
-
|
|
2498
|
+
static setDisplayName(displayName: string): Map<any, any>;
|
|
1820
2499
|
/**
|
|
1821
|
-
*
|
|
1822
|
-
* @param {
|
|
1823
|
-
* @
|
|
1824
|
-
* @returns {Factory} 返回当前实例以支持链式调用
|
|
2500
|
+
* 启用或禁用方块的易燃性。
|
|
2501
|
+
* @param {Boolean} enabled - 是否启用易燃性。
|
|
2502
|
+
* @returns {Map} - 新的组件集合。
|
|
1825
2503
|
*/
|
|
1826
|
-
|
|
1827
|
-
}
|
|
1828
|
-
|
|
1829
|
-
declare class Image extends UIElement {
|
|
1830
|
-
constructor(id: any, template: any);
|
|
1831
|
-
sprite: Sprite;
|
|
1832
|
-
layout: Layout;
|
|
1833
|
-
dataBinding: DataBinding;
|
|
1834
|
-
factory: Factory;
|
|
1835
|
-
setSprite(sprite: any): this;
|
|
1836
|
-
}
|
|
1837
|
-
|
|
1838
|
-
declare class Panel extends UIElement {
|
|
1839
|
-
constructor(id: any, template: any);
|
|
1840
|
-
layout: Layout;
|
|
1841
|
-
dataBinding: DataBinding;
|
|
1842
|
-
factory: Factory;
|
|
1843
|
-
setLayout(layout: any): this;
|
|
1844
|
-
}
|
|
1845
|
-
|
|
1846
|
-
/**
|
|
1847
|
-
* Text 类
|
|
1848
|
-
*
|
|
1849
|
-
* 该类表示一个文本控件,用于管理文本内容及其样式属性。
|
|
1850
|
-
*
|
|
1851
|
-
* 属性:
|
|
1852
|
-
* - text: string - 文本内容(默认值:空字符串)
|
|
1853
|
-
* - color: Vector [r, g, b] - 文本颜色(RGB 值,范围 0.0 到 1.0,默认值:[1.0, 1.0, 1.0])
|
|
1854
|
-
* - locked_color: Vector [r, g, b] - 父级禁用时的文本颜色
|
|
1855
|
-
* - shadow: boolean - 是否显示文本阴影(默认值:false)
|
|
1856
|
-
* - hide_hyphen: boolean - 是否隐藏断词连字符(默认值:false)
|
|
1857
|
-
* - notify_on_ellipses: string[] - 文本出现省略号时需通知的控件名称数组
|
|
1858
|
-
* - enable_profanity_filter: boolean - 是否启用脏话过滤(默认值:false)
|
|
1859
|
-
* - locked_alpha: float - 父级禁用时的透明度
|
|
1860
|
-
* - font_size: enum - 字体大小(可能值:small, normal, large, extra_large,默认值:normal)
|
|
1861
|
-
* - font_scale_factor: float - 字体缩放比例(默认值:1.0)
|
|
1862
|
-
* - localize: boolean - 是否启用本地化翻译(默认值:false)
|
|
1863
|
-
* - line_padding: number - 行间距
|
|
1864
|
-
* - font_type: enum - 字体类型(可能值:default, rune, unicode, smooth, MinecraftTen 或自定义字体,默认值:default)
|
|
1865
|
-
* - backup_font_type: enum - 备用字体类型(默认值:default)
|
|
1866
|
-
* - text_alignment: enum - 文本对齐方式(未定义时根据 anchor_from 和 anchor_to 自动调整)
|
|
1867
|
-
*/
|
|
1868
|
-
declare class Text {
|
|
2504
|
+
static setFlammableEnabled(enabled: boolean): Map<any, any>;
|
|
1869
2505
|
/**
|
|
1870
|
-
*
|
|
1871
|
-
* @param {
|
|
1872
|
-
* @
|
|
2506
|
+
* 设置自定义的易燃性。
|
|
2507
|
+
* @param {Number} catchChanceModifier - 着火概率。
|
|
2508
|
+
* @param {Number} destroyChanceModifier - 被火焰摧毁的概率。
|
|
2509
|
+
* @returns {Map} - 新的组件集合。
|
|
1873
2510
|
*/
|
|
1874
|
-
|
|
1875
|
-
text: string | undefined;
|
|
2511
|
+
static setFlammableCustom(catchChanceModifier: number, destroyChanceModifier: number): Map<any, any>;
|
|
1876
2512
|
/**
|
|
1877
|
-
*
|
|
1878
|
-
* @param {
|
|
1879
|
-
* @returns {
|
|
2513
|
+
* 设置方块的摩擦力。
|
|
2514
|
+
* @param {Number} value - 摩擦力值,范围为 0.0 到 0.9。
|
|
2515
|
+
* @returns {Map} - 新的组件集合。
|
|
1880
2516
|
*/
|
|
1881
|
-
|
|
1882
|
-
color: number[] | undefined;
|
|
2517
|
+
static setFriction(value: number): Map<any, any>;
|
|
1883
2518
|
/**
|
|
1884
|
-
*
|
|
1885
|
-
* @param {
|
|
1886
|
-
* @
|
|
2519
|
+
* 设置方块的几何模型。
|
|
2520
|
+
* @param {String} identifier - 几何模型标识符。
|
|
2521
|
+
* @param {Object} bone_visibility - 骨骼可见性配置。
|
|
2522
|
+
* @returns {Map} - 新的组件集合。
|
|
1887
2523
|
*/
|
|
1888
|
-
|
|
1889
|
-
locked_color: number[] | undefined;
|
|
2524
|
+
static setGeometry(identifier: string, bone_visibility: Object): Map<any, any>;
|
|
1890
2525
|
/**
|
|
1891
|
-
*
|
|
1892
|
-
* @param {
|
|
1893
|
-
* @
|
|
2526
|
+
* 设置方块的物品视觉属性。
|
|
2527
|
+
* @param {String} geometry - 几何模型标识符。
|
|
2528
|
+
* @param {Object} materialInstances - 材质实例配置。
|
|
2529
|
+
* @returns {Map} - 新的组件集合。
|
|
1894
2530
|
*/
|
|
1895
|
-
|
|
1896
|
-
shadow: boolean | undefined;
|
|
2531
|
+
static setItemVisual(geometry: string, materialInstances: Object): Map<any, any>;
|
|
1897
2532
|
/**
|
|
1898
|
-
*
|
|
1899
|
-
* @param {
|
|
1900
|
-
* @returns {
|
|
2533
|
+
* 设置方块的光衰减值。
|
|
2534
|
+
* @param {Number} value - 光的衰减值,范围为 0 到 15。
|
|
2535
|
+
* @returns {Map} - 新的组件集合。
|
|
1901
2536
|
*/
|
|
1902
|
-
|
|
1903
|
-
hide_hyphen: boolean | undefined;
|
|
2537
|
+
static setLightDampening(value: number): Map<any, any>;
|
|
1904
2538
|
/**
|
|
1905
|
-
*
|
|
1906
|
-
* @param {
|
|
1907
|
-
* @returns {
|
|
2539
|
+
* 设置方块的光照强度。
|
|
2540
|
+
* @param {Number} value - 光照强度,范围为 0 到 15。
|
|
2541
|
+
* @returns {Map} - 新的组件集合。
|
|
1908
2542
|
*/
|
|
1909
|
-
|
|
1910
|
-
notify_on_ellipses: string[] | undefined;
|
|
2543
|
+
static setLightEmission(value: number): Map<any, any>;
|
|
1911
2544
|
/**
|
|
1912
|
-
*
|
|
1913
|
-
* @param {
|
|
1914
|
-
* @
|
|
2545
|
+
* 设置方块的液体检测属性。
|
|
2546
|
+
* @param {Boolean} canContainLiquid - 是否可以包含液体。
|
|
2547
|
+
* @param {String} liquidType - 液体类型。
|
|
2548
|
+
* @param {String} onLiquidTouches - 对液体的反应方式。
|
|
2549
|
+
* @param {Array} stopsLiquidFlowingFromDirection - 阻止液体流动的方向。
|
|
2550
|
+
* @returns {Map} - 新的组件集合。
|
|
1915
2551
|
*/
|
|
1916
|
-
|
|
2552
|
+
static setLiquidDetection(canContainLiquid: boolean, liquidType: string, onLiquidTouches: string, stopsLiquidFlowingFromDirection: any[]): Map<any, any>;
|
|
1917
2553
|
/**
|
|
1918
|
-
*
|
|
1919
|
-
* @param {
|
|
1920
|
-
* @returns {
|
|
2554
|
+
* 设置方块的战利品表路径。
|
|
2555
|
+
* @param {String} path - 战利品表路径。
|
|
2556
|
+
* @returns {Map} - 新的组件集合。
|
|
1921
2557
|
*/
|
|
1922
|
-
|
|
1923
|
-
enable_profanity_filter: boolean | undefined;
|
|
2558
|
+
static setLoot(path: string): Map<any, any>;
|
|
1924
2559
|
/**
|
|
1925
|
-
*
|
|
1926
|
-
* @param {
|
|
1927
|
-
* @returns {
|
|
2560
|
+
* 设置方块的地图颜色。
|
|
2561
|
+
* @param {String|Array} value - 地图颜色,可以是十六进制字符串或 RGB 数组。
|
|
2562
|
+
* @returns {Map} - 新的组件集合。
|
|
1928
2563
|
*/
|
|
1929
|
-
|
|
1930
|
-
locked_alpha: number | undefined;
|
|
2564
|
+
static setMapColor(value: string | any[]): Map<any, any>;
|
|
1931
2565
|
/**
|
|
1932
|
-
*
|
|
1933
|
-
* @param {
|
|
1934
|
-
* @returns {
|
|
2566
|
+
* 设置方块的材质实例。
|
|
2567
|
+
* @param {Object} instances - 材质实例配置。
|
|
2568
|
+
* @returns {Map} - 新的组件集合。
|
|
1935
2569
|
*/
|
|
1936
|
-
|
|
1937
|
-
font_size: string | undefined;
|
|
2570
|
+
static setMaterialInstances(instances: Object): Map<any, any>;
|
|
1938
2571
|
/**
|
|
1939
|
-
*
|
|
1940
|
-
* @param {
|
|
1941
|
-
* @returns {
|
|
2572
|
+
* 设置方块的放置过滤条件。
|
|
2573
|
+
* @param {Array} conditions - 放置条件列表。
|
|
2574
|
+
* @returns {Map} - 新的组件集合。
|
|
1942
2575
|
*/
|
|
1943
|
-
|
|
1944
|
-
font_scale_factor: number | undefined;
|
|
2576
|
+
static setPlacementFilter(conditions: any[]): Map<any, any>;
|
|
1945
2577
|
/**
|
|
1946
|
-
*
|
|
1947
|
-
* @param {
|
|
1948
|
-
* @
|
|
2578
|
+
* 设置方块的红石导电性。
|
|
2579
|
+
* @param {Boolean} allowsWireToStepDown - 是否允许红石线向下阶梯连接。
|
|
2580
|
+
* @param {Boolean} redstoneConductor - 方块是否可以被红石信号激活。
|
|
2581
|
+
* @returns {Map} - 新的组件集合。
|
|
1949
2582
|
*/
|
|
1950
|
-
|
|
1951
|
-
localize: boolean | undefined;
|
|
2583
|
+
static setRedstoneConductivity(allowsWireToStepDown: boolean, redstoneConductor: boolean): Map<any, any>;
|
|
1952
2584
|
/**
|
|
1953
|
-
*
|
|
1954
|
-
* @param {
|
|
1955
|
-
* @returns {
|
|
2585
|
+
* 启用或禁用方块的选择框。
|
|
2586
|
+
* @param {Boolean} enabled - 是否启用选择框。
|
|
2587
|
+
* @returns {Map} - 新的组件集合。
|
|
1956
2588
|
*/
|
|
1957
|
-
|
|
1958
|
-
line_padding: number | undefined;
|
|
2589
|
+
static setSelectionBoxEnabled(enabled: boolean): Map<any, any>;
|
|
1959
2590
|
/**
|
|
1960
|
-
*
|
|
1961
|
-
* @param {
|
|
1962
|
-
* @
|
|
2591
|
+
* 设置自定义的选择框。
|
|
2592
|
+
* @param {Array} origin - 选择框的起点坐标 [x, y, z]。
|
|
2593
|
+
* @param {Array} size - 选择框的大小 [width, height, depth]。
|
|
2594
|
+
* @returns {Map} - 新的组件集合。
|
|
1963
2595
|
*/
|
|
1964
|
-
|
|
1965
|
-
font_type: string | undefined;
|
|
2596
|
+
static setSelectionBoxCustom(origin: any[], size: any[]): Map<any, any>;
|
|
1966
2597
|
/**
|
|
1967
|
-
*
|
|
1968
|
-
* @param {
|
|
1969
|
-
* @returns {
|
|
2598
|
+
* 将多个组件集合合并为一个。
|
|
2599
|
+
* @param {...Map} componentMaps - 多个组件集合。
|
|
2600
|
+
* @returns {Map} - 合并后的组件集合。
|
|
1970
2601
|
*/
|
|
1971
|
-
|
|
1972
|
-
backup_font_type: string | undefined;
|
|
2602
|
+
static combineComponents(...componentMaps: Map<any, any>[]): Map<any, any>;
|
|
1973
2603
|
/**
|
|
1974
|
-
*
|
|
1975
|
-
* @param {
|
|
1976
|
-
* @returns {
|
|
2604
|
+
* 获取当前组件的 JSON 表示。
|
|
2605
|
+
* @param {Map} components - 组件集合。
|
|
2606
|
+
* @returns {Object} - 组件的 JSON 对象。
|
|
1977
2607
|
*/
|
|
1978
|
-
|
|
1979
|
-
text_alignment: string | undefined;
|
|
1980
|
-
}
|
|
1981
|
-
|
|
1982
|
-
declare class Label extends UIElement {
|
|
1983
|
-
constructor(id: any, template: any);
|
|
1984
|
-
text: Text;
|
|
1985
|
-
layout: Layout;
|
|
1986
|
-
dataBinding: DataBinding;
|
|
1987
|
-
factory: Factory;
|
|
1988
|
-
setLayout(layout: any): this;
|
|
1989
|
-
setText(text: any): this;
|
|
1990
|
-
}
|
|
1991
|
-
|
|
1992
|
-
declare class UISystem {
|
|
1993
|
-
constructor(identifier: any, path: any);
|
|
1994
|
-
identifier: any;
|
|
1995
|
-
namespace: any;
|
|
1996
|
-
name: any;
|
|
1997
|
-
path: any;
|
|
1998
|
-
elements: Map<any, any>;
|
|
1999
|
-
animations: Map<any, any>;
|
|
2000
|
-
addElement(element: any): this;
|
|
2001
|
-
getElement(element_name: any): any;
|
|
2002
|
-
addAnimation(name: any, value: any): void;
|
|
2003
|
-
getAnimation(animation_name: any): any;
|
|
2004
|
-
toJson(): {
|
|
2005
|
-
namespace: any;
|
|
2006
|
-
};
|
|
2608
|
+
static toJSON(components: Map<any, any>): Object;
|
|
2007
2609
|
}
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
* DataBinding 类
|
|
2011
|
-
*
|
|
2012
|
-
* 该类表示数据绑定配置,用于将硬编码值或变量绑定到元素属性。
|
|
2013
|
-
*
|
|
2014
|
-
* 属性:
|
|
2015
|
-
* - ignored: boolean - 是否忽略绑定(默认值:false)
|
|
2016
|
-
* - binding_type: enum - 绑定类型(可能值:global, view, collection, collection_details, none)
|
|
2017
|
-
* - binding_name: string - 数据绑定名称或条件的值
|
|
2018
|
-
* - binding_name_override: string - 应用 binding_name 值的 UI 元素属性名称
|
|
2019
|
-
* - binding_collection_name: string - 要使用的集合名称
|
|
2020
|
-
* - binding_collection_prefix: string - 集合前缀
|
|
2021
|
-
* - binding_condition: enum - 数据绑定的条件(可能值:always, always_when_visible, visible, once, none, visibility_changed)
|
|
2022
|
-
* - source_control_name: string - 要观察其属性值的 UI 元素名称
|
|
2023
|
-
* - source_property_name: string - 存储 source_control_name 引用的 UI 元素的属性值
|
|
2024
|
-
* - target_property_name: string - 应用 source_property_name 值的 UI 元素属性
|
|
2025
|
-
* - resolve_sibling_scope: boolean - 是否允许选择同级元素而非子元素(默认值:false)
|
|
2026
|
-
*/
|
|
2027
|
-
declare class DataBindingObject {
|
|
2610
|
+
|
|
2611
|
+
declare class ItemComponent {
|
|
2028
2612
|
/**
|
|
2029
|
-
*
|
|
2030
|
-
* @param {
|
|
2031
|
-
* @
|
|
2613
|
+
* 物品的耐久度组件
|
|
2614
|
+
* @param {number} max_durability 最大耐久
|
|
2615
|
+
* @param {number} damage_chance_min 损坏最小几率
|
|
2616
|
+
* @param {number} damage_chance_max 损坏最大几率
|
|
2617
|
+
* @returns {ItemComponent}
|
|
2032
2618
|
*/
|
|
2033
|
-
|
|
2034
|
-
|
|
2619
|
+
static setDurability(max_durability: number, damage_chance_min?: number, damage_chance_max?: number): ItemComponent;
|
|
2620
|
+
static setBlockPlacer(block: any, replace_block_item: any, use_on: any): Map<any, any>;
|
|
2035
2621
|
/**
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2622
|
+
*
|
|
2623
|
+
* @param {Array} custom_components
|
|
2624
|
+
* @returns
|
|
2625
|
+
*/
|
|
2626
|
+
static setCustomComponents(custom_components: any[]): Map<any, any>;
|
|
2627
|
+
/**
|
|
2628
|
+
* 设置物品的可投掷组件。
|
|
2629
|
+
* @param {Boolean} doSwingAnimation - 是否使用挥动动画。
|
|
2630
|
+
* @param {Number} launchPowerScale - 投掷力量的缩放比例。
|
|
2631
|
+
* @param {Number} maxDrawDuration - 最大蓄力时间。
|
|
2632
|
+
* @param {Number} maxLaunchPower - 最大投掷力量。
|
|
2633
|
+
* @param {Number} minDrawDuration - 最小蓄力时间。
|
|
2634
|
+
* @param {Boolean} scalePowerByDrawDuration - 投掷力量是否随蓄力时间增加。
|
|
2635
|
+
* @returns {Map} - 新的组件集合。
|
|
2039
2636
|
*/
|
|
2040
|
-
|
|
2041
|
-
binding_type: string | undefined;
|
|
2637
|
+
static setThrowable(doSwingAnimation?: boolean, launchPowerScale?: number, maxDrawDuration?: number, maxLaunchPower?: number, minDrawDuration?: number, scalePowerByDrawDuration?: boolean): Map<any, any>;
|
|
2042
2638
|
/**
|
|
2043
|
-
*
|
|
2044
|
-
* @param {
|
|
2045
|
-
* @returns {
|
|
2639
|
+
* 设置物品的显示名称。
|
|
2640
|
+
* @param {String} displayName - 显示名称或本地化键。
|
|
2641
|
+
* @returns {Map} - 新的组件集合。
|
|
2046
2642
|
*/
|
|
2047
|
-
|
|
2048
|
-
binding_name: string | undefined;
|
|
2643
|
+
static setDisplayName(displayName: string): Map<any, any>;
|
|
2049
2644
|
/**
|
|
2050
|
-
*
|
|
2051
|
-
* @param {
|
|
2052
|
-
* @
|
|
2645
|
+
* 设置物品的食物组件。
|
|
2646
|
+
* @param {Boolean} canAlwaysEat - 是否随时可以食用。
|
|
2647
|
+
* @param {Number} nutrition - 营养值。
|
|
2648
|
+
* @param {Number} saturationModifier - 饱和度修正值。
|
|
2649
|
+
* @param {String} [usingConvertsTo] - 食用后转换的目标物品。
|
|
2650
|
+
* @returns {Map} - 新的组件集合。
|
|
2053
2651
|
*/
|
|
2054
|
-
|
|
2055
|
-
binding_name_override: string | undefined;
|
|
2652
|
+
static setFoodComponent(canAlwaysEat: boolean, nutrition: number, saturationModifier: number, usingConvertsTo?: string): Map<any, any>;
|
|
2056
2653
|
/**
|
|
2057
|
-
*
|
|
2058
|
-
* @param {
|
|
2059
|
-
* @returns {
|
|
2654
|
+
* 设置物品的燃料组件。
|
|
2655
|
+
* @param {Number} duration - 燃料燃烧的持续时间(秒),最小值为 0.05。
|
|
2656
|
+
* @returns {Map} - 新的组件集合。
|
|
2060
2657
|
*/
|
|
2061
|
-
|
|
2062
|
-
binding_collection_name: string | undefined;
|
|
2658
|
+
static setFuel(duration: number): Map<any, any>;
|
|
2063
2659
|
/**
|
|
2064
|
-
*
|
|
2065
|
-
* @param {
|
|
2066
|
-
* @returns {
|
|
2660
|
+
* 设置物品的附魔光效组件。
|
|
2661
|
+
* @param {Boolean} hasGlint - 是否显示附魔光效。
|
|
2662
|
+
* @returns {Map} - 新的组件集合。
|
|
2067
2663
|
*/
|
|
2068
|
-
|
|
2069
|
-
binding_collection_prefix: string | undefined;
|
|
2664
|
+
static setGlint(hasGlint: boolean): Map<any, any>;
|
|
2070
2665
|
/**
|
|
2071
|
-
*
|
|
2072
|
-
* @param {
|
|
2073
|
-
* @returns {
|
|
2666
|
+
* 设置物品的手持渲染方式组件。
|
|
2667
|
+
* @param {Boolean} isHandEquipped - 是否像工具一样渲染。
|
|
2668
|
+
* @returns {Map} - 新的组件集合。
|
|
2074
2669
|
*/
|
|
2075
|
-
|
|
2076
|
-
binding_condition: string | undefined;
|
|
2670
|
+
static setHandEquipped(isHandEquipped: boolean): Map<any, any>;
|
|
2077
2671
|
/**
|
|
2078
|
-
*
|
|
2079
|
-
* @param {
|
|
2080
|
-
* @returns {
|
|
2672
|
+
* 设置物品的图标组件。
|
|
2673
|
+
* @param {String} texture - 图标纹理名称。
|
|
2674
|
+
* @returns {Map} - 新的组件集合。
|
|
2081
2675
|
*/
|
|
2082
|
-
|
|
2083
|
-
source_control_name: string | undefined;
|
|
2676
|
+
static setIcon(texture: string): Map<any, any>;
|
|
2084
2677
|
/**
|
|
2085
|
-
*
|
|
2086
|
-
* @param {
|
|
2087
|
-
* @returns {
|
|
2678
|
+
* 设置物品的最大堆叠数量组件。
|
|
2679
|
+
* @param {Number} maxStackSize - 最大堆叠数量,默认值为 64。
|
|
2680
|
+
* @returns {Map} - 新的组件集合。
|
|
2088
2681
|
*/
|
|
2089
|
-
|
|
2090
|
-
source_property_name: string | undefined;
|
|
2682
|
+
static setMaxStackSize(maxStackSize?: number): Map<any, any>;
|
|
2091
2683
|
/**
|
|
2092
|
-
*
|
|
2093
|
-
* @param {
|
|
2094
|
-
* @
|
|
2684
|
+
* 设置物品的投射物组件。
|
|
2685
|
+
* @param {Number} [minimumCriticalPower] - 投射物需要蓄力多久才能造成暴击。
|
|
2686
|
+
* @param {String} [projectileEntity] - 作为投射物发射的实体名称。
|
|
2687
|
+
* @returns {Map} - 新的组件集合。
|
|
2095
2688
|
*/
|
|
2096
|
-
|
|
2097
|
-
target_property_name: string | undefined;
|
|
2689
|
+
static setProjectile(minimumCriticalPower?: number, projectileEntity?: string): Map<any, any>;
|
|
2098
2690
|
/**
|
|
2099
|
-
*
|
|
2100
|
-
* @param {
|
|
2101
|
-
* @
|
|
2691
|
+
* 设置物品的使用修饰组件。
|
|
2692
|
+
* @param {Number} [movementModifier] - 使用物品时玩家移动速度的缩放值。
|
|
2693
|
+
* @param {Number} [useDuration] - 物品使用所需的时间(秒)。
|
|
2694
|
+
* @returns {Map} - 新的组件集合。
|
|
2102
2695
|
*/
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
static
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2696
|
+
static setUseModifiers(movementModifier?: number, useDuration?: number): Map<any, any>;
|
|
2697
|
+
/**
|
|
2698
|
+
* 设置物品的可穿戴组件。
|
|
2699
|
+
* @param {Number} [protection=0] - 物品提供的保护值。
|
|
2700
|
+
* @param {String} [slot] - 物品可以穿戴的槽位(如 "head"、"chest" 等)。
|
|
2701
|
+
* @returns {Map} - 新的组件集合。
|
|
2702
|
+
*/
|
|
2703
|
+
static setWearable(protection?: number, slot?: string): Map<any, any>;
|
|
2704
|
+
/**
|
|
2705
|
+
* 设置物品的使用动画组件。
|
|
2706
|
+
* @param {String} animation - 物品使用时的动画类型(如 "eat"、"drink" 等)。
|
|
2707
|
+
* @returns {Map} - 新的组件集合。
|
|
2708
|
+
* @throws {Error} - 如果 animation 不是字符串类型。
|
|
2709
|
+
*/
|
|
2710
|
+
static setUseAnimation(animation: string): Map<any, any>;
|
|
2711
|
+
/**
|
|
2712
|
+
* 将多个组件集合合并为一个。
|
|
2713
|
+
* @param {...Map} componentMaps - 多个组件集合。
|
|
2714
|
+
* @returns {Map} - 合并后的组件集合。
|
|
2715
|
+
*/
|
|
2716
|
+
static combineComponents(...componentMaps: Map<any, any>[]): Map<any, any>;
|
|
2717
|
+
/**
|
|
2718
|
+
* 获取当前组件的 JSON 表示。
|
|
2719
|
+
* @param {Map} components - 组件集合。
|
|
2720
|
+
* @returns {Object} - 组件的 JSON 对象。
|
|
2721
|
+
*/
|
|
2722
|
+
static toJSON(components: Map<any, any>): Object;
|
|
2116
2723
|
}
|
|
2117
2724
|
|
|
2118
2725
|
declare class ItemTextureManager {
|
|
@@ -2134,108 +2741,4 @@ declare namespace FlipbookTextures {
|
|
|
2134
2741
|
function registerFlipbookTexture(atlas_tile: any, texture: any, ticks_per_frame: any, options?: {}): void;
|
|
2135
2742
|
}
|
|
2136
2743
|
|
|
2137
|
-
|
|
2138
|
-
static "__#6305@#ui_system_map": {};
|
|
2139
|
-
static "__#6305@#ui_def_list": any[];
|
|
2140
|
-
static registerUISystem(ui_system: any): void;
|
|
2141
|
-
static addOuterUIdefs(ui_defs: any): void;
|
|
2142
|
-
static submit(): void;
|
|
2143
|
-
}
|
|
2144
|
-
|
|
2145
|
-
declare class CollectionPanel extends UIElement {
|
|
2146
|
-
constructor(id: any, template: any);
|
|
2147
|
-
layout: Layout;
|
|
2148
|
-
dataBinding: DataBinding;
|
|
2149
|
-
factory: Factory;
|
|
2150
|
-
setCollectionName(collection_name: any): this;
|
|
2151
|
-
setLayout(layout: any): this;
|
|
2152
|
-
}
|
|
2153
|
-
|
|
2154
|
-
/**
|
|
2155
|
-
* Grid 类
|
|
2156
|
-
*
|
|
2157
|
-
* 该类表示一个网格控件属性,用于管理网格布局及其相关属性。
|
|
2158
|
-
*
|
|
2159
|
-
* 属性:
|
|
2160
|
-
* - grid_dimensions: Vector [columns, rows] - 网格的列数和行数
|
|
2161
|
-
* - maximum_grid_items: int - 网格生成的最大项目数
|
|
2162
|
-
* - grid_dimension_binding: string - 网格尺寸的绑定名称
|
|
2163
|
-
* - grid_rescaling_type: enum - 网格重新缩放方向(可能值:vertical, horizontal, none,默认值:none)
|
|
2164
|
-
* - grid_fill_direction: enum - 网格填充方向(可能值:vertical, horizontal, none,默认值:none)
|
|
2165
|
-
* - grid_item_template: string - 处理集合的子元素名称(例如:"common.container_item")
|
|
2166
|
-
* - precached_grid_item_count: int - 预缓存的网格项目数量
|
|
2167
|
-
*/
|
|
2168
|
-
declare class GridProp {
|
|
2169
|
-
/**
|
|
2170
|
-
* 设置网格的列数和行数。
|
|
2171
|
-
* @param {number[]} dimensions - 格式为 [columns, rows]
|
|
2172
|
-
* @returns {GridProp} 返回当前实例以支持链式调用
|
|
2173
|
-
*/
|
|
2174
|
-
setGridDimensions(dimensions: number[]): GridProp;
|
|
2175
|
-
grid_dimensions: number[] | undefined;
|
|
2176
|
-
/**
|
|
2177
|
-
* 设置网格生成的最大项目数。
|
|
2178
|
-
* @param {number} maxItems - 最大项目数
|
|
2179
|
-
* @returns {GridProp} 返回当前实例以支持链式调用
|
|
2180
|
-
*/
|
|
2181
|
-
setMaximumGridItems(maxItems: number): GridProp;
|
|
2182
|
-
maximum_grid_items: number | undefined;
|
|
2183
|
-
/**
|
|
2184
|
-
* 设置网格尺寸的绑定名称。
|
|
2185
|
-
* @param {string} binding - 绑定名称
|
|
2186
|
-
* @returns {GridProp} 返回当前实例以支持链式调用
|
|
2187
|
-
*/
|
|
2188
|
-
setGridDimensionBinding(binding: string): GridProp;
|
|
2189
|
-
grid_dimension_binding: string | undefined;
|
|
2190
|
-
/**
|
|
2191
|
-
* 设置网格重新缩放方向。
|
|
2192
|
-
* @param {string} type - 可能值:vertical, horizontal, none(默认值:none)
|
|
2193
|
-
* @returns {GridProp} 返回当前实例以支持链式调用
|
|
2194
|
-
*/
|
|
2195
|
-
setGridRescalingType(type?: string): GridProp;
|
|
2196
|
-
grid_rescaling_type: string | undefined;
|
|
2197
|
-
/**
|
|
2198
|
-
* 设置网格填充方向。
|
|
2199
|
-
* @param {string} direction - 可能值:vertical, horizontal, none(默认值:none)
|
|
2200
|
-
* @returns {GridProp} 返回当前实例以支持链式调用
|
|
2201
|
-
*/
|
|
2202
|
-
setGridFillDirection(direction?: string): GridProp;
|
|
2203
|
-
grid_fill_direction: string | undefined;
|
|
2204
|
-
/**
|
|
2205
|
-
* 设置处理集合的子元素名称。
|
|
2206
|
-
* @param {string} template - 元素名称(例如:"common.container_item")
|
|
2207
|
-
* @returns {GridProp} 返回当前实例以支持链式调用
|
|
2208
|
-
*/
|
|
2209
|
-
setGridItemTemplate(template: string): GridProp;
|
|
2210
|
-
grid_item_template: string | undefined;
|
|
2211
|
-
/**
|
|
2212
|
-
* 设置预缓存的网格项目数量。
|
|
2213
|
-
* @param {number} count - 预缓存数量
|
|
2214
|
-
* @returns {GridProp} 返回当前实例以支持链式调用
|
|
2215
|
-
*/
|
|
2216
|
-
setPrecachedGridItemCount(count: number): GridProp;
|
|
2217
|
-
precached_grid_item_count: number | undefined;
|
|
2218
|
-
}
|
|
2219
|
-
|
|
2220
|
-
declare class Grid extends CollectionPanel {
|
|
2221
|
-
gridNum: number;
|
|
2222
|
-
grid: GridProp;
|
|
2223
|
-
setGridProp(grid_prop: any): this;
|
|
2224
|
-
addGridItem(grid_position: any, content: any): this;
|
|
2225
|
-
}
|
|
2226
|
-
|
|
2227
|
-
declare class StackPanel extends Panel {
|
|
2228
|
-
type: string;
|
|
2229
|
-
orientation: string;
|
|
2230
|
-
stackNum: number;
|
|
2231
|
-
addStack(size: any, content: any, debug?: boolean): this;
|
|
2232
|
-
/**
|
|
2233
|
-
* Possible values:
|
|
2234
|
-
vertical
|
|
2235
|
-
horizontal
|
|
2236
|
-
* @param {*} orientation
|
|
2237
|
-
*/
|
|
2238
|
-
setOrientation(orientation: any): this;
|
|
2239
|
-
}
|
|
2240
|
-
|
|
2241
|
-
export { BlockAPI, BlockComponent, type ConstructorOf, DataBindingObject, EntityAPI, FeatureAPI, FlipbookTextures, GRegistry, Grid, type ISerializer, Image, ItemAPI, ItemCategory, ItemComponent, ItemTextureManager, Label, Matrix, Panel, RecipeAPI, Serializable, Serializer, ServerFormSystem, ServerUISystem, StackPanel, UIElement, UISystem, UISystemRegistry, Vec3, Vec4, type Vector3, type Vector4, getMetadata, getOrCreateMetadata, registry, serialize, terrainTextureManager };
|
|
2744
|
+
export { BlockAPI, BlockComponent, Button, ButtonMapping$1 as ButtonMapping, ChestUISystem, CollectionPanel, type ConstructorOf, ContainerUISystem, Control, DataBinding, DataBindingObject, type EncodeDecoder, EntityAPI, Factory, FeatureAPI, FlipbookTextures, type FloatLiteral, Grid, GridProp, Guidebook, type ISerializer, Image, Input, ItemAPI, ItemCategory, ItemComponent, ItemTextureManager, Label, Layout, Matrix, Modifications, Panel, type RawType, RecipeAPI, ScrollView, ScrollingPanel, Serializable, Serializer, ServerFormSystem, ServerUISystem, Sound, Sprite, StackPanel, Text, UIElement, UISystem, UISystemRegistry, UISystemRegistryServer, Vec3, Vec4, type Vector3, type Vector4, decode, defaultSerializer, encode, f64, form_button_panel, getMetadata, getOrCreateMetadata, isRawJSON, jsonEncodeDecoder, jsonEncoderReplacer, registry, serialize, terrainTextureManager };
|