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.
Files changed (219) hide show
  1. package/README.md +11 -3
  2. package/doc/api.md +2 -2
  3. package/doc/oc/index.md +0 -0
  4. package/doc/sapdon-ts.md +7 -5
  5. package/package.json +18 -19
  6. package/{dist/cli/dev-server/server.d.ts → prod/cli/index.d.ts} +9 -3
  7. package/prod/cli/index.js +1 -0
  8. package/prod/cli/start.js +1428 -0
  9. package/{dist → prod}/core/index.d.ts +2325 -1643
  10. package/prod/core/index.js +59017 -0
  11. package/{dist → prod}/oc/index.d.ts +3 -3
  12. package/prod/oc/index.js +1 -0
  13. package/prod/utils/index.d.ts +41 -0
  14. package/prod/utils/index.js +1 -0
  15. package/dist/cli/build.d.ts +0 -7
  16. package/dist/cli/build.js +0 -234
  17. package/dist/cli/dev-server/client.d.ts +0 -2
  18. package/dist/cli/dev-server/client.js +0 -21
  19. package/dist/cli/dev-server/config.d.ts +0 -3
  20. package/dist/cli/dev-server/config.js +0 -3
  21. package/dist/cli/dev-server/handles.d.ts +0 -4
  22. package/dist/cli/dev-server/handles.js +0 -5
  23. package/dist/cli/dev-server/hmr.d.ts +0 -1
  24. package/dist/cli/dev-server/hmr.js +0 -13
  25. package/dist/cli/dev-server/index.d.ts +0 -4
  26. package/dist/cli/dev-server/index.js +0 -17
  27. package/dist/cli/dev-server/server.js +0 -59
  28. package/dist/cli/dev-server/syncFiles.d.ts +0 -3
  29. package/dist/cli/dev-server/syncFiles.js +0 -37
  30. package/dist/cli/index.d.ts +0 -23
  31. package/dist/cli/index.js +0 -1
  32. package/dist/cli/init.d.ts +0 -9
  33. package/dist/cli/init.js +0 -80
  34. package/dist/cli/load.d.ts +0 -3
  35. package/dist/cli/load.js +0 -94
  36. package/dist/cli/start.d.ts +0 -2
  37. package/dist/cli/start.js +0 -2
  38. package/dist/cli/tools/textureSet.d.ts +0 -13
  39. package/dist/cli/tools/textureSet.js +0 -103
  40. package/dist/cli/utils.d.ts +0 -13
  41. package/dist/cli/utils.js +0 -89
  42. package/dist/core/addon/biome.d.ts +0 -22
  43. package/dist/core/addon/biome.js +0 -27
  44. package/dist/core/addon/block/block.d.ts +0 -41
  45. package/dist/core/addon/block/block.js +0 -46
  46. package/dist/core/addon/controllers/animationController.d.ts +0 -43
  47. package/dist/core/addon/controllers/animationController.js +0 -73
  48. package/dist/core/addon/entity/clientEntity.d.ts +0 -107
  49. package/dist/core/addon/entity/clientEntity.js +0 -149
  50. package/dist/core/addon/entity/entity.d.ts +0 -42
  51. package/dist/core/addon/entity/entity.js +0 -50
  52. package/dist/core/addon/feature/oreFeature.d.ts +0 -19
  53. package/dist/core/addon/feature/oreFeature.js +0 -24
  54. package/dist/core/addon/featureRule.d.ts +0 -20
  55. package/dist/core/addon/featureRule.js +0 -25
  56. package/dist/core/addon/item/attachable.d.ts +0 -94
  57. package/dist/core/addon/item/attachable.js +0 -134
  58. package/dist/core/addon/item/item.d.ts +0 -19
  59. package/dist/core/addon/item/item.js +0 -26
  60. package/dist/core/addon/manifest.d.ts +0 -49
  61. package/dist/core/addon/manifest.js +0 -65
  62. package/dist/core/addon/menuCategory.d.ts +0 -6
  63. package/dist/core/addon/menuCategory.js +0 -7
  64. package/dist/core/addon/recipe/baseRecipe.d.ts +0 -12
  65. package/dist/core/addon/recipe/baseRecipe.js +0 -23
  66. package/dist/core/addon/recipe/data.d.ts +0 -66
  67. package/dist/core/addon/recipe/data.js +0 -74
  68. package/dist/core/addon/recipe/furnace.d.ts +0 -17
  69. package/dist/core/addon/recipe/furnace.js +0 -43
  70. package/dist/core/addon/recipe/shaped.d.ts +0 -26
  71. package/dist/core/addon/recipe/shaped.js +0 -53
  72. package/dist/core/addon/recipe/shapeless.d.ts +0 -18
  73. package/dist/core/addon/recipe/shapeless.js +0 -36
  74. package/dist/core/biome/biome.d.ts +0 -14
  75. package/dist/core/biome/biome.js +0 -23
  76. package/dist/core/biome/biomeComponent.d.ts +0 -46
  77. package/dist/core/biome/biomeComponent.js +0 -77
  78. package/dist/core/block/basicBlock.d.ts +0 -48
  79. package/dist/core/block/basicBlock.js +0 -105
  80. package/dist/core/block/block.d.ts +0 -32
  81. package/dist/core/block/block.js +0 -92
  82. package/dist/core/block/blockComponent.d.ts +0 -187
  83. package/dist/core/block/blockComponent.js +0 -500
  84. package/dist/core/block/cropBlock.d.ts +0 -4
  85. package/dist/core/block/cropBlock.js +0 -27
  86. package/dist/core/block/geometryBlock.d.ts +0 -12
  87. package/dist/core/block/geometryBlock.js +0 -16
  88. package/dist/core/block/oreBlock.d.ts +0 -9
  89. package/dist/core/block/oreBlock.js +0 -25
  90. package/dist/core/block/rotatableBlock.d.ts +0 -27
  91. package/dist/core/block/rotatableBlock.js +0 -107
  92. package/dist/core/block/tileBlock.d.ts +0 -17
  93. package/dist/core/block/tileBlock.js +0 -125
  94. package/dist/core/entity/basicEntity.d.ts +0 -111
  95. package/dist/core/entity/basicEntity.js +0 -170
  96. package/dist/core/entity/behavior/followMob.d.ts +0 -12
  97. package/dist/core/entity/behavior/followMob.js +0 -35
  98. package/dist/core/entity/behavior/followParent.d.ts +0 -7
  99. package/dist/core/entity/behavior/followParent.js +0 -15
  100. package/dist/core/entity/behavior/randomStroll.d.ts +0 -31
  101. package/dist/core/entity/behavior/randomStroll.js +0 -63
  102. package/dist/core/entity/behavior/tempt.d.ts +0 -73
  103. package/dist/core/entity/behavior/tempt.js +0 -134
  104. package/dist/core/entity/bundles/basicBundle.d.ts +0 -13
  105. package/dist/core/entity/bundles/basicBundle.js +0 -45
  106. package/dist/core/entity/clientEntity.d.ts +0 -20
  107. package/dist/core/entity/clientEntity.js +0 -37
  108. package/dist/core/entity/componets/entityComponet.d.ts +0 -202
  109. package/dist/core/entity/componets/entityComponet.js +0 -347
  110. package/dist/core/entity/data/nativeEntityData.d.ts +0 -9
  111. package/dist/core/entity/data/nativeEntityData.js +0 -38
  112. package/dist/core/entity/entity.d.ts +0 -15
  113. package/dist/core/entity/entity.js +0 -18
  114. package/dist/core/entity/nativeEntity.d.ts +0 -8
  115. package/dist/core/entity/nativeEntity.js +0 -28
  116. package/dist/core/entity/navigation/walk.d.ts +0 -23
  117. package/dist/core/entity/navigation/walk.js +0 -56
  118. package/dist/core/entity/projectile.d.ts +0 -3
  119. package/dist/core/entity/projectile.js +0 -7
  120. package/dist/core/factory/biomeFactory.d.ts +0 -4
  121. package/dist/core/factory/biomeFactory.js +0 -13
  122. package/dist/core/factory/blockFactory.d.ts +0 -34
  123. package/dist/core/factory/blockFactory.js +0 -143
  124. package/dist/core/factory/entityFactory.d.ts +0 -17
  125. package/dist/core/factory/entityFactory.js +0 -75
  126. package/dist/core/factory/featureFactory.d.ts +0 -6
  127. package/dist/core/factory/featureFactory.js +0 -23
  128. package/dist/core/factory/itemExtra.d.ts +0 -8
  129. package/dist/core/factory/itemExtra.js +0 -9
  130. package/dist/core/factory/itemFactory.d.ts +0 -27
  131. package/dist/core/factory/itemFactory.js +0 -112
  132. package/dist/core/factory/recipeFactory.d.ts +0 -18
  133. package/dist/core/factory/recipeFactory.js +0 -39
  134. package/dist/core/factory/uiFactory.d.ts +0 -12
  135. package/dist/core/factory/uiFactory.js +0 -32
  136. package/dist/core/feature/oreFeature.d.ts +0 -10
  137. package/dist/core/feature/oreFeature.js +0 -11
  138. package/dist/core/feature-rule/condition/biomeFilter.d.ts +0 -26
  139. package/dist/core/feature-rule/condition/biomeFilter.js +0 -36
  140. package/dist/core/feature-rule/condition/featureConditions.d.ts +0 -27
  141. package/dist/core/feature-rule/condition/featureConditions.js +0 -37
  142. package/dist/core/feature-rule/distribution/coordinateDistribution.d.ts +0 -17
  143. package/dist/core/feature-rule/distribution/coordinateDistribution.js +0 -23
  144. package/dist/core/feature-rule/distribution/featureDistribution.d.ts +0 -31
  145. package/dist/core/feature-rule/distribution/featureDistribution.js +0 -41
  146. package/dist/core/feature-rule/featureRule.d.ts +0 -17
  147. package/dist/core/feature-rule/featureRule.js +0 -26
  148. package/dist/core/index.js +0 -1
  149. package/dist/core/item/armor.d.ts +0 -21
  150. package/dist/core/item/armor.js +0 -90
  151. package/dist/core/item/attachable.d.ts +0 -6
  152. package/dist/core/item/attachable.js +0 -26
  153. package/dist/core/item/food.d.ts +0 -24
  154. package/dist/core/item/food.js +0 -38
  155. package/dist/core/item/item.d.ts +0 -36
  156. package/dist/core/item/item.js +0 -69
  157. package/dist/core/item/itemComponents.d.ts +0 -113
  158. package/dist/core/item/itemComponents.js +0 -225
  159. package/dist/core/registry.d.ts +0 -12
  160. package/dist/core/registry.js +0 -16
  161. package/dist/core/texture.d.ts +0 -18
  162. package/dist/core/texture.js +0 -38
  163. package/dist/core/ui/buttonMapping.d.ts +0 -97
  164. package/dist/core/ui/buttonMapping.js +0 -132
  165. package/dist/core/ui/dataBindingObject.d.ts +0 -97
  166. package/dist/core/ui/dataBindingObject.js +0 -134
  167. package/dist/core/ui/elements/button.d.ts +0 -21
  168. package/dist/core/ui/elements/button.js +0 -101
  169. package/dist/core/ui/elements/collectionPanel.d.ts +0 -12
  170. package/dist/core/ui/elements/collectionPanel.js +0 -53
  171. package/dist/core/ui/elements/grid.d.ts +0 -8
  172. package/dist/core/ui/elements/grid.js +0 -33
  173. package/dist/core/ui/elements/image.d.ts +0 -13
  174. package/dist/core/ui/elements/image.js +0 -55
  175. package/dist/core/ui/elements/label.d.ts +0 -14
  176. package/dist/core/ui/elements/label.js +0 -61
  177. package/dist/core/ui/elements/panel.d.ts +0 -11
  178. package/dist/core/ui/elements/panel.js +0 -49
  179. package/dist/core/ui/elements/scrollingPanel.d.ts +0 -14
  180. package/dist/core/ui/elements/scrollingPanel.js +0 -59
  181. package/dist/core/ui/elements/stackPanel.d.ts +0 -14
  182. package/dist/core/ui/elements/stackPanel.js +0 -37
  183. package/dist/core/ui/elements/uiElement.d.ts +0 -53
  184. package/dist/core/ui/elements/uiElement.js +0 -129
  185. package/dist/core/ui/properties/control.d.ts +0 -214
  186. package/dist/core/ui/properties/control.js +0 -286
  187. package/dist/core/ui/properties/dataBinding.d.ts +0 -6
  188. package/dist/core/ui/properties/dataBinding.js +0 -16
  189. package/dist/core/ui/properties/factory.d.ts +0 -37
  190. package/dist/core/ui/properties/factory.js +0 -62
  191. package/dist/core/ui/properties/gridProp.d.ts +0 -65
  192. package/dist/core/ui/properties/gridProp.js +0 -90
  193. package/dist/core/ui/properties/input.d.ts +0 -97
  194. package/dist/core/ui/properties/input.js +0 -134
  195. package/dist/core/ui/properties/layout.d.ts +0 -105
  196. package/dist/core/ui/properties/layout.js +0 -145
  197. package/dist/core/ui/properties/scrollView.d.ts +0 -105
  198. package/dist/core/ui/properties/scrollView.js +0 -145
  199. package/dist/core/ui/properties/sound.d.ts +0 -47
  200. package/dist/core/ui/properties/sound.js +0 -66
  201. package/dist/core/ui/properties/sprite.d.ts +0 -161
  202. package/dist/core/ui/properties/sprite.js +0 -222
  203. package/dist/core/ui/properties/text.d.ts +0 -135
  204. package/dist/core/ui/properties/text.js +0 -187
  205. package/dist/core/ui/registry/uiSystemRegistry.d.ts +0 -8
  206. package/dist/core/ui/registry/uiSystemRegistry.js +0 -26
  207. package/dist/core/ui/systems/chest.d.ts +0 -5
  208. package/dist/core/ui/systems/chest.js +0 -21
  209. package/dist/core/ui/systems/containerUISystem.d.ts +0 -67
  210. package/dist/core/ui/systems/containerUISystem.js +0 -214
  211. package/dist/core/ui/systems/guidebook.d.ts +0 -9
  212. package/dist/core/ui/systems/guidebook.js +0 -206
  213. package/dist/core/ui/systems/serverForm.d.ts +0 -13
  214. package/dist/core/ui/systems/serverForm.js +0 -116
  215. package/dist/core/ui/systems/system.d.ts +0 -16
  216. package/dist/core/ui/systems/system.js +0 -37
  217. package/dist/oc/index.js +0 -1
  218. package/doc/cli.md +0 -24
  219. /package/doc/hello_sapdon/{sapdon/344/275/277/347/224/250/346/225/231/347/250/213.md" → hello_sapdon.md} +0 -0
@@ -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
- }
@@ -1,14 +0,0 @@
1
- export class Biome {
2
- constructor(identifier: any);
3
- identifier: any;
4
- components: Map<any, any>;
5
- /**
6
- * 添加组件
7
- * @param {Map} componentMap 组件 Map
8
- */
9
- addComponent(componentMap: Map<any, any>): this;
10
- toJson(): {
11
- format_version: any;
12
- "minecraft:biome": any;
13
- };
14
- }
@@ -1,23 +0,0 @@
1
- import { AddonBiome, AddonBiomeDefinition, AddonBiomeDescription } from "../addon/biome.js";
2
- export class Biome {
3
- constructor(identifier) {
4
- this.identifier = identifier;
5
- this.components = new Map();
6
- }
7
- /**
8
- * 添加组件
9
- * @param {Map} componentMap 组件 Map
10
- */
11
- addComponent(componentMap) {
12
- if (!componentMap || !(componentMap instanceof Map)) {
13
- throw new Error("componentMap is required and must be a Map");
14
- }
15
- for (const [key, value] of componentMap.entries()) {
16
- this.components.set(key, value);
17
- }
18
- return this;
19
- }
20
- toJson() {
21
- return new AddonBiome("1.13.0", new AddonBiomeDefinition(new AddonBiomeDescription(this.identifier), Object.fromEntries(this.components))).toJson();
22
- }
23
- }
@@ -1,46 +0,0 @@
1
- export class BiomeComponent {
2
- /**
3
- * 将多个组件集合合并为一个。
4
- * @param {...Map} componentMaps - 多个组件集合。
5
- * @returns {Map} - 合并后的组件集合。
6
- */
7
- static combineComponents(...componentMaps: Map<any, any>[]): Map<any, any>;
8
- /**
9
- * 设置生物群系的气候参数
10
- * @param {number} downfall - 降水量(范围通常为 0 到 1)
11
- * @param {number} snow_accumulation - 积雪量(范围通常为 0 到 1)
12
- * @param {number} temperature - 温度(范围通常为 0 到 1)
13
- * @returns {Map} 返回一个包含气候参数的 Map 对象,键为 "minecraft:climate"
14
- */
15
- static setClimate(downfall: number, snow_accumulation: number, temperature: number): Map<any, any>;
16
- /**
17
- * 设置生物群系的世界高度参数(通常用于生成地形)
18
- * @param {Object} noise_params - 噪声参数,用于控制地形生成
19
- * @returns {Map} 返回一个包含高度参数的 Map 对象,键为 "minecraft:overworld_height"
20
- */
21
- static setOverworldHeight(noise_params: Object): Map<any, any>;
22
- /**
23
- * 设置生物群系的表面参数(如地表材料、海底材料等)
24
- * @param {Object} params - 表面参数对象,包含以下属性:
25
- * @param {number} params.sea_floor_depth - 海底深度
26
- * @param {string} params.sea_floor_material - 海底材料(如 "minecraft:sand")
27
- * @param {string} params.foundation_material - 基础材料(如 "minecraft:stone")
28
- * @param {string} params.mid_material - 中间层材料(如 "minecraft:dirt")
29
- * @param {string} params.top_material - 顶层材料(如 "minecraft:grass_block")
30
- * @param {string} params.sea_material - 海洋材料(如 "minecraft:water")
31
- * @returns {Map} 返回一个包含表面参数的 Map 对象,键为 "minecraft:surface_parameters"
32
- */
33
- static setSurfaceParameters(params: {
34
- sea_floor_depth: number;
35
- sea_floor_material: string;
36
- foundation_material: string;
37
- mid_material: string;
38
- top_material: string;
39
- sea_material: string;
40
- }): Map<any, any>;
41
- /**
42
- * 设置生物群系在生成时的规则(如适用于哪些气候类型)
43
- * @returns {Map} 返回一个包含生成规则的 Map 对象,键为 "minecraft:overworld_generation_rules"
44
- */
45
- static setOverworldGenerationRules(medium_weight: any, warm_weight: any, cold_weight: any): Map<any, any>;
46
- }