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.
Files changed (220) hide show
  1. package/README.md +8 -1
  2. package/doc/api.md +2 -2
  3. package/package.json +18 -19
  4. package/{dist → prod}/cli/index.d.ts +1 -1
  5. package/prod/cli/index.js +1 -0
  6. package/{dist → prod}/cli/start.js +997 -967
  7. package/{dist → prod}/core/index.d.ts +2155 -1652
  8. package/prod/core/index.js +59017 -0
  9. package/prod/utils/index.d.ts +41 -0
  10. package/prod/utils/index.js +1 -0
  11. package/dist/cli/build.d.ts +0 -7
  12. package/dist/cli/build.js +0 -236
  13. package/dist/cli/dev-server/client.d.ts +0 -2
  14. package/dist/cli/dev-server/client.js +0 -21
  15. package/dist/cli/dev-server/config.d.ts +0 -3
  16. package/dist/cli/dev-server/config.js +0 -3
  17. package/dist/cli/dev-server/handles.d.ts +0 -4
  18. package/dist/cli/dev-server/handles.js +0 -5
  19. package/dist/cli/dev-server/hmr.d.ts +0 -1
  20. package/dist/cli/dev-server/hmr.js +0 -13
  21. package/dist/cli/dev-server/index.d.ts +0 -4
  22. package/dist/cli/dev-server/index.js +0 -17
  23. package/dist/cli/dev-server/server.d.ts +0 -14
  24. package/dist/cli/dev-server/server.js +0 -59
  25. package/dist/cli/dev-server/syncFiles.d.ts +0 -3
  26. package/dist/cli/dev-server/syncFiles.js +0 -45
  27. package/dist/cli/index.js +0 -90
  28. package/dist/cli/init.d.ts +0 -9
  29. package/dist/cli/init.js +0 -80
  30. package/dist/cli/load.d.ts +0 -3
  31. package/dist/cli/load.js +0 -94
  32. package/dist/cli/start.d.ts +0 -2
  33. package/dist/cli/tools/textureSet.d.ts +0 -13
  34. package/dist/cli/tools/textureSet.js +0 -103
  35. package/dist/cli/utils.d.ts +0 -13
  36. package/dist/cli/utils.js +0 -89
  37. package/dist/core/addon/biome.d.ts +0 -22
  38. package/dist/core/addon/biome.js +0 -27
  39. package/dist/core/addon/block/block.d.ts +0 -41
  40. package/dist/core/addon/block/block.js +0 -46
  41. package/dist/core/addon/controllers/animationController.d.ts +0 -43
  42. package/dist/core/addon/controllers/animationController.js +0 -73
  43. package/dist/core/addon/controllers/render_controllers.js +0 -162
  44. package/dist/core/addon/entity/clientEntity.d.ts +0 -107
  45. package/dist/core/addon/entity/clientEntity.js +0 -149
  46. package/dist/core/addon/entity/entity.d.ts +0 -42
  47. package/dist/core/addon/entity/entity.js +0 -50
  48. package/dist/core/addon/feature/oreFeature.d.ts +0 -19
  49. package/dist/core/addon/feature/oreFeature.js +0 -24
  50. package/dist/core/addon/featureRule.d.ts +0 -20
  51. package/dist/core/addon/featureRule.js +0 -25
  52. package/dist/core/addon/item/attachable.d.ts +0 -94
  53. package/dist/core/addon/item/attachable.js +0 -134
  54. package/dist/core/addon/item/item.d.ts +0 -19
  55. package/dist/core/addon/item/item.js +0 -26
  56. package/dist/core/addon/manifest.d.ts +0 -49
  57. package/dist/core/addon/manifest.js +0 -65
  58. package/dist/core/addon/menuCategory.d.ts +0 -6
  59. package/dist/core/addon/menuCategory.js +0 -7
  60. package/dist/core/addon/recipe/baseRecipe.d.ts +0 -12
  61. package/dist/core/addon/recipe/baseRecipe.js +0 -23
  62. package/dist/core/addon/recipe/data.d.ts +0 -66
  63. package/dist/core/addon/recipe/data.js +0 -74
  64. package/dist/core/addon/recipe/furnace.d.ts +0 -17
  65. package/dist/core/addon/recipe/furnace.js +0 -43
  66. package/dist/core/addon/recipe/shaped.d.ts +0 -26
  67. package/dist/core/addon/recipe/shaped.js +0 -53
  68. package/dist/core/addon/recipe/shapeless.d.ts +0 -18
  69. package/dist/core/addon/recipe/shapeless.js +0 -36
  70. package/dist/core/biome/biome.d.ts +0 -14
  71. package/dist/core/biome/biome.js +0 -23
  72. package/dist/core/biome/biomeComponent.d.ts +0 -46
  73. package/dist/core/biome/biomeComponent.js +0 -77
  74. package/dist/core/block/basicBlock.d.ts +0 -48
  75. package/dist/core/block/basicBlock.js +0 -105
  76. package/dist/core/block/block.d.ts +0 -32
  77. package/dist/core/block/block.js +0 -92
  78. package/dist/core/block/blockComponent.d.ts +0 -187
  79. package/dist/core/block/blockComponent.js +0 -500
  80. package/dist/core/block/cropBlock.d.ts +0 -4
  81. package/dist/core/block/cropBlock.js +0 -27
  82. package/dist/core/block/geometryBlock.d.ts +0 -12
  83. package/dist/core/block/geometryBlock.js +0 -16
  84. package/dist/core/block/oreBlock.d.ts +0 -9
  85. package/dist/core/block/oreBlock.js +0 -25
  86. package/dist/core/block/rotatableBlock.d.ts +0 -27
  87. package/dist/core/block/rotatableBlock.js +0 -107
  88. package/dist/core/block/tileBlock.d.ts +0 -17
  89. package/dist/core/block/tileBlock.js +0 -125
  90. package/dist/core/entity/basicEntity.d.ts +0 -111
  91. package/dist/core/entity/basicEntity.js +0 -170
  92. package/dist/core/entity/behavior/followMob.d.ts +0 -12
  93. package/dist/core/entity/behavior/followMob.js +0 -35
  94. package/dist/core/entity/behavior/followParent.d.ts +0 -7
  95. package/dist/core/entity/behavior/followParent.js +0 -15
  96. package/dist/core/entity/behavior/randomStroll.d.ts +0 -31
  97. package/dist/core/entity/behavior/randomStroll.js +0 -63
  98. package/dist/core/entity/behavior/tempt.d.ts +0 -73
  99. package/dist/core/entity/behavior/tempt.js +0 -134
  100. package/dist/core/entity/bundles/BasicMoveBundle.js +0 -8
  101. package/dist/core/entity/bundles/basicBundle.d.ts +0 -13
  102. package/dist/core/entity/bundles/basicBundle.js +0 -38
  103. package/dist/core/entity/clientEntity.d.ts +0 -20
  104. package/dist/core/entity/clientEntity.js +0 -37
  105. package/dist/core/entity/componets/entityComponet.d.ts +0 -202
  106. package/dist/core/entity/componets/entityComponet.js +0 -354
  107. package/dist/core/entity/data/nativeEntityData.d.ts +0 -9
  108. package/dist/core/entity/data/nativeEntityData.js +0 -38
  109. package/dist/core/entity/dummyEntity.js +0 -14
  110. package/dist/core/entity/entity.d.ts +0 -15
  111. package/dist/core/entity/entity.js +0 -11
  112. package/dist/core/entity/nativeEntity.d.ts +0 -8
  113. package/dist/core/entity/nativeEntity.js +0 -28
  114. package/dist/core/entity/navigation/walk.d.ts +0 -23
  115. package/dist/core/entity/navigation/walk.js +0 -56
  116. package/dist/core/entity/projectile.d.ts +0 -3
  117. package/dist/core/entity/projectile.js +0 -7
  118. package/dist/core/factory/biomeFactory.d.ts +0 -4
  119. package/dist/core/factory/biomeFactory.js +0 -13
  120. package/dist/core/factory/blockFactory.d.ts +0 -34
  121. package/dist/core/factory/blockFactory.js +0 -143
  122. package/dist/core/factory/entityFactory.d.ts +0 -17
  123. package/dist/core/factory/entityFactory.js +0 -75
  124. package/dist/core/factory/featureFactory.d.ts +0 -6
  125. package/dist/core/factory/featureFactory.js +0 -23
  126. package/dist/core/factory/itemExtra.d.ts +0 -8
  127. package/dist/core/factory/itemExtra.js +0 -9
  128. package/dist/core/factory/itemFactory.d.ts +0 -27
  129. package/dist/core/factory/itemFactory.js +0 -112
  130. package/dist/core/factory/recipeFactory.d.ts +0 -18
  131. package/dist/core/factory/recipeFactory.js +0 -39
  132. package/dist/core/factory/uiFactory.d.ts +0 -12
  133. package/dist/core/factory/uiFactory.js +0 -32
  134. package/dist/core/feature/oreFeature.d.ts +0 -10
  135. package/dist/core/feature/oreFeature.js +0 -11
  136. package/dist/core/feature-rule/condition/biomeFilter.d.ts +0 -26
  137. package/dist/core/feature-rule/condition/biomeFilter.js +0 -36
  138. package/dist/core/feature-rule/condition/featureConditions.d.ts +0 -27
  139. package/dist/core/feature-rule/condition/featureConditions.js +0 -37
  140. package/dist/core/feature-rule/distribution/coordinateDistribution.d.ts +0 -17
  141. package/dist/core/feature-rule/distribution/coordinateDistribution.js +0 -23
  142. package/dist/core/feature-rule/distribution/featureDistribution.d.ts +0 -31
  143. package/dist/core/feature-rule/distribution/featureDistribution.js +0 -41
  144. package/dist/core/feature-rule/featureRule.d.ts +0 -17
  145. package/dist/core/feature-rule/featureRule.js +0 -26
  146. package/dist/core/index.js +0 -1
  147. package/dist/core/item/armor.d.ts +0 -21
  148. package/dist/core/item/armor.js +0 -90
  149. package/dist/core/item/attachable.d.ts +0 -6
  150. package/dist/core/item/attachable.js +0 -26
  151. package/dist/core/item/food.d.ts +0 -24
  152. package/dist/core/item/food.js +0 -38
  153. package/dist/core/item/item.d.ts +0 -36
  154. package/dist/core/item/item.js +0 -69
  155. package/dist/core/item/itemComponents.d.ts +0 -113
  156. package/dist/core/item/itemComponents.js +0 -225
  157. package/dist/core/registry.d.ts +0 -12
  158. package/dist/core/registry.js +0 -17
  159. package/dist/core/texture.d.ts +0 -18
  160. package/dist/core/texture.js +0 -38
  161. package/dist/core/ui/buttonMapping.d.ts +0 -97
  162. package/dist/core/ui/buttonMapping.js +0 -132
  163. package/dist/core/ui/dataBindingObject.d.ts +0 -97
  164. package/dist/core/ui/dataBindingObject.js +0 -134
  165. package/dist/core/ui/elements/button.d.ts +0 -21
  166. package/dist/core/ui/elements/button.js +0 -101
  167. package/dist/core/ui/elements/collectionPanel.d.ts +0 -12
  168. package/dist/core/ui/elements/collectionPanel.js +0 -53
  169. package/dist/core/ui/elements/grid.d.ts +0 -8
  170. package/dist/core/ui/elements/grid.js +0 -33
  171. package/dist/core/ui/elements/image.d.ts +0 -13
  172. package/dist/core/ui/elements/image.js +0 -55
  173. package/dist/core/ui/elements/label.d.ts +0 -14
  174. package/dist/core/ui/elements/label.js +0 -61
  175. package/dist/core/ui/elements/panel.d.ts +0 -11
  176. package/dist/core/ui/elements/panel.js +0 -49
  177. package/dist/core/ui/elements/scrollingPanel.d.ts +0 -14
  178. package/dist/core/ui/elements/scrollingPanel.js +0 -59
  179. package/dist/core/ui/elements/stackPanel.d.ts +0 -14
  180. package/dist/core/ui/elements/stackPanel.js +0 -37
  181. package/dist/core/ui/elements/uiElement.d.ts +0 -53
  182. package/dist/core/ui/elements/uiElement.js +0 -129
  183. package/dist/core/ui/properties/control.d.ts +0 -214
  184. package/dist/core/ui/properties/control.js +0 -286
  185. package/dist/core/ui/properties/dataBinding.d.ts +0 -6
  186. package/dist/core/ui/properties/dataBinding.js +0 -16
  187. package/dist/core/ui/properties/factory.d.ts +0 -37
  188. package/dist/core/ui/properties/factory.js +0 -62
  189. package/dist/core/ui/properties/gridProp.d.ts +0 -65
  190. package/dist/core/ui/properties/gridProp.js +0 -90
  191. package/dist/core/ui/properties/input.d.ts +0 -97
  192. package/dist/core/ui/properties/input.js +0 -134
  193. package/dist/core/ui/properties/layout.d.ts +0 -105
  194. package/dist/core/ui/properties/layout.js +0 -145
  195. package/dist/core/ui/properties/scrollView.d.ts +0 -105
  196. package/dist/core/ui/properties/scrollView.js +0 -145
  197. package/dist/core/ui/properties/sound.d.ts +0 -47
  198. package/dist/core/ui/properties/sound.js +0 -66
  199. package/dist/core/ui/properties/sprite.d.ts +0 -161
  200. package/dist/core/ui/properties/sprite.js +0 -222
  201. package/dist/core/ui/properties/text.d.ts +0 -135
  202. package/dist/core/ui/properties/text.js +0 -187
  203. package/dist/core/ui/registry/uiSystemRegistry.d.ts +0 -8
  204. package/dist/core/ui/registry/uiSystemRegistry.js +0 -26
  205. package/dist/core/ui/systems/chest.d.ts +0 -5
  206. package/dist/core/ui/systems/chest.js +0 -21
  207. package/dist/core/ui/systems/containerUISystem.d.ts +0 -67
  208. package/dist/core/ui/systems/containerUISystem.js +0 -214
  209. package/dist/core/ui/systems/guidebook.d.ts +0 -9
  210. package/dist/core/ui/systems/guidebook.js +0 -206
  211. package/dist/core/ui/systems/serverForm.d.ts +0 -13
  212. package/dist/core/ui/systems/serverForm.js +0 -116
  213. package/dist/core/ui/systems/system.d.ts +0 -16
  214. package/dist/core/ui/systems/system.js +0 -37
  215. package/dist/oc/actor.js +0 -44
  216. package/dist/oc/core.js +0 -201
  217. package/dist/oc/input.js +0 -67
  218. package/dist/oc/optional.js +0 -31
  219. /package/{dist → prod}/oc/index.d.ts +0 -0
  220. /package/{dist → prod}/oc/index.js +0 -0
@@ -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
- }
@@ -1,26 +0,0 @@
1
- //item json的结构对应的class
2
- export class AddonItem {
3
- constructor(format_version, definitions) {
4
- this.format_version = format_version;
5
- //键名为 ["minecfat:item"]
6
- this.definitions = definitions;
7
- }
8
- toJson() {
9
- return {
10
- format_version: this.format_version,
11
- ["minecraft:item"]: this.definitions
12
- };
13
- }
14
- }
15
- export class AddonItemDefinition {
16
- constructor(description, components) {
17
- this.description = description;
18
- this.components = components;
19
- }
20
- }
21
- export class AddonItemDescription {
22
- constructor(identifier, menu_category) {
23
- this.identifier = identifier;
24
- this.menu_category = menu_category;
25
- }
26
- }
@@ -1,49 +0,0 @@
1
- export class AddonSemanticVersion {
2
- constructor(major: any, minor: any, patch: any);
3
- major: any;
4
- minor: any;
5
- patch: any;
6
- toString(): string;
7
- }
8
- export class AddonManifestHeader {
9
- constructor(name: any, description: any, version: any, uuid: any, options?: {});
10
- name: any;
11
- description: any;
12
- version: any;
13
- uuid: any;
14
- allow_random_seed: any;
15
- lock_template_options: any;
16
- pack_scope: any;
17
- base_game_version: any;
18
- min_engine_version: any;
19
- }
20
- export class AddonManifestModule {
21
- constructor(description: any, moduleType: any, uuid: any, version: any);
22
- description: any;
23
- type: any;
24
- uuid: any;
25
- version: any;
26
- }
27
- export class AddonManifestDependency {
28
- constructor(name: any, uuid: any, version: any);
29
- module_name: any;
30
- uuid: any;
31
- version: any;
32
- }
33
- export class AddonManifestMetadata {
34
- constructor(authors: any, license: any, generatedWith: any, productType: any, url: any);
35
- authors: any;
36
- license: any;
37
- generated_with: any;
38
- product_type: any;
39
- url: any;
40
- }
41
- export class AddonManifest {
42
- constructor(formatVersion: any, header: any, modules: any, dependencies: any, capabilities?: null, metadata?: null);
43
- format_version: any;
44
- header: any;
45
- modules: any;
46
- dependencies: any;
47
- capabilities: any;
48
- metadata: any;
49
- }
@@ -1,65 +0,0 @@
1
- // 定义语义化版本号类
2
- export class AddonSemanticVersion {
3
- constructor(major, minor, patch) {
4
- this.major = major;
5
- this.minor = minor;
6
- this.patch = patch;
7
- }
8
- toString() {
9
- return `[${this.major}, ${this.minor}, ${this.patch}]`;
10
- }
11
- }
12
- // 定义头部信息类
13
- export class AddonManifestHeader {
14
- constructor(name, description, version, uuid, options = {}) {
15
- this.name = name;
16
- this.description = description;
17
- this.version = version;
18
- this.uuid = uuid;
19
- this.allow_random_seed = options.allow_random_seed;
20
- this.lock_template_options = options.lock_template_options;
21
- this.pack_scope = options.pack_scope;
22
- this.base_game_version = options.base_game_version;
23
- this.min_engine_version = options.min_engine_version;
24
- }
25
- }
26
- // 定义模块信息类
27
- export class AddonManifestModule {
28
- constructor(description, moduleType, uuid, version) {
29
- this.description = description;
30
- this.type = moduleType;
31
- this.uuid = uuid;
32
- this.version = version;
33
- }
34
- }
35
- // 定义依赖信息类
36
- export class AddonManifestDependency {
37
- constructor(name, uuid, version) {
38
- this.module_name = name;
39
- this.uuid = uuid;
40
- this.version = version;
41
- }
42
- }
43
- // 定义元数据信息类
44
- export class AddonManifestMetadata {
45
- constructor(authors, license, generatedWith, productType, url) {
46
- this.authors = authors;
47
- this.license = license;
48
- this.generated_with = generatedWith;
49
- this.product_type = productType;
50
- this.url = url;
51
- }
52
- }
53
- // 定义清单文件类
54
- export class AddonManifest {
55
- constructor(formatVersion, header, modules, dependencies, capabilities = null, metadata = null) {
56
- this.format_version = formatVersion;
57
- this.header = header;
58
- this.modules = modules;
59
- this.dependencies = dependencies;
60
- if (capabilities != null)
61
- this.capabilities = capabilities;
62
- if (metadata != null)
63
- this.metadata = metadata;
64
- }
65
- }
@@ -1,6 +0,0 @@
1
- export class AddonMenuCategory {
2
- constructor(category: any, group: any, is_hidden: any);
3
- category: any;
4
- group: any;
5
- is_hidden_in_commands: any;
6
- }
@@ -1,7 +0,0 @@
1
- export class AddonMenuCategory {
2
- constructor(category, group, is_hidden) {
3
- this.category = category;
4
- this.group = group;
5
- this.is_hidden_in_commands = is_hidden;
6
- }
7
- }
@@ -1,12 +0,0 @@
1
- export class AddonRecipe {
2
- constructor(format_version: any, recipe_type: any, definitions?: {});
3
- format_version: any;
4
- recipe_type: any;
5
- definitions: {};
6
- getId(): any;
7
- identifier(identifier: any): this;
8
- tags(tags: any): this;
9
- toJson(): {
10
- format_version: any;
11
- };
12
- }
@@ -1,23 +0,0 @@
1
- export class AddonRecipe {
2
- constructor(format_version, recipe_type, definitions = {}) {
3
- this.format_version = format_version;
4
- this.recipe_type = recipe_type;
5
- this.definitions = definitions;
6
- }
7
- getId() {
8
- return this.definitions.description.identifier;
9
- }
10
- identifier(identifier) {
11
- this.definitions.description = { identifier };
12
- return this;
13
- }
14
- tags(tags) {
15
- this.definitions.tags = tags;
16
- return this;
17
- }
18
- toJson() {
19
- var json = { format_version: this.format_version };
20
- json[this.recipe_type] = this.definitions;
21
- return json;
22
- }
23
- }
@@ -1,66 +0,0 @@
1
- export namespace RecipeInputTags {
2
- let Armor: string;
3
- let Arrows: string;
4
- let Banners: string;
5
- let Boats: string;
6
- let BookshelfBooks: string;
7
- let ChainmailTier: string;
8
- let ChestBoat: string;
9
- let Coals: string;
10
- let Cooked: string;
11
- let CrimsonStems: string;
12
- let DiamondTier: string;
13
- let Digger: string;
14
- let Door: string;
15
- let Fish: string;
16
- let Food: string;
17
- let GoldenTier: string;
18
- let HangingActor: string;
19
- let HangingSign: string;
20
- let Hatchet: string;
21
- let Hoe: string;
22
- let HorseArmor: string;
23
- let IronTier: string;
24
- let LeatherTier: string;
25
- let LecternBooks: string;
26
- let Logs: string;
27
- let LogsThatBurn: string;
28
- let MangroveLogs: string;
29
- let Meat: string;
30
- let Minecart: string;
31
- let MusicDiscs: string;
32
- let NetheriteTier: string;
33
- let Pickaxe: string;
34
- let PiglinLoved: string;
35
- let PiglinRepellents: string;
36
- let Planks: string;
37
- let Sand: string;
38
- let Shovel: string;
39
- let Sign: string;
40
- let SoulFireBaseBlocks: string;
41
- let SpawnEgg: string;
42
- let StoneBricks: string;
43
- let StoneCraftingMaterials: string;
44
- let StoneTier: string;
45
- let StoneToolMaterials: string;
46
- let Sword: string;
47
- let Tool: string;
48
- let VibrationDamper: string;
49
- let WarpedStems: string;
50
- let WoodenSlabs: string;
51
- let WoodenTier: string;
52
- let Wool: string;
53
- }
54
- export namespace RecipeTags {
55
- let Furnace: string;
56
- let smoker: string;
57
- let Campfire: string;
58
- let SoulCampfire: string;
59
- let CraftingTable: string;
60
- }
61
- export namespace RecipeTypes {
62
- let Furnace_1: string;
63
- export { Furnace_1 as Furnace };
64
- export let Shaped: string;
65
- export let Shapeless: string;
66
- }
@@ -1,74 +0,0 @@
1
- /**
2
- * 原版可用于配方输入的标签列表 (1.19.50)
3
- */
4
- export const RecipeInputTags = {
5
- Armor: "minecraft:is_armor",
6
- Arrows: "minecraft:arrow",
7
- Banners: "minecraft:banner",
8
- Boats: "minecraft:boats",
9
- BookshelfBooks: "minecraft:bookshelf_books",
10
- ChainmailTier: "minecraft:chainmail_tier",
11
- ChestBoat: "minecraft:chest_boat",
12
- Coals: "minecraft:coals",
13
- Cooked: "minecraft:is_cooked",
14
- CrimsonStems: "minecraft:crimson_stems",
15
- DiamondTier: "minecraft:diamond_tier",
16
- Digger: "minecraft:digger",
17
- Door: "minecraft:door",
18
- Fish: "minecraft:is_fish",
19
- Food: "minecraft:is_food",
20
- GoldenTier: "minecraft:golden_tier",
21
- HangingActor: "minecraft:hanging_actor",
22
- HangingSign: "minecraft:hanging_sign",
23
- Hatchet: "minecraft:is_axe",
24
- Hoe: "minecraft:is_hoe",
25
- HorseArmor: "minecraft:horse_armor",
26
- IronTier: "minecraft:iron_tier",
27
- LeatherTier: "minecraft:leather_tier",
28
- LecternBooks: "minecraft:lectern_books",
29
- Logs: "minecraft:logs",
30
- LogsThatBurn: "minecraft:logs_that_burn",
31
- MangroveLogs: "minecraft:mangrove_logs",
32
- Meat: "minecraft:is_meat",
33
- Minecart: "minecraft:is_minecart",
34
- MusicDiscs: "minecraft:music_disc",
35
- NetheriteTier: "minecraft:netherite_tier",
36
- Pickaxe: "minecraft:is_pickaxe",
37
- PiglinLoved: "minecraft:piglin_loved",
38
- PiglinRepellents: "minecraft:piglin_repellents",
39
- Planks: "minecraft:planks",
40
- Sand: "minecraft:sand",
41
- Shovel: "minecraft:is_shovel",
42
- Sign: "minecraft:sign",
43
- SoulFireBaseBlocks: "minecraft:soul_fire_base_blocks",
44
- SpawnEgg: "minecraft:spawn_egg",
45
- StoneBricks: "minecraft:stone_bricks",
46
- StoneCraftingMaterials: "minecraft:stone_crafting_materials",
47
- StoneTier: "minecraft:stone_tier",
48
- StoneToolMaterials: "minecraft:stone_tool_materials",
49
- Sword: "minecraft:is_sword",
50
- Tool: "minecraft:is_tool",
51
- VibrationDamper: "minecraft:vibration_damper",
52
- WarpedStems: "minecraft:warped_stems",
53
- WoodenSlabs: "minecraft:wooden_slabs",
54
- WoodenTier: "minecraft:wooden_tier",
55
- Wool: "minecraft:wool"
56
- };
57
- /**
58
- * 原版可用于配方的标签列表
59
- */
60
- export const RecipeTags = {
61
- Furnace: "furnace",
62
- smoker: "smoker",
63
- Campfire: "campfire",
64
- SoulCampfire: "soul_campfire",
65
- CraftingTable: "crafting_table"
66
- };
67
- /**
68
- * 原版可用于配方的类型列表
69
- */
70
- export const RecipeTypes = {
71
- Furnace: "minecraft:recipe_furnace",
72
- Shaped: "minecraft:recipe_shaped",
73
- Shapeless: "minecraft:recipe_shapeless"
74
- };
@@ -1,17 +0,0 @@
1
- export class AddonRecipeFurnace extends AddonRecipe {
2
- /**
3
- * @param {'1.12'|'1.17'} ver
4
- * @param {any} def
5
- */
6
- static create(ver: "1.12" | "1.17", def: any): AddonRecipeFurnace;
7
- constructor(format_version: any, definitions: any);
8
- input(item: any, data: any, count: any): this;
9
- output(item: any): this;
10
- }
11
- export class AddonRecipeFurnace_1_12 extends AddonRecipeFurnace {
12
- constructor(definitions?: {});
13
- }
14
- export class AddonRecipeFurnace_1_17 extends AddonRecipeFurnace {
15
- constructor(definitions?: {});
16
- }
17
- import { AddonRecipe } from "./baseRecipe.js";
@@ -1,43 +0,0 @@
1
- import { AddonRecipe } from "./baseRecipe.js";
2
- import { RecipeTypes } from "./data.js";
3
- export class AddonRecipeFurnace extends AddonRecipe {
4
- constructor(format_version, definitions) {
5
- super(format_version, RecipeTypes.Furnace, definitions);
6
- }
7
- /**
8
- * @param {'1.12'|'1.17'} ver
9
- * @param {any} def
10
- */
11
- static create(ver, def) {
12
- return new AddonRecipeFurnace(ver, def);
13
- }
14
- input(item, data, count) {
15
- var input;
16
- if (!data && !count) {
17
- input = item;
18
- }
19
- else {
20
- input = { item };
21
- if (data)
22
- input.data = data;
23
- if (count)
24
- input.count = count;
25
- }
26
- this.definitions.input = input;
27
- return this;
28
- }
29
- output(item) {
30
- this.definitions.output = item;
31
- return this;
32
- }
33
- }
34
- export class AddonRecipeFurnace_1_12 extends AddonRecipeFurnace {
35
- constructor(definitions = {}) {
36
- super("1.12", definitions);
37
- }
38
- }
39
- export class AddonRecipeFurnace_1_17 extends AddonRecipeFurnace {
40
- constructor(definitions = {}) {
41
- super("1.17", definitions);
42
- }
43
- }
@@ -1,26 +0,0 @@
1
- export class AddonRecipeShaped extends AddonRecipe {
2
- /**
3
- * @param {'1.12'|'1.17'|'1.19'|'1.20'} ver
4
- * @param {any} def
5
- */
6
- static create(ver: "1.12" | "1.17" | "1.19" | "1.20", def: any): AddonRecipeShaped;
7
- constructor(format_version: any, definitions: any);
8
- assumeSymmetry(): void;
9
- key(key: any): this;
10
- pattern(pattern: any): this;
11
- priority(priority: any): this;
12
- output(item: any): this;
13
- }
14
- export class AddonRecipeShaped_1_12 extends AddonRecipeShaped {
15
- constructor(definitions: any);
16
- }
17
- export class AddonRecipeShaped_1_17 extends AddonRecipeShaped {
18
- constructor(definitions: any);
19
- }
20
- export class AddonRecipeShaped_1_19 extends AddonRecipeShaped {
21
- constructor(definitions: any);
22
- }
23
- export class AddonRecipeShaped_1_20 extends AddonRecipeShaped {
24
- constructor(definitions: any);
25
- }
26
- import { AddonRecipe } from "./baseRecipe.js";
@@ -1,53 +0,0 @@
1
- import { AddonRecipe } from "./baseRecipe.js";
2
- import { RecipeTypes } from "./data.js";
3
- export class AddonRecipeShaped extends AddonRecipe {
4
- constructor(format_version, definitions) {
5
- super(format_version, RecipeTypes.Shaped, definitions);
6
- }
7
- assumeSymmetry() {
8
- this.definitions.assume_symmetry = true;
9
- }
10
- key(key) {
11
- this.definitions.key = key;
12
- return this;
13
- }
14
- pattern(pattern) {
15
- this.definitions.pattern = pattern;
16
- return this;
17
- }
18
- priority(priority) {
19
- this.definitions.priority = priority;
20
- return this;
21
- }
22
- output(item) {
23
- this.definitions.result = typeof item == "string" ? { item } : item;
24
- return this;
25
- }
26
- /**
27
- * @param {'1.12'|'1.17'|'1.19'|'1.20'} ver
28
- * @param {any} def
29
- */
30
- static create(ver, def) {
31
- return new AddonRecipeShaped(ver, def);
32
- }
33
- }
34
- export class AddonRecipeShaped_1_12 extends AddonRecipeShaped {
35
- constructor(definitions) {
36
- super("1.12", RecipeTypes.Shaped, definitions);
37
- }
38
- }
39
- export class AddonRecipeShaped_1_17 extends AddonRecipeShaped {
40
- constructor(definitions) {
41
- super("1.17", RecipeTypes.Shaped, definitions);
42
- }
43
- }
44
- export class AddonRecipeShaped_1_19 extends AddonRecipeShaped {
45
- constructor(definitions) {
46
- super("1.19", RecipeTypes.Shaped, definitions);
47
- }
48
- }
49
- export class AddonRecipeShaped_1_20 extends AddonRecipeShaped {
50
- constructor(definitions) {
51
- super("1.20", RecipeTypes.Shaped, definitions);
52
- }
53
- }
@@ -1,18 +0,0 @@
1
- export class AddonRecipeShapeless extends AddonRecipe {
2
- /**
3
- * @param {'1.12'|'1.17'} ver
4
- * @param {any} def
5
- */
6
- static create(ver: "1.12" | "1.17", def: any): AddonRecipeShapeless;
7
- constructor(format_version: any, definitions: any);
8
- priority(priority: any): this;
9
- ingredients(ingredients: any): this;
10
- output(item: any): this;
11
- }
12
- export class AddonRecipeShapeless_1_12 extends AddonRecipeShapeless {
13
- constructor(definitions: any);
14
- }
15
- export class AddonRecipeShapeless_1_17 extends AddonRecipeShapeless {
16
- constructor(definitions: any);
17
- }
18
- import { AddonRecipe } from "./baseRecipe.js";
@@ -1,36 +0,0 @@
1
- import { AddonRecipe } from "./baseRecipe.js";
2
- import { RecipeTypes } from "./data.js";
3
- export class AddonRecipeShapeless extends AddonRecipe {
4
- constructor(format_version, definitions) {
5
- super(format_version, RecipeTypes.Shapeless, definitions);
6
- }
7
- /**
8
- * @param {'1.12'|'1.17'} ver
9
- * @param {any} def
10
- */
11
- static create(ver, def) {
12
- return new AddonRecipeShapeless(ver, def);
13
- }
14
- priority(priority) {
15
- this.definitions.priority = priority;
16
- return this;
17
- }
18
- ingredients(ingredients) {
19
- this.definitions.ingredients = ingredients;
20
- return this;
21
- }
22
- output(item) {
23
- this.definitions.result = typeof item == "string" ? { item } : item;
24
- return this;
25
- }
26
- }
27
- export class AddonRecipeShapeless_1_12 extends AddonRecipeShapeless {
28
- constructor(definitions) {
29
- super("1.12", definitions);
30
- }
31
- }
32
- export class AddonRecipeShapeless_1_17 extends AddonRecipeShapeless {
33
- constructor(definitions) {
34
- super("1.17", definitions);
35
- }
36
- }