@adeficior/data-modifier 1.0.0-rc.9

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 (274) hide show
  1. package/dist/cli/codegen/registry.d.ts +3 -0
  2. package/dist/cli/codegen/registry.js +81 -0
  3. package/dist/cli/codegen/registry.js.map +1 -0
  4. package/dist/cli/config.d.ts +10 -0
  5. package/dist/cli/config.js +60 -0
  6. package/dist/cli/config.js.map +1 -0
  7. package/dist/cli/index.d.ts +1 -0
  8. package/dist/cli/index.js +34 -0
  9. package/dist/cli/index.js.map +1 -0
  10. package/dist/common/id.d.ts +15 -0
  11. package/dist/common/id.js +42 -0
  12. package/dist/common/id.js.map +1 -0
  13. package/dist/common/ingredient.d.ts +49 -0
  14. package/dist/common/ingredient.js +108 -0
  15. package/dist/common/ingredient.js.map +1 -0
  16. package/dist/common/predicates.d.ts +7 -0
  17. package/dist/common/predicates.js +32 -0
  18. package/dist/common/predicates.js.map +1 -0
  19. package/dist/common/registry.d.ts +12 -0
  20. package/dist/common/registry.js +36 -0
  21. package/dist/common/registry.js.map +1 -0
  22. package/dist/common/result.d.ts +48 -0
  23. package/dist/common/result.js +37 -0
  24. package/dist/common/result.js.map +1 -0
  25. package/dist/emit/assets/blockstates.d.ts +18 -0
  26. package/dist/emit/assets/blockstates.js +46 -0
  27. package/dist/emit/assets/blockstates.js.map +1 -0
  28. package/dist/emit/assets/lang.d.ts +33 -0
  29. package/dist/emit/assets/lang.js +103 -0
  30. package/dist/emit/assets/lang.js.map +1 -0
  31. package/dist/emit/assets/models.d.ts +24 -0
  32. package/dist/emit/assets/models.js +59 -0
  33. package/dist/emit/assets/models.js.map +1 -0
  34. package/dist/emit/blacklist.d.ts +32 -0
  35. package/dist/emit/blacklist.js +99 -0
  36. package/dist/emit/blacklist.js.map +1 -0
  37. package/dist/emit/content/blockDefinition.d.ts +58 -0
  38. package/dist/emit/content/blockDefinition.js +58 -0
  39. package/dist/emit/content/blockDefinition.js.map +1 -0
  40. package/dist/emit/content/innerBlockDefinition.d.ts +12 -0
  41. package/dist/emit/content/innerBlockDefinition.js +32 -0
  42. package/dist/emit/content/innerBlockDefinition.js.map +1 -0
  43. package/dist/emit/content/itemDefinition.d.ts +58 -0
  44. package/dist/emit/content/itemDefinition.js +54 -0
  45. package/dist/emit/content/itemDefinition.js.map +1 -0
  46. package/dist/emit/custom.d.ts +15 -0
  47. package/dist/emit/custom.js +42 -0
  48. package/dist/emit/custom.js.map +1 -0
  49. package/dist/emit/data/loot.d.ts +48 -0
  50. package/dist/emit/data/loot.js +108 -0
  51. package/dist/emit/data/loot.js.map +1 -0
  52. package/dist/emit/data/recipe.d.ts +46 -0
  53. package/dist/emit/data/recipe.js +106 -0
  54. package/dist/emit/data/recipe.js.map +1 -0
  55. package/dist/emit/data/tags.d.ts +38 -0
  56. package/dist/emit/data/tags.js +115 -0
  57. package/dist/emit/data/tags.js.map +1 -0
  58. package/dist/emit/index.d.ts +11 -0
  59. package/dist/emit/index.js +1 -0
  60. package/dist/emit/index.js.map +1 -0
  61. package/dist/emit/polytoneTabs.d.ts +65 -0
  62. package/dist/emit/polytoneTabs.js +101 -0
  63. package/dist/emit/polytoneTabs.js.map +1 -0
  64. package/dist/emit/rule/index.d.ts +10 -0
  65. package/dist/emit/rule/index.js +10 -0
  66. package/dist/emit/rule/index.js.map +1 -0
  67. package/dist/emit/rule/lootTable.d.ts +14 -0
  68. package/dist/emit/rule/lootTable.js +47 -0
  69. package/dist/emit/rule/lootTable.js.map +1 -0
  70. package/dist/emit/rule/recipe.d.ts +16 -0
  71. package/dist/emit/rule/recipe.js +29 -0
  72. package/dist/emit/rule/recipe.js.map +1 -0
  73. package/dist/emit/ruled.d.ts +18 -0
  74. package/dist/emit/ruled.js +47 -0
  75. package/dist/emit/ruled.js.map +1 -0
  76. package/dist/error.d.ts +12 -0
  77. package/dist/error.js +45 -0
  78. package/dist/error.js.map +1 -0
  79. package/dist/index.d.ts +31 -0
  80. package/dist/index.js +12 -0
  81. package/dist/index.js.map +1 -0
  82. package/dist/loader/index.d.ts +16 -0
  83. package/dist/loader/index.js +40 -0
  84. package/dist/loader/index.js.map +1 -0
  85. package/dist/loader/lang.d.ts +7 -0
  86. package/dist/loader/lang.js +12 -0
  87. package/dist/loader/lang.js.map +1 -0
  88. package/dist/loader/loot.d.ts +7 -0
  89. package/dist/loader/loot.js +12 -0
  90. package/dist/loader/loot.js.map +1 -0
  91. package/dist/loader/pack.d.ts +62 -0
  92. package/dist/loader/pack.js +131 -0
  93. package/dist/loader/pack.js.map +1 -0
  94. package/dist/loader/recipe.d.ts +25 -0
  95. package/dist/loader/recipe.js +207 -0
  96. package/dist/loader/recipe.js.map +1 -0
  97. package/dist/loader/registry/dump.d.ts +19 -0
  98. package/dist/loader/registry/dump.js +74 -0
  99. package/dist/loader/registry/dump.js.map +1 -0
  100. package/dist/loader/registry/empty.d.ts +11 -0
  101. package/dist/loader/registry/empty.js +22 -0
  102. package/dist/loader/registry/empty.js.map +1 -0
  103. package/dist/loader/registry/index.d.ts +11 -0
  104. package/dist/loader/registry/index.js +1 -0
  105. package/dist/loader/registry/index.js.map +1 -0
  106. package/dist/loader/tags.d.ts +26 -0
  107. package/dist/loader/tags.js +131 -0
  108. package/dist/loader/tags.js.map +1 -0
  109. package/dist/parser/adAstra.d.ts +11 -0
  110. package/dist/parser/adAstra.js +6 -0
  111. package/dist/parser/adAstra.js.map +1 -0
  112. package/dist/parser/botania.d.ts +20 -0
  113. package/dist/parser/botania.js +11 -0
  114. package/dist/parser/botania.js.map +1 -0
  115. package/dist/parser/create.d.ts +4 -0
  116. package/dist/parser/create.js +3 -0
  117. package/dist/parser/create.js.map +1 -0
  118. package/dist/parser/farmersdelight.d.ts +4 -0
  119. package/dist/parser/farmersdelight.js +3 -0
  120. package/dist/parser/farmersdelight.js.map +1 -0
  121. package/dist/parser/index.d.ts +13 -0
  122. package/dist/parser/index.js +8 -0
  123. package/dist/parser/index.js.map +1 -0
  124. package/dist/parser/lootTable.d.ts +7 -0
  125. package/dist/parser/lootTable.js +70 -0
  126. package/dist/parser/lootTable.js.map +1 -0
  127. package/dist/parser/recipe/adAstra/conversion.d.ts +20 -0
  128. package/dist/parser/recipe/adAstra/conversion.js +33 -0
  129. package/dist/parser/recipe/adAstra/conversion.js.map +1 -0
  130. package/dist/parser/recipe/adAstra/hammering.d.ts +18 -0
  131. package/dist/parser/recipe/adAstra/hammering.js +27 -0
  132. package/dist/parser/recipe/adAstra/hammering.js.map +1 -0
  133. package/dist/parser/recipe/adAstra/index.d.ts +5 -0
  134. package/dist/parser/recipe/adAstra/index.js +1 -0
  135. package/dist/parser/recipe/adAstra/index.js.map +1 -0
  136. package/dist/parser/recipe/adAstra/inputOutput.d.ts +24 -0
  137. package/dist/parser/recipe/adAstra/inputOutput.js +42 -0
  138. package/dist/parser/recipe/adAstra/inputOutput.js.map +1 -0
  139. package/dist/parser/recipe/adAstra/nasaWorkbench.d.ts +20 -0
  140. package/dist/parser/recipe/adAstra/nasaWorkbench.js +30 -0
  141. package/dist/parser/recipe/adAstra/nasaWorkbench.js.map +1 -0
  142. package/dist/parser/recipe/adAstra/spaceStation.d.ts +19 -0
  143. package/dist/parser/recipe/adAstra/spaceStation.js +27 -0
  144. package/dist/parser/recipe/adAstra/spaceStation.js.map +1 -0
  145. package/dist/parser/recipe/botania/apothecary.d.ts +19 -0
  146. package/dist/parser/recipe/botania/apothecary.js +28 -0
  147. package/dist/parser/recipe/botania/apothecary.js.map +1 -0
  148. package/dist/parser/recipe/botania/brew.d.ts +18 -0
  149. package/dist/parser/recipe/botania/brew.js +24 -0
  150. package/dist/parser/recipe/botania/brew.js.map +1 -0
  151. package/dist/parser/recipe/botania/elvenTrade.d.ts +19 -0
  152. package/dist/parser/recipe/botania/elvenTrade.js +27 -0
  153. package/dist/parser/recipe/botania/elvenTrade.js.map +1 -0
  154. package/dist/parser/recipe/botania/gogWrapper.d.ts +22 -0
  155. package/dist/parser/recipe/botania/gogWrapper.js +34 -0
  156. package/dist/parser/recipe/botania/gogWrapper.js.map +1 -0
  157. package/dist/parser/recipe/botania/manaInfusion.d.ts +21 -0
  158. package/dist/parser/recipe/botania/manaInfusion.js +33 -0
  159. package/dist/parser/recipe/botania/manaInfusion.js.map +1 -0
  160. package/dist/parser/recipe/botania/nbtWrapper.d.ts +20 -0
  161. package/dist/parser/recipe/botania/nbtWrapper.js +30 -0
  162. package/dist/parser/recipe/botania/nbtWrapper.js.map +1 -0
  163. package/dist/parser/recipe/botania/orechid.d.ts +35 -0
  164. package/dist/parser/recipe/botania/orechid.js +74 -0
  165. package/dist/parser/recipe/botania/orechid.js.map +1 -0
  166. package/dist/parser/recipe/botania/pureDaisy.d.ts +19 -0
  167. package/dist/parser/recipe/botania/pureDaisy.js +30 -0
  168. package/dist/parser/recipe/botania/pureDaisy.js.map +1 -0
  169. package/dist/parser/recipe/botania/runicAltar.d.ts +19 -0
  170. package/dist/parser/recipe/botania/runicAltar.js +27 -0
  171. package/dist/parser/recipe/botania/runicAltar.js.map +1 -0
  172. package/dist/parser/recipe/botania/terraPlate.d.ts +19 -0
  173. package/dist/parser/recipe/botania/terraPlate.js +27 -0
  174. package/dist/parser/recipe/botania/terraPlate.js.map +1 -0
  175. package/dist/parser/recipe/create/assembly.d.ts +25 -0
  176. package/dist/parser/recipe/create/assembly.js +45 -0
  177. package/dist/parser/recipe/create/assembly.js.map +1 -0
  178. package/dist/parser/recipe/create/processing.d.ts +21 -0
  179. package/dist/parser/recipe/create/processing.js +27 -0
  180. package/dist/parser/recipe/create/processing.js.map +1 -0
  181. package/dist/parser/recipe/farmersdelight/cooking.d.ts +22 -0
  182. package/dist/parser/recipe/farmersdelight/cooking.js +29 -0
  183. package/dist/parser/recipe/farmersdelight/cooking.js.map +1 -0
  184. package/dist/parser/recipe/farmersdelight/cutting.d.ts +23 -0
  185. package/dist/parser/recipe/farmersdelight/cutting.js +38 -0
  186. package/dist/parser/recipe/farmersdelight/cutting.js.map +1 -0
  187. package/dist/parser/recipe/forge/conditional.d.ts +25 -0
  188. package/dist/parser/recipe/forge/conditional.js +45 -0
  189. package/dist/parser/recipe/forge/conditional.js.map +1 -0
  190. package/dist/parser/recipe/ignored.d.ts +10 -0
  191. package/dist/parser/recipe/ignored.js +16 -0
  192. package/dist/parser/recipe/ignored.js.map +1 -0
  193. package/dist/parser/recipe/index.d.ts +19 -0
  194. package/dist/parser/recipe/index.js +22 -0
  195. package/dist/parser/recipe/index.js.map +1 -0
  196. package/dist/parser/recipe/quark/exclusion.d.ts +20 -0
  197. package/dist/parser/recipe/quark/exclusion.js +32 -0
  198. package/dist/parser/recipe/quark/exclusion.js.map +1 -0
  199. package/dist/parser/recipe/roots/component.d.ts +18 -0
  200. package/dist/parser/recipe/roots/component.js +24 -0
  201. package/dist/parser/recipe/roots/component.js.map +1 -0
  202. package/dist/parser/recipe/roots/ritual.d.ts +22 -0
  203. package/dist/parser/recipe/roots/ritual.js +32 -0
  204. package/dist/parser/recipe/roots/ritual.js.map +1 -0
  205. package/dist/parser/recipe/sullys/polishing.d.ts +19 -0
  206. package/dist/parser/recipe/sullys/polishing.js +27 -0
  207. package/dist/parser/recipe/sullys/polishing.js.map +1 -0
  208. package/dist/parser/recipe/thermal/catalyst.d.ts +22 -0
  209. package/dist/parser/recipe/thermal/catalyst.js +24 -0
  210. package/dist/parser/recipe/thermal/catalyst.js.map +1 -0
  211. package/dist/parser/recipe/thermal/fuel.d.ts +18 -0
  212. package/dist/parser/recipe/thermal/fuel.js +24 -0
  213. package/dist/parser/recipe/thermal/fuel.js.map +1 -0
  214. package/dist/parser/recipe/thermal/index.d.ts +22 -0
  215. package/dist/parser/recipe/thermal/index.js +36 -0
  216. package/dist/parser/recipe/thermal/index.js.map +1 -0
  217. package/dist/parser/recipe/thermal/ingredient.d.ts +21 -0
  218. package/dist/parser/recipe/thermal/ingredient.js +43 -0
  219. package/dist/parser/recipe/thermal/ingredient.js.map +1 -0
  220. package/dist/parser/recipe/thermal/treeExtraction.d.ts +24 -0
  221. package/dist/parser/recipe/thermal/treeExtraction.js +47 -0
  222. package/dist/parser/recipe/thermal/treeExtraction.js.map +1 -0
  223. package/dist/parser/recipe/vanilla/shaped.d.ts +19 -0
  224. package/dist/parser/recipe/vanilla/shaped.js +28 -0
  225. package/dist/parser/recipe/vanilla/shaped.js.map +1 -0
  226. package/dist/parser/recipe/vanilla/shapeless.d.ts +18 -0
  227. package/dist/parser/recipe/vanilla/shapeless.js +27 -0
  228. package/dist/parser/recipe/vanilla/shapeless.js.map +1 -0
  229. package/dist/parser/recipe/vanilla/smelting.d.ts +19 -0
  230. package/dist/parser/recipe/vanilla/smelting.js +27 -0
  231. package/dist/parser/recipe/vanilla/smelting.js.map +1 -0
  232. package/dist/parser/recipe/vanilla/smithing.d.ts +19 -0
  233. package/dist/parser/recipe/vanilla/smithing.js +28 -0
  234. package/dist/parser/recipe/vanilla/smithing.js.map +1 -0
  235. package/dist/parser/recipe/vanilla/stonecutting.d.ts +20 -0
  236. package/dist/parser/recipe/vanilla/stonecutting.js +36 -0
  237. package/dist/parser/recipe/vanilla/stonecutting.js.map +1 -0
  238. package/dist/parser/roots.d.ts +4 -0
  239. package/dist/parser/roots.js +3 -0
  240. package/dist/parser/roots.js.map +1 -0
  241. package/dist/parser/thermal.d.ts +10 -0
  242. package/dist/parser/thermal.js +6 -0
  243. package/dist/parser/thermal.js.map +1 -0
  244. package/dist/schema/assets/blockstate.d.ts +10 -0
  245. package/dist/schema/assets/blockstate.js +1 -0
  246. package/dist/schema/assets/blockstate.js.map +1 -0
  247. package/dist/schema/assets/lang.d.ts +3 -0
  248. package/dist/schema/assets/lang.js +3 -0
  249. package/dist/schema/assets/lang.js.map +1 -0
  250. package/dist/schema/assets/model.d.ts +27 -0
  251. package/dist/schema/assets/model.js +1 -0
  252. package/dist/schema/assets/model.js.map +1 -0
  253. package/dist/schema/content/blockDefinition.d.ts +11 -0
  254. package/dist/schema/content/blockDefinition.js +1 -0
  255. package/dist/schema/content/blockDefinition.js.map +1 -0
  256. package/dist/schema/content/itemDefinition.d.ts +14 -0
  257. package/dist/schema/content/itemDefinition.js +1 -0
  258. package/dist/schema/content/itemDefinition.js.map +1 -0
  259. package/dist/schema/data/loot.d.ts +1151 -0
  260. package/dist/schema/data/loot.js +76 -0
  261. package/dist/schema/data/loot.js.map +1 -0
  262. package/dist/schema/data/recipe.d.ts +13 -0
  263. package/dist/schema/data/recipe.js +1 -0
  264. package/dist/schema/data/recipe.js.map +1 -0
  265. package/dist/schema/data/tag.d.ts +11 -0
  266. package/dist/schema/data/tag.js +6 -0
  267. package/dist/schema/data/tag.js.map +1 -0
  268. package/dist/stubTypes.d.ts +7 -0
  269. package/dist/stubTypes.js +1 -0
  270. package/dist/stubTypes.js.map +1 -0
  271. package/dist/textHelper.d.ts +3 -0
  272. package/dist/textHelper.js +20 -0
  273. package/dist/textHelper.js.map +1 -0
  274. package/package.json +96 -0
@@ -0,0 +1,27 @@
1
+ import RecipeParser, { Recipe } from "../index.js";
2
+ export class ShapelessRecipe extends Recipe {
3
+ getIngredients() {
4
+ return this.definition.ingredients;
5
+ }
6
+ getResults() {
7
+ return [this.definition.result];
8
+ }
9
+ replaceIngredient(replace) {
10
+ return new ShapelessRecipe({
11
+ ...this.definition,
12
+ ingredients: this.definition.ingredients.map(replace),
13
+ });
14
+ }
15
+ replaceResult(replace) {
16
+ return new ShapelessRecipe({
17
+ ...this.definition,
18
+ result: replace(this.definition.result),
19
+ });
20
+ }
21
+ }
22
+ export default class ShapelessParser extends RecipeParser {
23
+ create(definition) {
24
+ return new ShapelessRecipe(definition);
25
+ }
26
+ }
27
+ //# sourceMappingURL=shapeless.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shapeless.js","sourceRoot":"","sources":["../../../../src/parser/recipe/vanilla/shapeless.ts"],"names":[],"mappings":"AACA,OAAO,YAAY,EAAE,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAcnD,MAAM,OAAO,eAAgB,SAAQ,MAAiC;IACpE,cAAc;QACZ,OAAO,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC;IACrC,CAAC;IAED,UAAU;QACR,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;IAClC,CAAC;IAED,iBAAiB,CAAC,OAA6B;QAC7C,OAAO,IAAI,eAAe,CAAC;YACzB,GAAG,IAAI,CAAC,UAAU;YAClB,WAAW,EAAE,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,GAAG,CAAC,OAAO,CAAC;SACtD,CAAC,CAAC;IACL,CAAC;IAED,aAAa,CAAC,OAAyB;QACrC,OAAO,IAAI,eAAe,CAAC;YACzB,GAAG,IAAI,CAAC,UAAU;YAClB,MAAM,EAAE,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC;SACxC,CAAC,CAAC;IACL,CAAC;CACF;AAED,MAAM,CAAC,OAAO,OAAO,eAAgB,SAAQ,YAG5C;IACC,MAAM,CAAC,UAAqC;QAC1C,OAAO,IAAI,eAAe,CAAC,UAAU,CAAC,CAAC;IACzC,CAAC;CACF"}
@@ -0,0 +1,19 @@
1
+ import type { Replacer } from "../index.js";
2
+ import RecipeParser, { Recipe } from "../index.js";
3
+ import type { Ingredient, IngredientInput } from "../../../common/ingredient.js";
4
+ import type { RecipeDefinition } from "../../../schema/data/recipe.js";
5
+ import type { Result, ResultInput } from "../../../common/result.js";
6
+ export type SmeltingRecipeDefinition = RecipeDefinition & Readonly<{
7
+ ingredient: Ingredient;
8
+ result: Result;
9
+ experience?: number;
10
+ }>;
11
+ export declare class SmeltingRecipe extends Recipe<SmeltingRecipeDefinition> {
12
+ getIngredients(): IngredientInput[];
13
+ getResults(): ResultInput[];
14
+ replaceIngredient(replace: Replacer<Ingredient>): Recipe;
15
+ replaceResult(replace: Replacer<Result>): Recipe;
16
+ }
17
+ export default class SmeltingParser extends RecipeParser<SmeltingRecipeDefinition, SmeltingRecipe> {
18
+ create(definition: SmeltingRecipeDefinition): SmeltingRecipe;
19
+ }
@@ -0,0 +1,27 @@
1
+ import RecipeParser, { Recipe } from "../index.js";
2
+ export class SmeltingRecipe extends Recipe {
3
+ getIngredients() {
4
+ return [this.definition.ingredient];
5
+ }
6
+ getResults() {
7
+ return [this.definition.result];
8
+ }
9
+ replaceIngredient(replace) {
10
+ return new SmeltingRecipe({
11
+ ...this.definition,
12
+ ingredient: replace(this.definition.ingredient),
13
+ });
14
+ }
15
+ replaceResult(replace) {
16
+ return new SmeltingRecipe({
17
+ ...this.definition,
18
+ result: replace(this.definition.result),
19
+ });
20
+ }
21
+ }
22
+ export default class SmeltingParser extends RecipeParser {
23
+ create(definition) {
24
+ return new SmeltingRecipe(definition);
25
+ }
26
+ }
27
+ //# sourceMappingURL=smelting.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"smelting.js","sourceRoot":"","sources":["../../../../src/parser/recipe/vanilla/smelting.ts"],"names":[],"mappings":"AACA,OAAO,YAAY,EAAE,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAenD,MAAM,OAAO,cAAe,SAAQ,MAAgC;IAClE,cAAc;QACZ,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;IACtC,CAAC;IAED,UAAU;QACR,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;IAClC,CAAC;IAED,iBAAiB,CAAC,OAA6B;QAC7C,OAAO,IAAI,cAAc,CAAC;YACxB,GAAG,IAAI,CAAC,UAAU;YAClB,UAAU,EAAE,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC;SAChD,CAAC,CAAC;IACL,CAAC;IAED,aAAa,CAAC,OAAyB;QACrC,OAAO,IAAI,cAAc,CAAC;YACxB,GAAG,IAAI,CAAC,UAAU;YAClB,MAAM,EAAE,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC;SACxC,CAAC,CAAC;IACL,CAAC;CACF;AAED,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,YAG3C;IACC,MAAM,CAAC,UAAoC;QACzC,OAAO,IAAI,cAAc,CAAC,UAAU,CAAC,CAAC;IACxC,CAAC;CACF"}
@@ -0,0 +1,19 @@
1
+ import type { Replacer } from "../index.js";
2
+ import RecipeParser, { Recipe } from "../index.js";
3
+ import type { Ingredient, IngredientInput } from "../../../common/ingredient.js";
4
+ import type { RecipeDefinition } from "../../../schema/data/recipe.js";
5
+ import type { Result, ResultInput } from "../../../common/result.js";
6
+ export type SmithingRecipeDefinition = RecipeDefinition & Readonly<{
7
+ base: Ingredient;
8
+ addition: Ingredient;
9
+ result: Result;
10
+ }>;
11
+ export declare class SmithingRecipe extends Recipe<SmithingRecipeDefinition> {
12
+ getIngredients(): IngredientInput[];
13
+ getResults(): ResultInput[];
14
+ replaceIngredient(replace: Replacer<Ingredient>): Recipe;
15
+ replaceResult(replace: Replacer<Result>): Recipe;
16
+ }
17
+ export default class SmithingParser extends RecipeParser<SmithingRecipeDefinition, SmithingRecipe> {
18
+ create(definition: SmithingRecipeDefinition): SmithingRecipe;
19
+ }
@@ -0,0 +1,28 @@
1
+ import RecipeParser, { Recipe } from "../index.js";
2
+ export class SmithingRecipe extends Recipe {
3
+ getIngredients() {
4
+ return [this.definition.base, this.definition.addition];
5
+ }
6
+ getResults() {
7
+ return [this.definition.result];
8
+ }
9
+ replaceIngredient(replace) {
10
+ return new SmithingRecipe({
11
+ ...this.definition,
12
+ base: replace(this.definition.base),
13
+ addition: replace(this.definition.addition),
14
+ });
15
+ }
16
+ replaceResult(replace) {
17
+ return new SmithingRecipe({
18
+ ...this.definition,
19
+ result: replace(this.definition.result),
20
+ });
21
+ }
22
+ }
23
+ export default class SmithingParser extends RecipeParser {
24
+ create(definition) {
25
+ return new SmithingRecipe(definition);
26
+ }
27
+ }
28
+ //# sourceMappingURL=smithing.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"smithing.js","sourceRoot":"","sources":["../../../../src/parser/recipe/vanilla/smithing.ts"],"names":[],"mappings":"AACA,OAAO,YAAY,EAAE,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAenD,MAAM,OAAO,cAAe,SAAQ,MAAgC;IAClE,cAAc;QACZ,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;IAC1D,CAAC;IAED,UAAU;QACR,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;IAClC,CAAC;IAED,iBAAiB,CAAC,OAA6B;QAC7C,OAAO,IAAI,cAAc,CAAC;YACxB,GAAG,IAAI,CAAC,UAAU;YAClB,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC;YACnC,QAAQ,EAAE,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC;SAC5C,CAAC,CAAC;IACL,CAAC;IAED,aAAa,CAAC,OAAyB;QACrC,OAAO,IAAI,cAAc,CAAC;YACxB,GAAG,IAAI,CAAC,UAAU;YAClB,MAAM,EAAE,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC;SACxC,CAAC,CAAC;IACL,CAAC;CACF;AAED,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,YAG3C;IACC,MAAM,CAAC,UAAoC;QACzC,OAAO,IAAI,cAAc,CAAC,UAAU,CAAC,CAAC;IACxC,CAAC;CACF"}
@@ -0,0 +1,20 @@
1
+ import type { ItemId } from "@adeficior/data-modifier/generated";
2
+ import type { Ingredient, IngredientInput } from "../../../common/ingredient.js";
3
+ import type { Result, ResultInput } from "../../../common/result.js";
4
+ import type { RecipeDefinition } from "../../../schema/data/recipe.js";
5
+ import type { Replacer } from "../index.js";
6
+ import RecipeParser, { Recipe } from "../index.js";
7
+ export type StonecuttingRecipeDefinition = RecipeDefinition & Readonly<{
8
+ ingredient: Ingredient;
9
+ result: ItemId;
10
+ count?: number;
11
+ }>;
12
+ export declare class StonecuttingRecipe extends Recipe<StonecuttingRecipeDefinition> {
13
+ getIngredients(): IngredientInput[];
14
+ getResults(): ResultInput[];
15
+ replaceIngredient(replace: Replacer<Ingredient>): Recipe;
16
+ replaceResult(replace: Replacer<Result>): Recipe;
17
+ }
18
+ export default class StonecuttingParser extends RecipeParser<StonecuttingRecipeDefinition, StonecuttingRecipe> {
19
+ create(definition: StonecuttingRecipeDefinition): StonecuttingRecipe;
20
+ }
@@ -0,0 +1,36 @@
1
+ import { encodeId } from "../../../common/id.js";
2
+ import { createResult } from "../../../common/result.js";
3
+ import { IllegalShapeError } from "../../../error.js";
4
+ import RecipeParser, { Recipe } from "../index.js";
5
+ export class StonecuttingRecipe extends Recipe {
6
+ getIngredients() {
7
+ return [this.definition.ingredient];
8
+ }
9
+ getResults() {
10
+ return [
11
+ { item: encodeId(this.definition.result), count: this.definition.count },
12
+ ];
13
+ }
14
+ replaceIngredient(replace) {
15
+ return new StonecuttingRecipe({
16
+ ...this.definition,
17
+ ingredient: replace(this.definition.ingredient),
18
+ });
19
+ }
20
+ replaceResult(replace) {
21
+ const result = createResult(replace);
22
+ if (!("item" in result))
23
+ throw new IllegalShapeError("stonecutting does only support item results", result);
24
+ return new StonecuttingRecipe({
25
+ ...this.definition,
26
+ result: result.item,
27
+ count: result.count ?? 1,
28
+ });
29
+ }
30
+ }
31
+ export default class StonecuttingParser extends RecipeParser {
32
+ create(definition) {
33
+ return new StonecuttingRecipe(definition);
34
+ }
35
+ }
36
+ //# sourceMappingURL=stonecutting.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stonecutting.js","sourceRoot":"","sources":["../../../../src/parser/recipe/vanilla/stonecutting.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAMjD,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAGtD,OAAO,YAAY,EAAE,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AASnD,MAAM,OAAO,kBAAmB,SAAQ,MAAoC;IAC1E,cAAc;QACZ,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;IACtC,CAAC;IAED,UAAU;QACR,OAAO;YACL,EAAE,IAAI,EAAE,QAAQ,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE;SACzE,CAAC;IACJ,CAAC;IAED,iBAAiB,CAAC,OAA6B;QAC7C,OAAO,IAAI,kBAAkB,CAAC;YAC5B,GAAG,IAAI,CAAC,UAAU;YAClB,UAAU,EAAE,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC;SAChD,CAAC,CAAC;IACL,CAAC;IAED,aAAa,CAAC,OAAyB;QACrC,MAAM,MAAM,GAAG,YAAY,CAAC,OAAO,CAAC,CAAC;QACrC,IAAI,CAAC,CAAC,MAAM,IAAI,MAAM,CAAC;YACrB,MAAM,IAAI,iBAAiB,CACzB,6CAA6C,EAC7C,MAAM,CACP,CAAC;QAEJ,OAAO,IAAI,kBAAkB,CAAC;YAC5B,GAAG,IAAI,CAAC,UAAU;YAClB,MAAM,EAAE,MAAM,CAAC,IAAI;YACnB,KAAK,EAAE,MAAM,CAAC,KAAK,IAAI,CAAC;SACzB,CAAC,CAAC;IACL,CAAC;CACF;AAED,MAAM,CAAC,OAAO,OAAO,kBAAmB,SAAQ,YAG/C;IACC,MAAM,CAAC,UAAwC;QAC7C,OAAO,IAAI,kBAAkB,CAAC,UAAU,CAAC,CAAC;IAC5C,CAAC;CACF"}
@@ -0,0 +1,4 @@
1
+ export type { RootRitualRecipeDefinition } from "./recipe/roots/ritual.js";
2
+ export { RootRitualRecipe, default as RootRitualRecipeParser, } from "./recipe/roots/ritual.js";
3
+ export type { RootComponentRecipeDefinition } from "./recipe/roots/component.js";
4
+ export { RootComponentRecipe, default as RootComponentRecipeParser, } from "./recipe/roots/component.js";
@@ -0,0 +1,3 @@
1
+ export { RootRitualRecipe, default as RootRitualRecipeParser, } from "./recipe/roots/ritual.js";
2
+ export { RootComponentRecipe, default as RootComponentRecipeParser, } from "./recipe/roots/component.js";
3
+ //# sourceMappingURL=roots.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"roots.js","sourceRoot":"","sources":["../../src/parser/roots.ts"],"names":[],"mappings":"AACA,OAAO,EACL,gBAAgB,EAChB,OAAO,IAAI,sBAAsB,GAClC,MAAM,0BAA0B,CAAC;AAElC,OAAO,EACL,mBAAmB,EACnB,OAAO,IAAI,yBAAyB,GACrC,MAAM,6BAA6B,CAAC"}
@@ -0,0 +1,10 @@
1
+ export type { ThermalRecipeDefinition } from "./recipe/thermal/index.js";
2
+ export { ThermalRecipe, default as ThermalRecipeParser, } from "./recipe/thermal/index.js";
3
+ export type { TreeExtractionRecipeDefinition } from "./recipe/thermal/treeExtraction.js";
4
+ export { TreeExtractionRecipe, default as TreeExtractionRecipeParser, } from "./recipe/thermal/treeExtraction.js";
5
+ export type { ThermalCatalystRecipeDefinition } from "./recipe/thermal/catalyst.js";
6
+ export { ThermalCatalystRecipe, default as ThermalCatalystRecipeParser, } from "./recipe/thermal/catalyst.js";
7
+ export type { ThermalFuelRecipeDefinition } from "./recipe/thermal/fuel.js";
8
+ export { ThermalFuelRecipe, default as ThermalFuelRecipeParser, } from "./recipe/thermal/fuel.js";
9
+ export type { ThermalIngredientInput } from "./recipe/thermal/ingredient.js";
10
+ export { fromThermalIngredient, toThermalIngredient, } from "./recipe/thermal/ingredient.js";
@@ -0,0 +1,6 @@
1
+ export { ThermalRecipe, default as ThermalRecipeParser, } from "./recipe/thermal/index.js";
2
+ export { TreeExtractionRecipe, default as TreeExtractionRecipeParser, } from "./recipe/thermal/treeExtraction.js";
3
+ export { ThermalCatalystRecipe, default as ThermalCatalystRecipeParser, } from "./recipe/thermal/catalyst.js";
4
+ export { ThermalFuelRecipe, default as ThermalFuelRecipeParser, } from "./recipe/thermal/fuel.js";
5
+ export { fromThermalIngredient, toThermalIngredient, } from "./recipe/thermal/ingredient.js";
6
+ //# sourceMappingURL=thermal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"thermal.js","sourceRoot":"","sources":["../../src/parser/thermal.ts"],"names":[],"mappings":"AACA,OAAO,EACL,aAAa,EACb,OAAO,IAAI,mBAAmB,GAC/B,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EACL,oBAAoB,EACpB,OAAO,IAAI,0BAA0B,GACtC,MAAM,oCAAoC,CAAC;AAE5C,OAAO,EACL,qBAAqB,EACrB,OAAO,IAAI,2BAA2B,GACvC,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EACL,iBAAiB,EACjB,OAAO,IAAI,uBAAuB,GACnC,MAAM,0BAA0B,CAAC;AAElC,OAAO,EACL,qBAAqB,EACrB,mBAAmB,GACpB,MAAM,gCAAgC,CAAC"}
@@ -0,0 +1,10 @@
1
+ type Variant = Readonly<{
2
+ model?: string;
3
+ x?: number;
4
+ y?: number;
5
+ z?: number;
6
+ }>;
7
+ export type Blockstate = Readonly<{
8
+ variants: Record<string, Variant>;
9
+ }>;
10
+ export {};
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=blockstate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"blockstate.js","sourceRoot":"","sources":["../../../src/schema/assets/blockstate.ts"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ import zod from "zod";
2
+ export declare const LangSchema: zod.ZodRecord<zod.ZodString, zod.ZodString>;
3
+ export type LangDefinition = zod.infer<typeof LangSchema>;
@@ -0,0 +1,3 @@
1
+ import zod from "zod";
2
+ export const LangSchema = zod.record(zod.string(), zod.string());
3
+ //# sourceMappingURL=lang.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lang.js","sourceRoot":"","sources":["../../../src/schema/assets/lang.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,KAAK,CAAC;AAEtB,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,EAAE,EAAE,GAAG,CAAC,MAAM,EAAE,CAAC,CAAC"}
@@ -0,0 +1,27 @@
1
+ type Facing = "up" | "down" | "north" | "south" | "west" | "east";
2
+ type Axis = "x" | "y" | "z";
3
+ type Vec3 = [number, number, number];
4
+ type Vec4 = [number, number, number, number];
5
+ type Element = Readonly<{
6
+ from: Vec3;
7
+ to: Vec3;
8
+ faces: Record<Facing, {
9
+ texture: string;
10
+ uv?: Vec4;
11
+ cullface?: Facing;
12
+ }>;
13
+ rotation?: {
14
+ origin: Vec3;
15
+ axis: Axis;
16
+ angle: number;
17
+ rescale?: boolean;
18
+ };
19
+ shade?: boolean;
20
+ }>;
21
+ export type Model = Readonly<{
22
+ parent?: string;
23
+ textures?: Record<string, string>;
24
+ elements?: Element[];
25
+ ambientocclusion?: boolean;
26
+ }>;
27
+ export {};
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=model.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"model.js","sourceRoot":"","sources":["../../../src/schema/assets/model.ts"],"names":[],"mappings":""}
@@ -0,0 +1,11 @@
1
+ export type BlockProperties = Readonly<{
2
+ material?: string;
3
+ strength?: number;
4
+ }>;
5
+ export type BlockDefinition = Readonly<{
6
+ type: string;
7
+ properties: BlockProperties | string;
8
+ }>;
9
+ export type CogBlockDefinition = BlockDefinition & Readonly<{
10
+ large?: boolean;
11
+ }>;
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=blockDefinition.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"blockDefinition.js","sourceRoot":"","sources":["../../../src/schema/content/blockDefinition.ts"],"names":[],"mappings":""}
@@ -0,0 +1,14 @@
1
+ import type { BlockDefinition } from "./blockDefinition.js";
2
+ export type Rarity = "common" | "rare";
3
+ export type ItemProperties = Readonly<{
4
+ rarity?: Rarity;
5
+ stack_size?: number;
6
+ creative_tab?: string;
7
+ }>;
8
+ export type ItemDefinition = Readonly<{
9
+ type: string;
10
+ properties?: ItemProperties;
11
+ }>;
12
+ export type BlockItemDefinition = ItemDefinition & Readonly<{
13
+ block: BlockDefinition;
14
+ }>;
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=itemDefinition.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"itemDefinition.js","sourceRoot":"","sources":["../../../src/schema/content/itemDefinition.ts"],"names":[],"mappings":""}