sapdon 3.0.3 → 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 +11 -3
- package/doc/api.md +2 -2
- package/doc/oc/index.md +0 -0
- package/doc/sapdon-ts.md +7 -5
- package/package.json +18 -19
- package/{dist/cli/dev-server/server.d.ts → prod/cli/index.d.ts} +9 -3
- package/prod/cli/index.js +1 -0
- package/prod/cli/start.js +1428 -0
- package/{dist → prod}/core/index.d.ts +2325 -1643
- package/prod/core/index.js +59017 -0
- package/{dist → prod}/oc/index.d.ts +3 -3
- package/prod/oc/index.js +1 -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 -234
- 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.js +0 -59
- package/dist/cli/dev-server/syncFiles.d.ts +0 -3
- package/dist/cli/dev-server/syncFiles.js +0 -37
- package/dist/cli/index.d.ts +0 -23
- package/dist/cli/index.js +0 -1
- 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/start.js +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/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/basicBundle.d.ts +0 -13
- package/dist/core/entity/bundles/basicBundle.js +0 -45
- 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 -347
- package/dist/core/entity/data/nativeEntityData.d.ts +0 -9
- package/dist/core/entity/data/nativeEntityData.js +0 -38
- package/dist/core/entity/entity.d.ts +0 -15
- package/dist/core/entity/entity.js +0 -18
- 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 -16
- 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/index.js +0 -1
- package/doc/cli.md +0 -24
- /package/doc/hello_sapdon/{sapdon/344/275/277/347/224/250/346/225/231/347/250/213.md" → hello_sapdon.md} +0 -0
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
export class AddonClientEntity {
|
|
2
|
-
/**
|
|
3
|
-
* 客户端实体类
|
|
4
|
-
* @param {string} format_version 格式版本
|
|
5
|
-
* @param {AddonClientEntityDefinition} definitions 实体定义
|
|
6
|
-
*/
|
|
7
|
-
constructor(format_version: string, definitions: AddonClientEntityDefinition);
|
|
8
|
-
format_version: string;
|
|
9
|
-
definitions: AddonClientEntityDefinition;
|
|
10
|
-
/**
|
|
11
|
-
* 将对象转换为 JSON 格式
|
|
12
|
-
* @returns {Object} JSON 对象
|
|
13
|
-
*/
|
|
14
|
-
toJson(): Object;
|
|
15
|
-
}
|
|
16
|
-
export class AddonClientEntityDefinition {
|
|
17
|
-
/**
|
|
18
|
-
* 客户端实体定义类
|
|
19
|
-
* @param {Description} description 实体描述
|
|
20
|
-
*/
|
|
21
|
-
constructor(description: Description);
|
|
22
|
-
description: Description;
|
|
23
|
-
}
|
|
24
|
-
export class AddonClientEntityDescription {
|
|
25
|
-
/**
|
|
26
|
-
* 实体描述类
|
|
27
|
-
* @param {string} identifier 实体标识符
|
|
28
|
-
* @param {string} min_engine_version 最低引擎版本
|
|
29
|
-
*/
|
|
30
|
-
constructor(identifier: string, min_engine_version: string);
|
|
31
|
-
identifier: string;
|
|
32
|
-
min_engine_version: string;
|
|
33
|
-
/**
|
|
34
|
-
* 添加材质
|
|
35
|
-
* @param {string} name 材质名称
|
|
36
|
-
* @param {string} material 材质路径
|
|
37
|
-
* @returns {AddonClientEntityDescription} 返回当前实例以支持链式调用
|
|
38
|
-
*/
|
|
39
|
-
addMaterial(name: string, material: string): AddonClientEntityDescription;
|
|
40
|
-
materials: {} | undefined;
|
|
41
|
-
/**
|
|
42
|
-
* 添加纹理
|
|
43
|
-
* @param {string} name 纹理名称
|
|
44
|
-
* @param {string} texture 纹理路径
|
|
45
|
-
* @returns {AddonClientEntityDescription} 返回当前实例以支持链式调用
|
|
46
|
-
*/
|
|
47
|
-
addTexture(name: string, texture: string): AddonClientEntityDescription;
|
|
48
|
-
textures: {} | undefined;
|
|
49
|
-
/**
|
|
50
|
-
* 添加几何体
|
|
51
|
-
* @param {string} name 几何体名称
|
|
52
|
-
* @param {string} geometry 几何体路径
|
|
53
|
-
* @returns {AddonClientEntityDescription} 返回当前实例以支持链式调用
|
|
54
|
-
*/
|
|
55
|
-
addGeometry(name: string, geometry: string): AddonClientEntityDescription;
|
|
56
|
-
geometry: {} | undefined;
|
|
57
|
-
/**
|
|
58
|
-
* 添加动画
|
|
59
|
-
* @param {string} name 动画名称
|
|
60
|
-
* @param {string} animation 动画路径
|
|
61
|
-
* @returns {AddonClientEntityDescription} 返回当前实例以支持链式调用
|
|
62
|
-
*/
|
|
63
|
-
addAnimation(name: string, animation: string): AddonClientEntityDescription;
|
|
64
|
-
animations: {} | undefined;
|
|
65
|
-
/**
|
|
66
|
-
* 添加动画控制器
|
|
67
|
-
* @param {string} name 控制器名称
|
|
68
|
-
* @param {string} controller 控制器路径
|
|
69
|
-
* @returns {AddonClientEntityDescription} 返回当前实例以支持链式调用
|
|
70
|
-
*/
|
|
71
|
-
addAnimationController(name: string, controller: string): AddonClientEntityDescription;
|
|
72
|
-
animation_controllers: any[] | undefined;
|
|
73
|
-
/**
|
|
74
|
-
* 添加渲染控制器
|
|
75
|
-
* @param {string} controller 渲染控制器路径
|
|
76
|
-
* @returns {AddonClientEntityDescription} 返回当前实例以支持链式调用
|
|
77
|
-
*/
|
|
78
|
-
addRenderController(controller: string): AddonClientEntityDescription;
|
|
79
|
-
render_controllers: any[] | undefined;
|
|
80
|
-
/**
|
|
81
|
-
* 添加定位器
|
|
82
|
-
* @param {string} name 定位器名称
|
|
83
|
-
* @param {Object} locator 定位器数据
|
|
84
|
-
* @returns {AddonClientEntityDescription} 返回当前实例以支持链式调用
|
|
85
|
-
*/
|
|
86
|
-
addLocator(name: string, locator: Object): AddonClientEntityDescription;
|
|
87
|
-
locators: {} | undefined;
|
|
88
|
-
/**
|
|
89
|
-
* 设置生成蛋
|
|
90
|
-
* @param {string} texture 生成蛋纹理
|
|
91
|
-
* @param {number} texture_index 生成蛋纹理索引
|
|
92
|
-
* @returns {AddonClientEntityDescription} 返回当前实例以支持链式调用
|
|
93
|
-
*/
|
|
94
|
-
setSpawnEgg(texture: string, texture_index: number): AddonClientEntityDescription;
|
|
95
|
-
spawn_egg: {
|
|
96
|
-
texture: string;
|
|
97
|
-
texture_index: number;
|
|
98
|
-
} | undefined;
|
|
99
|
-
/**
|
|
100
|
-
* 设置脚本
|
|
101
|
-
* @param {string} key 脚本键
|
|
102
|
-
* @param {string} value 脚本值
|
|
103
|
-
* @returns {AddonClientEntityDescription} 返回当前实例以支持链式调用
|
|
104
|
-
*/
|
|
105
|
-
setScript(key: string, value: string): AddonClientEntityDescription;
|
|
106
|
-
scripts: {} | undefined;
|
|
107
|
-
}
|
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
export class AddonClientEntity {
|
|
2
|
-
/**
|
|
3
|
-
* 客户端实体类
|
|
4
|
-
* @param {string} format_version 格式版本
|
|
5
|
-
* @param {AddonClientEntityDefinition} definitions 实体定义
|
|
6
|
-
*/
|
|
7
|
-
constructor(format_version, definitions) {
|
|
8
|
-
this.format_version = format_version;
|
|
9
|
-
this.definitions = definitions;
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* 将对象转换为 JSON 格式
|
|
13
|
-
* @returns {Object} JSON 对象
|
|
14
|
-
*/
|
|
15
|
-
toJson() {
|
|
16
|
-
return {
|
|
17
|
-
format_version: this.format_version,
|
|
18
|
-
["minecraft:client_entity"]: this.definitions
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
export class AddonClientEntityDefinition {
|
|
23
|
-
/**
|
|
24
|
-
* 客户端实体定义类
|
|
25
|
-
* @param {Description} description 实体描述
|
|
26
|
-
*/
|
|
27
|
-
constructor(description) {
|
|
28
|
-
this.description = description;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
export class AddonClientEntityDescription {
|
|
32
|
-
/**
|
|
33
|
-
* 实体描述类
|
|
34
|
-
* @param {string} identifier 实体标识符
|
|
35
|
-
* @param {string} min_engine_version 最低引擎版本
|
|
36
|
-
*/
|
|
37
|
-
constructor(identifier, min_engine_version) {
|
|
38
|
-
this.identifier = identifier;
|
|
39
|
-
this.min_engine_version = min_engine_version;
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* 添加材质
|
|
43
|
-
* @param {string} name 材质名称
|
|
44
|
-
* @param {string} material 材质路径
|
|
45
|
-
* @returns {AddonClientEntityDescription} 返回当前实例以支持链式调用
|
|
46
|
-
*/
|
|
47
|
-
addMaterial(name, material) {
|
|
48
|
-
if (this.materials == undefined)
|
|
49
|
-
this.materials = {};
|
|
50
|
-
this.materials[name] = material;
|
|
51
|
-
return this;
|
|
52
|
-
}
|
|
53
|
-
/**
|
|
54
|
-
* 添加纹理
|
|
55
|
-
* @param {string} name 纹理名称
|
|
56
|
-
* @param {string} texture 纹理路径
|
|
57
|
-
* @returns {AddonClientEntityDescription} 返回当前实例以支持链式调用
|
|
58
|
-
*/
|
|
59
|
-
addTexture(name, texture) {
|
|
60
|
-
if (this.textures == undefined)
|
|
61
|
-
this.textures = {};
|
|
62
|
-
this.textures[name] = texture;
|
|
63
|
-
return this;
|
|
64
|
-
}
|
|
65
|
-
/**
|
|
66
|
-
* 添加几何体
|
|
67
|
-
* @param {string} name 几何体名称
|
|
68
|
-
* @param {string} geometry 几何体路径
|
|
69
|
-
* @returns {AddonClientEntityDescription} 返回当前实例以支持链式调用
|
|
70
|
-
*/
|
|
71
|
-
addGeometry(name, geometry) {
|
|
72
|
-
if (this.geometry == undefined)
|
|
73
|
-
this.geometry = {};
|
|
74
|
-
this.geometry[name] = geometry;
|
|
75
|
-
return this;
|
|
76
|
-
}
|
|
77
|
-
/**
|
|
78
|
-
* 添加动画
|
|
79
|
-
* @param {string} name 动画名称
|
|
80
|
-
* @param {string} animation 动画路径
|
|
81
|
-
* @returns {AddonClientEntityDescription} 返回当前实例以支持链式调用
|
|
82
|
-
*/
|
|
83
|
-
addAnimation(name, animation) {
|
|
84
|
-
if (this.animations == undefined)
|
|
85
|
-
this.animations = {};
|
|
86
|
-
this.animations[name] = animation;
|
|
87
|
-
return this;
|
|
88
|
-
}
|
|
89
|
-
/**
|
|
90
|
-
* 添加动画控制器
|
|
91
|
-
* @param {string} name 控制器名称
|
|
92
|
-
* @param {string} controller 控制器路径
|
|
93
|
-
* @returns {AddonClientEntityDescription} 返回当前实例以支持链式调用
|
|
94
|
-
*/
|
|
95
|
-
addAnimationController(name, controller) {
|
|
96
|
-
if (this.animation_controllers == undefined)
|
|
97
|
-
this.animation_controllers = [];
|
|
98
|
-
this.animation_controllers.push({ [name]: controller });
|
|
99
|
-
return this;
|
|
100
|
-
}
|
|
101
|
-
/**
|
|
102
|
-
* 添加渲染控制器
|
|
103
|
-
* @param {string} controller 渲染控制器路径
|
|
104
|
-
* @returns {AddonClientEntityDescription} 返回当前实例以支持链式调用
|
|
105
|
-
*/
|
|
106
|
-
addRenderController(controller) {
|
|
107
|
-
if (this.render_controllers == undefined)
|
|
108
|
-
this.render_controllers = [];
|
|
109
|
-
this.render_controllers.push(controller);
|
|
110
|
-
return this;
|
|
111
|
-
}
|
|
112
|
-
/**
|
|
113
|
-
* 添加定位器
|
|
114
|
-
* @param {string} name 定位器名称
|
|
115
|
-
* @param {Object} locator 定位器数据
|
|
116
|
-
* @returns {AddonClientEntityDescription} 返回当前实例以支持链式调用
|
|
117
|
-
*/
|
|
118
|
-
addLocator(name, locator) {
|
|
119
|
-
if (this.locators == undefined)
|
|
120
|
-
this.locators = {};
|
|
121
|
-
this.locators[name] = locator;
|
|
122
|
-
return this;
|
|
123
|
-
}
|
|
124
|
-
/**
|
|
125
|
-
* 设置生成蛋
|
|
126
|
-
* @param {string} texture 生成蛋纹理
|
|
127
|
-
* @param {number} texture_index 生成蛋纹理索引
|
|
128
|
-
* @returns {AddonClientEntityDescription} 返回当前实例以支持链式调用
|
|
129
|
-
*/
|
|
130
|
-
setSpawnEgg(texture, texture_index) {
|
|
131
|
-
this.spawn_egg = {
|
|
132
|
-
texture: texture,
|
|
133
|
-
texture_index: texture_index
|
|
134
|
-
};
|
|
135
|
-
return this;
|
|
136
|
-
}
|
|
137
|
-
/**
|
|
138
|
-
* 设置脚本
|
|
139
|
-
* @param {string} key 脚本键
|
|
140
|
-
* @param {string} value 脚本值
|
|
141
|
-
* @returns {AddonClientEntityDescription} 返回当前实例以支持链式调用
|
|
142
|
-
*/
|
|
143
|
-
setScript(key, value) {
|
|
144
|
-
if (this.scripts == undefined)
|
|
145
|
-
this.scripts = {};
|
|
146
|
-
this.scripts[key] = value;
|
|
147
|
-
return this;
|
|
148
|
-
}
|
|
149
|
-
}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
export class AddonEntity {
|
|
2
|
-
/**
|
|
3
|
-
* 实体类
|
|
4
|
-
* @param {string} format_version 格式版本
|
|
5
|
-
* @param {AddonEntityDefinition} definitions 实体定义
|
|
6
|
-
*/
|
|
7
|
-
constructor(format_version: string, definitions: AddonEntityDefinition);
|
|
8
|
-
format_version: string;
|
|
9
|
-
definitions: AddonEntityDefinition;
|
|
10
|
-
/**
|
|
11
|
-
* 将对象转换为 JSON 格式
|
|
12
|
-
* @returns {Object} JSON 对象
|
|
13
|
-
*/
|
|
14
|
-
toJson(): Object;
|
|
15
|
-
}
|
|
16
|
-
export class AddonEntityDefinition {
|
|
17
|
-
/**
|
|
18
|
-
* 实体定义类
|
|
19
|
-
* @param {AddonEntityDescription} description 实体描述
|
|
20
|
-
* @param {Object} components 实体组件
|
|
21
|
-
*/
|
|
22
|
-
constructor(description: AddonEntityDescription, components?: Object, component_groups?: {}, events?: {});
|
|
23
|
-
description: AddonEntityDescription;
|
|
24
|
-
components: Object;
|
|
25
|
-
component_groups: {};
|
|
26
|
-
events: {};
|
|
27
|
-
}
|
|
28
|
-
export class AddonEntityDescription {
|
|
29
|
-
/**
|
|
30
|
-
* 实体描述类
|
|
31
|
-
* @param {string} identifier 实体标识符
|
|
32
|
-
* @param {boolean} is_spawnable 是否可生成
|
|
33
|
-
* @param {boolean} is_summonable 是否可召唤
|
|
34
|
-
* @param {string} runtime_identifier 复刻标识符
|
|
35
|
-
*/
|
|
36
|
-
constructor(identifier: string, is_spawnable: boolean | undefined, is_summonable: boolean | undefined, properties: {} | undefined, runtime_identifier: string);
|
|
37
|
-
identifier: string;
|
|
38
|
-
is_spawnable: boolean;
|
|
39
|
-
is_summonable: boolean;
|
|
40
|
-
properties: {};
|
|
41
|
-
runtime_identifier: string;
|
|
42
|
-
}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
export class AddonEntity {
|
|
2
|
-
/**
|
|
3
|
-
* 实体类
|
|
4
|
-
* @param {string} format_version 格式版本
|
|
5
|
-
* @param {AddonEntityDefinition} definitions 实体定义
|
|
6
|
-
*/
|
|
7
|
-
constructor(format_version, definitions) {
|
|
8
|
-
this.format_version = format_version;
|
|
9
|
-
this.definitions = definitions;
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* 将对象转换为 JSON 格式
|
|
13
|
-
* @returns {Object} JSON 对象
|
|
14
|
-
*/
|
|
15
|
-
toJson() {
|
|
16
|
-
return {
|
|
17
|
-
format_version: this.format_version,
|
|
18
|
-
["minecraft:entity"]: this.definitions
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
export class AddonEntityDefinition {
|
|
23
|
-
/**
|
|
24
|
-
* 实体定义类
|
|
25
|
-
* @param {AddonEntityDescription} description 实体描述
|
|
26
|
-
* @param {Object} components 实体组件
|
|
27
|
-
*/
|
|
28
|
-
constructor(description, components = {}, component_groups = {}, events = {}) {
|
|
29
|
-
this.description = description;
|
|
30
|
-
this.components = components; // 修正拼写错误
|
|
31
|
-
this.component_groups = component_groups;
|
|
32
|
-
this.events = events;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
export class AddonEntityDescription {
|
|
36
|
-
/**
|
|
37
|
-
* 实体描述类
|
|
38
|
-
* @param {string} identifier 实体标识符
|
|
39
|
-
* @param {boolean} is_spawnable 是否可生成
|
|
40
|
-
* @param {boolean} is_summonable 是否可召唤
|
|
41
|
-
* @param {string} runtime_identifier 复刻标识符
|
|
42
|
-
*/
|
|
43
|
-
constructor(identifier, is_spawnable = false, is_summonable = false, properties = {}, runtime_identifier) {
|
|
44
|
-
this.identifier = identifier;
|
|
45
|
-
this.is_spawnable = is_spawnable;
|
|
46
|
-
this.is_summonable = is_summonable;
|
|
47
|
-
this.properties = properties;
|
|
48
|
-
this.runtime_identifier = runtime_identifier;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export class AddonOreFeature {
|
|
2
|
-
constructor(format_version: any, definition: any);
|
|
3
|
-
format_version: any;
|
|
4
|
-
definition: any;
|
|
5
|
-
toJson(): {
|
|
6
|
-
format_version: any;
|
|
7
|
-
"minecraft:ore_feature": any;
|
|
8
|
-
};
|
|
9
|
-
}
|
|
10
|
-
export class AddonOreFeatureDescription {
|
|
11
|
-
constructor(identifier: any);
|
|
12
|
-
identifier: any;
|
|
13
|
-
}
|
|
14
|
-
export class AddonOreFeatureDefinition {
|
|
15
|
-
constructor(description: any, count: any, replace_rules: any);
|
|
16
|
-
description: any;
|
|
17
|
-
count: any;
|
|
18
|
-
replace_rules: any;
|
|
19
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
export class AddonOreFeature {
|
|
2
|
-
constructor(format_version, definition) {
|
|
3
|
-
this.format_version = format_version;
|
|
4
|
-
this.definition = definition;
|
|
5
|
-
}
|
|
6
|
-
toJson() {
|
|
7
|
-
return {
|
|
8
|
-
format_version: this.format_version,
|
|
9
|
-
["minecraft:ore_feature"]: this.definition
|
|
10
|
-
};
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
export class AddonOreFeatureDescription {
|
|
14
|
-
constructor(identifier) {
|
|
15
|
-
this.identifier = identifier;
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
export class AddonOreFeatureDefinition {
|
|
19
|
-
constructor(description, count, replace_rules) {
|
|
20
|
-
this.description = description;
|
|
21
|
-
this.count = count;
|
|
22
|
-
this.replace_rules = replace_rules;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
export class AddonFeatureRule {
|
|
2
|
-
constructor(format_version: any, denifition: any);
|
|
3
|
-
format_version: any;
|
|
4
|
-
denifition: any;
|
|
5
|
-
toJson(): {
|
|
6
|
-
format_version: any;
|
|
7
|
-
"minecraft:feature_rules": any;
|
|
8
|
-
};
|
|
9
|
-
}
|
|
10
|
-
export class AddonFeatureRuleDenifition {
|
|
11
|
-
constructor(description: any, conditions: any, distribution: any);
|
|
12
|
-
description: any;
|
|
13
|
-
conditions: any;
|
|
14
|
-
distribution: any;
|
|
15
|
-
}
|
|
16
|
-
export class AddonFeatureRuleDecription {
|
|
17
|
-
constructor(identifier: any, places_feature: any);
|
|
18
|
-
identifier: any;
|
|
19
|
-
places_feature: any;
|
|
20
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
export class AddonFeatureRule {
|
|
2
|
-
constructor(format_version, denifition) {
|
|
3
|
-
this.format_version = format_version;
|
|
4
|
-
this.denifition = denifition;
|
|
5
|
-
}
|
|
6
|
-
toJson() {
|
|
7
|
-
return {
|
|
8
|
-
format_version: this.format_version,
|
|
9
|
-
["minecraft:feature_rules"]: this.denifition
|
|
10
|
-
};
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
export class AddonFeatureRuleDenifition {
|
|
14
|
-
constructor(description, conditions, distribution) {
|
|
15
|
-
this.description = description;
|
|
16
|
-
this.conditions = conditions;
|
|
17
|
-
this.distribution = distribution;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
export class AddonFeatureRuleDecription {
|
|
21
|
-
constructor(identifier, places_feature) {
|
|
22
|
-
this.identifier = identifier;
|
|
23
|
-
this.places_feature = places_feature;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
export class AddonAttachable {
|
|
2
|
-
/**
|
|
3
|
-
* 可附着物类 继承客户端实体
|
|
4
|
-
* @param {string} format_version 格式版本
|
|
5
|
-
* @param {AddonAttachableDefinition} definitions 实体定义
|
|
6
|
-
*/
|
|
7
|
-
constructor(format_version: string, definitions: AddonAttachableDefinition);
|
|
8
|
-
format_version: string;
|
|
9
|
-
definitions: AddonAttachableDefinition;
|
|
10
|
-
/**
|
|
11
|
-
* 将对象转换为 JSON 格式
|
|
12
|
-
* @returns {Object} JSON 对象
|
|
13
|
-
*/
|
|
14
|
-
toJson(): Object;
|
|
15
|
-
}
|
|
16
|
-
export class AddonAttachableDefinition {
|
|
17
|
-
/**
|
|
18
|
-
* 客户端实体定义类
|
|
19
|
-
* @param {Description} description 实体描述
|
|
20
|
-
*/
|
|
21
|
-
constructor(description: Description);
|
|
22
|
-
description: Description;
|
|
23
|
-
}
|
|
24
|
-
export class AddonAttachableDescription {
|
|
25
|
-
/**
|
|
26
|
-
* 可附着物描述类
|
|
27
|
-
* @param {string} identifier 标识符
|
|
28
|
-
*/
|
|
29
|
-
constructor(identifier: string);
|
|
30
|
-
identifier: string;
|
|
31
|
-
/**
|
|
32
|
-
* 添加材质
|
|
33
|
-
* @param {string} name 材质名称
|
|
34
|
-
* @param {string} material 材质路径
|
|
35
|
-
* @returns {AddonAttachableDescription} 返回当前实例以支持链式调用
|
|
36
|
-
*/
|
|
37
|
-
addMaterial(name: string, material: string): AddonAttachableDescription;
|
|
38
|
-
materials: {} | undefined;
|
|
39
|
-
/**
|
|
40
|
-
* 添加纹理
|
|
41
|
-
* @param {string} name 纹理名称
|
|
42
|
-
* @param {string} texture 纹理路径
|
|
43
|
-
* @returns {AddonAttachableDescription} 返回当前实例以支持链式调用
|
|
44
|
-
*/
|
|
45
|
-
addTexture(name: string, texture: string): AddonAttachableDescription;
|
|
46
|
-
textures: {} | undefined;
|
|
47
|
-
/**
|
|
48
|
-
* 添加几何体
|
|
49
|
-
* @param {string} name 几何体名称
|
|
50
|
-
* @param {string} geometry 几何体路径
|
|
51
|
-
* @returns {AddonAttachableDescription} 返回当前实例以支持链式调用
|
|
52
|
-
*/
|
|
53
|
-
addGeometry(name: string, geometry: string): AddonAttachableDescription;
|
|
54
|
-
geometry: {} | undefined;
|
|
55
|
-
/**
|
|
56
|
-
* 添加动画
|
|
57
|
-
* @param {string} name 动画名称
|
|
58
|
-
* @param {string} animation 动画路径
|
|
59
|
-
* @returns {AddonAttachableDescription} 返回当前实例以支持链式调用
|
|
60
|
-
*/
|
|
61
|
-
addAnimation(name: string, animation: string): AddonAttachableDescription;
|
|
62
|
-
animations: {} | undefined;
|
|
63
|
-
/**
|
|
64
|
-
* 添加动画控制器
|
|
65
|
-
* @param {string} name 控制器名称
|
|
66
|
-
* @param {string} controller 控制器路径
|
|
67
|
-
* @returns {AddonAttachableDescription} 返回当前实例以支持链式调用
|
|
68
|
-
*/
|
|
69
|
-
addAnimationController(name: string, controller: string): AddonAttachableDescription;
|
|
70
|
-
animation_controllers: any[] | undefined;
|
|
71
|
-
/**
|
|
72
|
-
* 添加渲染控制器
|
|
73
|
-
* @param {string} controller 渲染控制器路径
|
|
74
|
-
* @returns {AddonAttachableDescription} 返回当前实例以支持链式调用
|
|
75
|
-
*/
|
|
76
|
-
addRenderController(controller: string): AddonAttachableDescription;
|
|
77
|
-
render_controllers: any[] | undefined;
|
|
78
|
-
/**
|
|
79
|
-
* 添加定位器
|
|
80
|
-
* @param {string} name 定位器名称
|
|
81
|
-
* @param {Object} locator 定位器数据
|
|
82
|
-
* @returns {AddonAttachableDescription} 返回当前实例以支持链式调用
|
|
83
|
-
*/
|
|
84
|
-
addLocator(name: string, locator: Object): AddonAttachableDescription;
|
|
85
|
-
locators: {} | undefined;
|
|
86
|
-
/**
|
|
87
|
-
* 设置脚本
|
|
88
|
-
* @param {string} key 脚本键
|
|
89
|
-
* @param {string} value 脚本值
|
|
90
|
-
* @returns {AddonAttachableDescription} 返回当前实例以支持链式调用
|
|
91
|
-
*/
|
|
92
|
-
setScript(key: string, value: string): AddonAttachableDescription;
|
|
93
|
-
scripts: {} | undefined;
|
|
94
|
-
}
|
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
export class AddonAttachable {
|
|
2
|
-
/**
|
|
3
|
-
* 可附着物类 继承客户端实体
|
|
4
|
-
* @param {string} format_version 格式版本
|
|
5
|
-
* @param {AddonAttachableDefinition} definitions 实体定义
|
|
6
|
-
*/
|
|
7
|
-
constructor(format_version, definitions) {
|
|
8
|
-
this.format_version = format_version;
|
|
9
|
-
this.definitions = definitions;
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* 将对象转换为 JSON 格式
|
|
13
|
-
* @returns {Object} JSON 对象
|
|
14
|
-
*/
|
|
15
|
-
toJson() {
|
|
16
|
-
return {
|
|
17
|
-
format_version: this.format_version,
|
|
18
|
-
["minecraft:attachable"]: this.definitions
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
export class AddonAttachableDefinition {
|
|
23
|
-
/**
|
|
24
|
-
* 客户端实体定义类
|
|
25
|
-
* @param {Description} description 实体描述
|
|
26
|
-
*/
|
|
27
|
-
constructor(description) {
|
|
28
|
-
this.description = description;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
export class AddonAttachableDescription {
|
|
32
|
-
/**
|
|
33
|
-
* 可附着物描述类
|
|
34
|
-
* @param {string} identifier 标识符
|
|
35
|
-
*/
|
|
36
|
-
constructor(identifier) {
|
|
37
|
-
this.identifier = identifier;
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* 添加材质
|
|
41
|
-
* @param {string} name 材质名称
|
|
42
|
-
* @param {string} material 材质路径
|
|
43
|
-
* @returns {AddonAttachableDescription} 返回当前实例以支持链式调用
|
|
44
|
-
*/
|
|
45
|
-
addMaterial(name, material) {
|
|
46
|
-
if (this.materials == undefined)
|
|
47
|
-
this.materials = {};
|
|
48
|
-
this.materials[name] = material;
|
|
49
|
-
return this;
|
|
50
|
-
}
|
|
51
|
-
/**
|
|
52
|
-
* 添加纹理
|
|
53
|
-
* @param {string} name 纹理名称
|
|
54
|
-
* @param {string} texture 纹理路径
|
|
55
|
-
* @returns {AddonAttachableDescription} 返回当前实例以支持链式调用
|
|
56
|
-
*/
|
|
57
|
-
addTexture(name, texture) {
|
|
58
|
-
if (this.textures == undefined)
|
|
59
|
-
this.textures = {};
|
|
60
|
-
this.textures[name] = texture;
|
|
61
|
-
return this;
|
|
62
|
-
}
|
|
63
|
-
/**
|
|
64
|
-
* 添加几何体
|
|
65
|
-
* @param {string} name 几何体名称
|
|
66
|
-
* @param {string} geometry 几何体路径
|
|
67
|
-
* @returns {AddonAttachableDescription} 返回当前实例以支持链式调用
|
|
68
|
-
*/
|
|
69
|
-
addGeometry(name, geometry) {
|
|
70
|
-
if (this.geometry == undefined)
|
|
71
|
-
this.geometry = {};
|
|
72
|
-
this.geometry[name] = geometry;
|
|
73
|
-
return this;
|
|
74
|
-
}
|
|
75
|
-
/**
|
|
76
|
-
* 添加动画
|
|
77
|
-
* @param {string} name 动画名称
|
|
78
|
-
* @param {string} animation 动画路径
|
|
79
|
-
* @returns {AddonAttachableDescription} 返回当前实例以支持链式调用
|
|
80
|
-
*/
|
|
81
|
-
addAnimation(name, animation) {
|
|
82
|
-
if (this.animations == undefined)
|
|
83
|
-
this.animations = {};
|
|
84
|
-
this.animations[name] = animation;
|
|
85
|
-
return this;
|
|
86
|
-
}
|
|
87
|
-
/**
|
|
88
|
-
* 添加动画控制器
|
|
89
|
-
* @param {string} name 控制器名称
|
|
90
|
-
* @param {string} controller 控制器路径
|
|
91
|
-
* @returns {AddonAttachableDescription} 返回当前实例以支持链式调用
|
|
92
|
-
*/
|
|
93
|
-
addAnimationController(name, controller) {
|
|
94
|
-
if (this.animation_controllers == undefined)
|
|
95
|
-
this.animation_controllers = [];
|
|
96
|
-
this.animation_controllers.push({ [name]: controller });
|
|
97
|
-
return this;
|
|
98
|
-
}
|
|
99
|
-
/**
|
|
100
|
-
* 添加渲染控制器
|
|
101
|
-
* @param {string} controller 渲染控制器路径
|
|
102
|
-
* @returns {AddonAttachableDescription} 返回当前实例以支持链式调用
|
|
103
|
-
*/
|
|
104
|
-
addRenderController(controller) {
|
|
105
|
-
if (this.render_controllers == undefined)
|
|
106
|
-
this.render_controllers = [];
|
|
107
|
-
this.render_controllers.push(controller);
|
|
108
|
-
return this;
|
|
109
|
-
}
|
|
110
|
-
/**
|
|
111
|
-
* 添加定位器
|
|
112
|
-
* @param {string} name 定位器名称
|
|
113
|
-
* @param {Object} locator 定位器数据
|
|
114
|
-
* @returns {AddonAttachableDescription} 返回当前实例以支持链式调用
|
|
115
|
-
*/
|
|
116
|
-
addLocator(name, locator) {
|
|
117
|
-
if (this.locators == undefined)
|
|
118
|
-
this.locators = {};
|
|
119
|
-
this.locators[name] = locator;
|
|
120
|
-
return this;
|
|
121
|
-
}
|
|
122
|
-
/**
|
|
123
|
-
* 设置脚本
|
|
124
|
-
* @param {string} key 脚本键
|
|
125
|
-
* @param {string} value 脚本值
|
|
126
|
-
* @returns {AddonAttachableDescription} 返回当前实例以支持链式调用
|
|
127
|
-
*/
|
|
128
|
-
setScript(key, value) {
|
|
129
|
-
if (this.scripts == undefined)
|
|
130
|
-
this.scripts = {};
|
|
131
|
-
this.scripts[key] = value;
|
|
132
|
-
return this;
|
|
133
|
-
}
|
|
134
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export class AddonItem {
|
|
2
|
-
constructor(format_version: any, definitions: any);
|
|
3
|
-
format_version: any;
|
|
4
|
-
definitions: any;
|
|
5
|
-
toJson(): {
|
|
6
|
-
format_version: any;
|
|
7
|
-
"minecraft:item": any;
|
|
8
|
-
};
|
|
9
|
-
}
|
|
10
|
-
export class AddonItemDefinition {
|
|
11
|
-
constructor(description: any, components: any);
|
|
12
|
-
description: any;
|
|
13
|
-
components: any;
|
|
14
|
-
}
|
|
15
|
-
export class AddonItemDescription {
|
|
16
|
-
constructor(identifier: any, menu_category: any);
|
|
17
|
-
identifier: any;
|
|
18
|
-
menu_category: any;
|
|
19
|
-
}
|