@adeficior/data-modifier 1.0.0-rc.14 → 1.0.0-rc.15

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 (81) hide show
  1. package/dist/parser/index.d.ts +1 -1
  2. package/dist/parser/index.js.map +1 -1
  3. package/dist/parser/recipe/adAstra/conversion.d.ts +2 -2
  4. package/dist/parser/recipe/adAstra/conversion.js +2 -2
  5. package/dist/parser/recipe/adAstra/conversion.js.map +1 -1
  6. package/dist/parser/recipe/adAstra/inputOutput.d.ts +3 -3
  7. package/dist/parser/recipe/adAstra/inputOutput.js +2 -2
  8. package/dist/parser/recipe/adAstra/inputOutput.js.map +1 -1
  9. package/dist/parser/recipe/adAstra/spaceStation.d.ts +2 -2
  10. package/dist/parser/recipe/adAstra/spaceStation.js +2 -2
  11. package/dist/parser/recipe/adAstra/spaceStation.js.map +1 -1
  12. package/dist/parser/recipe/botania/apothecary.d.ts +2 -2
  13. package/dist/parser/recipe/botania/apothecary.js +2 -2
  14. package/dist/parser/recipe/botania/apothecary.js.map +1 -1
  15. package/dist/parser/recipe/botania/brew.d.ts +2 -2
  16. package/dist/parser/recipe/botania/brew.js +2 -2
  17. package/dist/parser/recipe/botania/brew.js.map +1 -1
  18. package/dist/parser/recipe/botania/gogWrapper.d.ts +4 -6
  19. package/dist/parser/recipe/botania/gogWrapper.js +2 -2
  20. package/dist/parser/recipe/botania/gogWrapper.js.map +1 -1
  21. package/dist/parser/recipe/botania/manaInfusion.d.ts +2 -2
  22. package/dist/parser/recipe/botania/manaInfusion.js +2 -2
  23. package/dist/parser/recipe/botania/manaInfusion.js.map +1 -1
  24. package/dist/parser/recipe/botania/nbtWrapper.d.ts +4 -6
  25. package/dist/parser/recipe/botania/nbtWrapper.js +2 -2
  26. package/dist/parser/recipe/botania/nbtWrapper.js.map +1 -1
  27. package/dist/parser/recipe/create/assembly.d.ts +2 -2
  28. package/dist/parser/recipe/create/assembly.js +2 -2
  29. package/dist/parser/recipe/create/assembly.js.map +1 -1
  30. package/dist/parser/recipe/farmersdelight/cooking.d.ts +2 -2
  31. package/dist/parser/recipe/farmersdelight/cooking.js +2 -2
  32. package/dist/parser/recipe/farmersdelight/cooking.js.map +1 -1
  33. package/dist/parser/recipe/farmersdelight/cutting.d.ts +2 -2
  34. package/dist/parser/recipe/farmersdelight/cutting.js +2 -2
  35. package/dist/parser/recipe/farmersdelight/cutting.js.map +1 -1
  36. package/dist/parser/recipe/forge/conditional.d.ts +4 -6
  37. package/dist/parser/recipe/forge/conditional.js +2 -2
  38. package/dist/parser/recipe/forge/conditional.js.map +1 -1
  39. package/dist/parser/recipe/index.d.ts +6 -2
  40. package/dist/parser/recipe/index.js +10 -4
  41. package/dist/parser/recipe/index.js.map +1 -1
  42. package/dist/parser/recipe/manyToMany.d.ts +2 -2
  43. package/dist/parser/recipe/manyToMany.js +2 -2
  44. package/dist/parser/recipe/manyToMany.js.map +1 -1
  45. package/dist/parser/recipe/manyToOne.d.ts +2 -2
  46. package/dist/parser/recipe/manyToOne.js +2 -2
  47. package/dist/parser/recipe/manyToOne.js.map +1 -1
  48. package/dist/parser/recipe/oneToOne.d.ts +2 -2
  49. package/dist/parser/recipe/oneToOne.js +2 -2
  50. package/dist/parser/recipe/oneToOne.js.map +1 -1
  51. package/dist/parser/recipe/roots/component.d.ts +2 -2
  52. package/dist/parser/recipe/roots/component.js +2 -2
  53. package/dist/parser/recipe/roots/component.js.map +1 -1
  54. package/dist/parser/recipe/roots/ritual.d.ts +2 -2
  55. package/dist/parser/recipe/roots/ritual.js +2 -2
  56. package/dist/parser/recipe/roots/ritual.js.map +1 -1
  57. package/dist/parser/recipe/thermal/catalyst.d.ts +2 -2
  58. package/dist/parser/recipe/thermal/catalyst.js +2 -2
  59. package/dist/parser/recipe/thermal/catalyst.js.map +1 -1
  60. package/dist/parser/recipe/thermal/fuel.d.ts +2 -2
  61. package/dist/parser/recipe/thermal/fuel.js +2 -2
  62. package/dist/parser/recipe/thermal/fuel.js.map +1 -1
  63. package/dist/parser/recipe/thermal/index.d.ts +2 -2
  64. package/dist/parser/recipe/thermal/index.js +2 -2
  65. package/dist/parser/recipe/thermal/index.js.map +1 -1
  66. package/dist/parser/recipe/thermal/treeExtraction.d.ts +2 -2
  67. package/dist/parser/recipe/thermal/treeExtraction.js +2 -2
  68. package/dist/parser/recipe/thermal/treeExtraction.js.map +1 -1
  69. package/dist/parser/recipe/vanilla/shaped.d.ts +3 -4
  70. package/dist/parser/recipe/vanilla/shaped.js +2 -2
  71. package/dist/parser/recipe/vanilla/shaped.js.map +1 -1
  72. package/dist/parser/recipe/vanilla/smelting.d.ts +2 -2
  73. package/dist/parser/recipe/vanilla/smelting.js +2 -2
  74. package/dist/parser/recipe/vanilla/smelting.js.map +1 -1
  75. package/dist/parser/recipe/vanilla/smithing.d.ts +2 -2
  76. package/dist/parser/recipe/vanilla/smithing.js +2 -2
  77. package/dist/parser/recipe/vanilla/smithing.js.map +1 -1
  78. package/dist/parser/recipe/vanilla/stonecutting.d.ts +2 -2
  79. package/dist/parser/recipe/vanilla/stonecutting.js +2 -2
  80. package/dist/parser/recipe/vanilla/stonecutting.js.map +1 -1
  81. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  import type { Ingredient } from "../../common/ingredient/index.js";
2
2
  import type { Result } from "../../common/result/index.js";
3
3
  import type { RecipeDefinition } from "../../schema/data/recipe.js";
4
- import RecipeParser, { Recipe, type RecipeParseContext, type Replacer } from "./index.js";
4
+ import RecipeParser, { Recipe, type RecipeModifier, type RecipeParseContext } from "./index.js";
5
5
  export type ManyToManyRecipeDefinition = RecipeDefinition & Readonly<{
6
6
  ingredients: unknown[];
7
7
  results: unknown[];
@@ -12,7 +12,7 @@ export declare class ManyToManyRecipe extends Recipe {
12
12
  constructor(ingredients: Ingredient[], results: Result[]);
13
13
  getIngredients(): Ingredient[];
14
14
  getResults(): Result[];
15
- replace(ingredientReplacer: Replacer<Ingredient>, resultReplacer: Replacer<Result>): ManyToManyRecipe;
15
+ replace(modifier: RecipeModifier): ManyToManyRecipe;
16
16
  serialize(context: RecipeParseContext): Partial<ManyToManyRecipeDefinition>;
17
17
  }
18
18
  export declare class ManyToManyRecipeParser<TDefinition extends ManyToManyRecipeDefinition> extends RecipeParser<TDefinition, ManyToManyRecipe> {
@@ -13,8 +13,8 @@ export class ManyToManyRecipe extends Recipe {
13
13
  getResults() {
14
14
  return this.results;
15
15
  }
16
- replace(ingredientReplacer, resultReplacer) {
17
- return new ManyToManyRecipe(this.ingredients.map(ingredientReplacer), this.results.map(resultReplacer));
16
+ replace(modifier) {
17
+ return new ManyToManyRecipe(this.ingredients.map(modifier.ingredient), this.results.map(modifier.result));
18
18
  }
19
19
  serialize(context) {
20
20
  return {
@@ -1 +1 @@
1
- {"version":3,"file":"manyToMany.js","sourceRoot":"","sources":["../../../src/parser/recipe/manyToMany.ts"],"names":[],"mappings":"AAGA,OAAO,YAAY,EAAE,EACnB,MAAM,GAGP,MAAM,YAAY,CAAC;AAQpB,MAAM,OAAO,gBAAiB,SAAQ,MAAM;IAErB;IACA;IAFrB,YACqB,WAAyB,EACzB,OAAiB;QAEpC,KAAK,EAAE,CAAC;QAHW,gBAAW,GAAX,WAAW,CAAc;QACzB,YAAO,GAAP,OAAO,CAAU;IAGtC,CAAC;IAED,cAAc;QACZ,OAAO,IAAI,CAAC,WAAW,CAAC;IAC1B,CAAC;IAED,UAAU;QACR,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;IAEQ,OAAO,CACd,kBAAwC,EACxC,cAAgC;QAEhC,OAAO,IAAI,gBAAgB,CACzB,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,kBAAkB,CAAC,EACxC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,CACjC,CAAC;IACJ,CAAC;IAEQ,SAAS,CAChB,OAA2B;QAE3B,OAAO;YACL,OAAO,EAAE,OAAO,CAAC,OAAO,CAAC,aAAa,CAAC,IAAI,CAAC,OAAO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pD,WAAW,EAAE,OAAO,CAAC,WAAW,CAAC,aAAa,CAAC,IAAI,CAAC,WAAW,CAAC;SACjE,CAAC;IACJ,CAAC;CACF;AAED,MAAM,OAAO,sBAEX,SAAQ,YAA2C;IACnD,WAAW,CACT,UAAuB,EACvB,OAA2B;QAE3B,MAAM,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC,UAAU,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;QAC3E,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;QAC/D,OAAO,IAAI,gBAAgB,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;IACpD,CAAC;CACF"}
@@ -1,7 +1,7 @@
1
1
  import type { Ingredient } from "../../common/ingredient/index.js";
2
2
  import type { Result } from "../../common/result/index.js";
3
3
  import type { RecipeDefinition } from "../../schema/data/recipe.js";
4
- import RecipeParser, { Recipe, type RecipeParseContext, type Replacer } from "./index.js";
4
+ import RecipeParser, { Recipe, type RecipeModifier, type RecipeParseContext } from "./index.js";
5
5
  export type ManyToOneRecipeDefinition = RecipeDefinition & Readonly<{
6
6
  ingredients: unknown[];
7
7
  result: unknown;
@@ -12,7 +12,7 @@ export declare class ManyToOneRecipe extends Recipe {
12
12
  constructor(ingredients: Ingredient[], result: Result);
13
13
  getIngredients(): Ingredient[];
14
14
  getResults(): Result[];
15
- replace(ingredientReplacer: Replacer<Ingredient>, resultReplacer: Replacer<Result>): ManyToOneRecipe;
15
+ replace(modifier: RecipeModifier): ManyToOneRecipe;
16
16
  serialize(context: RecipeParseContext): Partial<ManyToOneRecipeDefinition>;
17
17
  }
18
18
  export declare class ManyToOneRecipeParser<TDefinition extends ManyToOneRecipeDefinition> extends RecipeParser<TDefinition, ManyToOneRecipe> {
@@ -13,8 +13,8 @@ export class ManyToOneRecipe extends Recipe {
13
13
  getResults() {
14
14
  return [this.result];
15
15
  }
16
- replace(ingredientReplacer, resultReplacer) {
17
- return new ManyToOneRecipe(this.ingredients.map(ingredientReplacer), resultReplacer(this.result));
16
+ replace(modifier) {
17
+ return new ManyToOneRecipe(this.ingredients.map(modifier.ingredient), modifier.result(this.result));
18
18
  }
19
19
  serialize(context) {
20
20
  return {
@@ -1 +1 @@
1
- {"version":3,"file":"manyToOne.js","sourceRoot":"","sources":["../../../src/parser/recipe/manyToOne.ts"],"names":[],"mappings":"AAGA,OAAO,YAAY,EAAE,EACnB,MAAM,GAGP,MAAM,YAAY,CAAC;AAQpB,MAAM,OAAO,eAAgB,SAAQ,MAAM;IAEpB;IACA;IAFrB,YACqB,WAAyB,EACzB,MAAc;QAEjC,KAAK,EAAE,CAAC;QAHW,gBAAW,GAAX,WAAW,CAAc;QACzB,WAAM,GAAN,MAAM,CAAQ;IAGnC,CAAC;IAED,cAAc;QACZ,OAAO,IAAI,CAAC,WAAW,CAAC;IAC1B,CAAC;IAED,UAAU;QACR,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACvB,CAAC;IAEQ,OAAO,CACd,kBAAwC,EACxC,cAAgC;QAEhC,OAAO,IAAI,eAAe,CACxB,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,kBAAkB,CAAC,EACxC,cAAc,CAAC,IAAI,CAAC,MAAM,CAAC,CAC5B,CAAC;IACJ,CAAC;IAEQ,SAAS,CAChB,OAA2B;QAE3B,OAAO;YACL,MAAM,EAAE,OAAO,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC;YAC9C,WAAW,EAAE,OAAO,CAAC,WAAW,CAAC,aAAa,CAAC,IAAI,CAAC,WAAW,CAAC;SACjE,CAAC;IACJ,CAAC;CACF;AAED,MAAM,OAAO,qBAEX,SAAQ,YAA0C;IAClD,WAAW,CACT,UAAuB,EACvB,OAA2B;QAE3B,MAAM,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC,UAAU,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;QAC3E,MAAM,MAAM,GAA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,OAAO,CAAC,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;QACzD,OAAO,IAAI,eAAe,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;IAClD,CAAC;CACF"}
@@ -1,7 +1,7 @@
1
1
  import type { Ingredient } from "../../common/ingredient/index.js";
2
2
  import type { Result } from "../../common/result/index.js";
3
3
  import type { RecipeDefinition } from "../../schema/data/recipe.js";
4
- import RecipeParser, { Recipe, type RecipeParseContext, type Replacer } from "./index.js";
4
+ import RecipeParser, { Recipe, type RecipeModifier, type RecipeParseContext } from "./index.js";
5
5
  export type OneToOneRecipeDefinition = RecipeDefinition & Readonly<{
6
6
  ingredient: unknown;
7
7
  result: unknown;
@@ -12,7 +12,7 @@ export declare class OneToOneRecipe extends Recipe {
12
12
  constructor(ingredient: Ingredient, result: Result);
13
13
  getIngredients(): Ingredient[];
14
14
  getResults(): Result[];
15
- replace(ingredientReplacer: Replacer<Ingredient>, resultReplacer: Replacer<Result>): OneToOneRecipe;
15
+ replace(modifier: RecipeModifier): OneToOneRecipe;
16
16
  serialize(context: RecipeParseContext): Partial<OneToOneRecipeDefinition>;
17
17
  }
18
18
  export declare class OneToOneRecipeParser<TDefinition extends OneToOneRecipeDefinition> extends RecipeParser<TDefinition, OneToOneRecipe> {
@@ -13,8 +13,8 @@ export class OneToOneRecipe extends Recipe {
13
13
  getResults() {
14
14
  return [this.result];
15
15
  }
16
- replace(ingredientReplacer, resultReplacer) {
17
- return new OneToOneRecipe(ingredientReplacer(this.ingredient), resultReplacer(this.result));
16
+ replace(modifier) {
17
+ return new OneToOneRecipe(modifier.ingredient(this.ingredient), modifier.result(this.result));
18
18
  }
19
19
  serialize(context) {
20
20
  return {
@@ -1 +1 @@
1
- {"version":3,"file":"oneToOne.js","sourceRoot":"","sources":["../../../src/parser/recipe/oneToOne.ts"],"names":[],"mappings":"AAGA,OAAO,YAAY,EAAE,EACnB,MAAM,GAGP,MAAM,YAAY,CAAC;AAQpB,MAAM,OAAO,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;IACA;IAFrB,YACqB,UAAsB,EACtB,MAAc;QAEjC,KAAK,EAAE,CAAC;QAHW,eAAU,GAAV,UAAU,CAAY;QACtB,WAAM,GAAN,MAAM,CAAQ;IAGnC,CAAC;IAED,cAAc;QACZ,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IAC3B,CAAC;IAED,UAAU;QACR,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACvB,CAAC;IAEQ,OAAO,CAAC,QAAwB;QACvC,OAAO,IAAI,cAAc,CACvB,QAAQ,CAAC,UAAU,CAAC,IAAI,CAAC,UAAU,CAAC,EACpC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAC7B,CAAC;IACJ,CAAC;IAEQ,SAAS,CAChB,OAA2B;QAE3B,OAAO;YACL,MAAM,EAAE,OAAO,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC;YAC9C,UAAU,EAAE,OAAO,CAAC,WAAW,CAAC,SAAS,CAAC,IAAI,CAAC,UAAU,CAAC;SAC3D,CAAC;IACJ,CAAC;CACF;AAED,MAAM,OAAO,oBAEX,SAAQ,YAAyC;IACjD,WAAW,CACT,UAAuB,EACvB,OAA2B;QAE3B,MAAM,UAAU,GAAG,OAAO,CAAC,WAAW,CAAC,MAAM,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;QACrE,MAAM,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;QACzD,OAAO,IAAI,cAAc,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;IAChD,CAAC;CACF"}
@@ -1,6 +1,6 @@
1
1
  import type { Ingredient } from "../../../common/ingredient/index.js";
2
2
  import type { RecipeDefinition } from "../../../schema/data/recipe.js";
3
- import type { RecipeParseContext, Replacer } from "../index.js";
3
+ import type { RecipeModifier, RecipeParseContext } from "../index.js";
4
4
  import RecipeParser, { Recipe } from "../index.js";
5
5
  export type RootComponentRecipeDefinition = RecipeDefinition & Readonly<{
6
6
  effect: string;
@@ -11,7 +11,7 @@ export declare class RootComponentRecipe extends Recipe {
11
11
  constructor(ingredients: Ingredient[]);
12
12
  getIngredients(): Ingredient[];
13
13
  getResults(): never[];
14
- replace(ingredientReplacer: Replacer<Ingredient>): RootComponentRecipe;
14
+ replace(modifier: RecipeModifier): RootComponentRecipe;
15
15
  serialize(context: RecipeParseContext): Partial<RootComponentRecipeDefinition>;
16
16
  }
17
17
  export declare class RootComponentRecipeParser extends RecipeParser<RootComponentRecipeDefinition, RootComponentRecipe> {
@@ -11,8 +11,8 @@ export class RootComponentRecipe extends Recipe {
11
11
  getResults() {
12
12
  return [];
13
13
  }
14
- replace(ingredientReplacer) {
15
- return new RootComponentRecipe(this.ingredients.map(ingredientReplacer));
14
+ replace(modifier) {
15
+ return new RootComponentRecipe(this.ingredients.map(modifier.ingredient));
16
16
  }
17
17
  serialize(context) {
18
18
  return {
@@ -1 +1 @@
1
- {"version":3,"file":"component.js","sourceRoot":"","sources":["../../../../src/parser/recipe/roots/component.ts"],"names":[],"mappings":"AAGA,OAAO,YAAY,EAAE,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAQnD,MAAM,OAAO,mBAAoB,SAAQ,MAAM;IAChB;IAA7B,YAA6B,WAAyB;QACpD,KAAK,EAAE,CAAC;QADmB,gBAAW,GAAX,WAAW,CAAc;IAEtD,CAAC;IAED,cAAc;QACZ,OAAO,IAAI,CAAC,WAAW,CAAC;IAC1B,CAAC;IAED,UAAU;QACR,OAAO,EAAE,CAAC;IACZ,CAAC;IAEQ,OAAO,CAAC,kBAAwC;QACvD,OAAO,IAAI,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC,CAAC;IAC3E,CAAC;IAEQ,SAAS,CAChB,OAA2B;QAE3B,OAAO;YACL,WAAW,EAAE,OAAO,CAAC,WAAW,CAAC,aAAa,CAAC,IAAI,CAAC,WAAW,CAAC;SACjE,CAAC;IACJ,CAAC;CACF;AAED,MAAM,OAAO,yBAA0B,SAAQ,YAG9C;IACC,WAAW,CACT,UAAyC,EACzC,OAA2B;QAE3B,MAAM,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC,UAAU,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;QAC3E,OAAO,IAAI,mBAAmB,CAAC,WAAW,CAAC,CAAC;IAC9C,CAAC;CACF"}
1
+ {"version":3,"file":"component.js","sourceRoot":"","sources":["../../../../src/parser/recipe/roots/component.ts"],"names":[],"mappings":"AAGA,OAAO,YAAY,EAAE,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAQnD,MAAM,OAAO,mBAAoB,SAAQ,MAAM;IAChB;IAA7B,YAA6B,WAAyB;QACpD,KAAK,EAAE,CAAC;QADmB,gBAAW,GAAX,WAAW,CAAc;IAEtD,CAAC;IAED,cAAc;QACZ,OAAO,IAAI,CAAC,WAAW,CAAC;IAC1B,CAAC;IAED,UAAU;QACR,OAAO,EAAE,CAAC;IACZ,CAAC;IAEQ,OAAO,CAAC,QAAwB;QACvC,OAAO,IAAI,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC,CAAC;IAC5E,CAAC;IAEQ,SAAS,CAChB,OAA2B;QAE3B,OAAO;YACL,WAAW,EAAE,OAAO,CAAC,WAAW,CAAC,aAAa,CAAC,IAAI,CAAC,WAAW,CAAC;SACjE,CAAC;IACJ,CAAC;CACF;AAED,MAAM,OAAO,yBAA0B,SAAQ,YAG9C;IACC,WAAW,CACT,UAAyC,EACzC,OAA2B;QAE3B,MAAM,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC,UAAU,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;QAC3E,OAAO,IAAI,mBAAmB,CAAC,WAAW,CAAC,CAAC;IAC9C,CAAC;CACF"}
@@ -1,6 +1,6 @@
1
1
  import type { Ingredient } from "../../../common/ingredient/index.js";
2
2
  import type { Result } from "../../../common/result/index.js";
3
- import type { RecipeParseContext, Replacer } from "../index.js";
3
+ import type { RecipeModifier, RecipeParseContext } from "../index.js";
4
4
  import RecipeParser from "../index.js";
5
5
  import { ManyToOneRecipe, type ManyToOneRecipeDefinition } from "../manyToOne.js";
6
6
  export type RootRitualRecipeDefinition = ManyToOneRecipeDefinition & Readonly<{
@@ -13,7 +13,7 @@ export declare class RootRitualRecipe extends ManyToOneRecipe {
13
13
  private readonly incenses;
14
14
  constructor(ingredients: Ingredient[], result: Result, incenses?: Ingredient[]);
15
15
  getIngredients(): Ingredient[];
16
- replace(ingredientReplacer: Replacer<Ingredient>, resultReplacer: Replacer<Result>): RootRitualRecipe;
16
+ replace(modifier: RecipeModifier): RootRitualRecipe;
17
17
  }
18
18
  export declare class RootRitualRecipeParser extends RecipeParser<RootRitualRecipeDefinition, RootRitualRecipe> {
19
19
  deserialize(definition: RootRitualRecipeDefinition, context: RecipeParseContext): RootRitualRecipe;
@@ -9,8 +9,8 @@ export class RootRitualRecipe extends ManyToOneRecipe {
9
9
  getIngredients() {
10
10
  return [...super.getIngredients(), ...this.incenses];
11
11
  }
12
- replace(ingredientReplacer, resultReplacer) {
13
- return new RootRitualRecipe(this.incenses.map(ingredientReplacer), resultReplacer(this.result), this.incenses.map(ingredientReplacer));
12
+ replace(modifier) {
13
+ return new RootRitualRecipe(this.incenses.map(modifier.ingredient), modifier.result(this.result), this.incenses.map(modifier.ingredient));
14
14
  }
15
15
  }
16
16
  export class RootRitualRecipeParser extends RecipeParser {
@@ -1 +1 @@
1
- {"version":3,"file":"ritual.js","sourceRoot":"","sources":["../../../../src/parser/recipe/roots/ritual.ts"],"names":[],"mappings":"AAGA,OAAO,YAAY,MAAM,aAAa,CAAC;AACvC,OAAO,EACL,eAAe,GAEhB,MAAM,iBAAiB,CAAC;AAUzB,MAAM,OAAO,gBAAiB,SAAQ,eAAe;IAIhC;IAHnB,YACE,WAAyB,EACzB,M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E5C,KAAK,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;QAFV,aAAQ,GAAR,QAAQ,CAAmB;IAG9C,CAAC;IAEQ,cAAc;QACrB,OAAO,CAAC,GAAG,KAAK,CAAC,cAAc,EAAE,EAAE,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC;IACvD,CAAC;IAEQ,OAAO,CAAC,QAAwB;QACvC,OAAO,IAAI,gBAAgB,CACzB,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,QAAQ,CAAC,UAAU,CAAC,EACtC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,EAC5B,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,QAAQ,CAAC,UAAU,CAAC,CACvC,CAAC;IACJ,CAAC;CACF;AAED,MAAM,OAAO,sBAAuB,SAAQ,YAG3C;IACC,WAAW,CACT,UAAsC,EACtC,OAA2B;QAE3B,MAAM,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC,UAAU,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;QAC3E,MAAM,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;QACzD,MAAM,QAAQ,GACZ,UAAU,CAAC,QAAQ;YACnB,OAAO,CAAC,WAAW,CAAC,UAAU,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;QACtD,OAAO,IAAI,gBAAgB,CAAC,WAAW,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC;IAC7D,CAAC;CACF"}
@@ -1,6 +1,6 @@
1
1
  import type { Ingredient } from "../../../common/ingredient/index.js";
2
2
  import type { RecipeDefinition } from "../../../schema/data/recipe.js";
3
- import type { RecipeParseContext, Replacer } from "../index.js";
3
+ import type { RecipeModifier, RecipeParseContext } from "../index.js";
4
4
  import RecipeParser, { Recipe } from "../index.js";
5
5
  export type ThermalCatalystRecipeDefinition = RecipeDefinition & Readonly<{
6
6
  ingredient: unknown;
@@ -15,7 +15,7 @@ export declare class ThermalCatalystRecipe extends Recipe {
15
15
  constructor(ingredient: Ingredient);
16
16
  getIngredients(): Ingredient[];
17
17
  getResults(): never[];
18
- replace(ingredientReplacer: Replacer<Ingredient>): Recipe;
18
+ replace(modifier: RecipeModifier): ThermalCatalystRecipe;
19
19
  serialize(context: RecipeParseContext): Partial<ThermalCatalystRecipeDefinition>;
20
20
  }
21
21
  export declare class ThermalCatalystRecipeParser extends RecipeParser<ThermalCatalystRecipeDefinition, ThermalCatalystRecipe> {
@@ -11,8 +11,8 @@ export class ThermalCatalystRecipe extends Recipe {
11
11
  getResults() {
12
12
  return [];
13
13
  }
14
- replace(ingredientReplacer) {
15
- return new ThermalCatalystRecipe(ingredientReplacer(this.ingredient));
14
+ replace(modifier) {
15
+ return new ThermalCatalystRecipe(modifier.ingredient(this.ingredient));
16
16
  }
17
17
  serialize(context) {
18
18
  return {
@@ -1 +1 @@
1
- {"version":3,"file":"catalyst.js","sourceRoot":"","sources":["../../../../src/parser/recipe/thermal/catalyst.ts"],"names":[],"mappings":"AAGA,OAAO,YAAY,EAAE,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAYnD,MAAM,OAAO,qBAAsB,SAAQ,MAAM;IAClB;IAA7B,YAA6B,UAAsB;QACjD,KAAK,EAAE,CAAC;QADmB,eAAU,GAAV,UAAU,CAAY;IAEnD,CAAC;IAED,cAAc;QACZ,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IAC3B,CAAC;IAED,UAAU;QACR,OAAO,EAAE,CAAC;IACZ,CAAC;IAEQ,OAAO,CAAC,kBAAwC;QACvD,OAAO,IAAI,qBAAqB,CAAC,kBAAkB,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC;IACxE,CAAC;IAEQ,SAAS,CAChB,OAA2B;QAE3B,OAAO;YACL,UAAU,EAAE,OAAO,CAAC,WAAW,CAAC,SAAS,CAAC,IAAI,CAAC,UAAU,CAAC;SAC3D,CAAC;IACJ,CAAC;CACF;AAED,MAAM,OAAO,2BAA4B,SAAQ,YAGhD;IACC,WAAW,CACT,UAA2C,EAC3C,OAA2B;QAE3B,MAAM,UAAU,GAAG,OAAO,CAAC,WAAW,CAAC,MAAM,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;QACrE,OAAO,IAAI,qBAAqB,CAAC,UAAU,CAAC,CAAC;IAC/C,CAAC;CACF"}
1
+ {"version":3,"file":"catalyst.js","sourceRoot":"","sources":["../../../../src/parser/recipe/thermal/catalyst.ts"],"names":[],"mappings":"AAGA,OAAO,YAAY,EAAE,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAYnD,MAAM,OAAO,qBAAsB,SAAQ,MAAM;IAClB;IAA7B,YAA6B,UAAsB;QACjD,KAAK,EAAE,CAAC;QADmB,eAAU,GAAV,UAAU,CAAY;IAEnD,CAAC;IAED,cAAc;QACZ,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IAC3B,CAAC;IAED,UAAU;QACR,OAAO,EAAE,CAAC;IACZ,CAAC;IAEQ,OAAO,CAAC,QAAwB;QACvC,OAAO,IAAI,qBAAqB,CAAC,QAAQ,CAAC,UAAU,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC;IACzE,CAAC;IAEQ,SAAS,CAChB,OAA2B;QAE3B,OAAO;YACL,UAAU,EAAE,OAAO,CAAC,WAAW,CAAC,SAAS,CAAC,IAAI,CAAC,UAAU,CAAC;SAC3D,CAAC;IACJ,CAAC;CACF;AAED,MAAM,OAAO,2BAA4B,SAAQ,YAGhD;IACC,WAAW,CACT,UAA2C,EAC3C,OAA2B;QAE3B,MAAM,UAAU,GAAG,OAAO,CAAC,WAAW,CAAC,MAAM,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;QACrE,OAAO,IAAI,qBAAqB,CAAC,UAAU,CAAC,CAAC;IAC/C,CAAC;CACF"}
@@ -1,6 +1,6 @@
1
1
  import type { Ingredient } from "../../../common/ingredient/index.js";
2
2
  import type { RecipeDefinition } from "../../../schema/data/recipe.js";
3
- import type { RecipeParseContext, Replacer } from "../index.js";
3
+ import type { RecipeModifier, RecipeParseContext } from "../index.js";
4
4
  import RecipeParser, { Recipe } from "../index.js";
5
5
  export type ThermalFuelRecipeDefinition = RecipeDefinition & Readonly<{
6
6
  energy: number;
@@ -11,7 +11,7 @@ export declare class ThermalFuelRecipe extends Recipe {
11
11
  constructor(ingredient: Ingredient);
12
12
  getIngredients(): Ingredient[];
13
13
  getResults(): never[];
14
- replace(ingredientReplacer: Replacer<Ingredient>): Recipe;
14
+ replace(modifier: RecipeModifier): ThermalFuelRecipe;
15
15
  serialize(context: RecipeParseContext): Partial<ThermalFuelRecipeDefinition>;
16
16
  }
17
17
  export declare class ThermalFuelRecipeParser extends RecipeParser<ThermalFuelRecipeDefinition, ThermalFuelRecipe> {
@@ -12,8 +12,8 @@ export class ThermalFuelRecipe extends Recipe {
12
12
  getResults() {
13
13
  return [];
14
14
  }
15
- replace(ingredientReplacer) {
16
- return new ThermalFuelRecipe(ingredientReplacer(this.ingredient));
15
+ replace(modifier) {
16
+ return new ThermalFuelRecipe(modifier.ingredient(this.ingredient));
17
17
  }
18
18
  serialize(context) {
19
19
  return {
@@ -1 +1 @@
1
- {"version":3,"file":"fuel.js","sourceRoot":"","sources":["../../../../src/parser/recipe/thermal/fuel.ts"],"names":[],"mappings":"AAGA,OAAO,YAAY,EAAE,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAQnD,iCAAiC;AACjC,MAAM,OAAO,iBAAkB,SAAQ,MAAM;IACd;IAA7B,YAA6B,UAAsB;QACjD,KAAK,EAAE,CAAC;QADmB,eAAU,GAAV,UAAU,CAAY;IAEnD,CAAC;IAED,cAAc;QACZ,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IAC3B,CAAC;IAED,UAAU;QACR,OAAO,EAAE,CAAC;IACZ,CAAC;IAEQ,OAAO,CAAC,kBAAwC;QACvD,OAAO,IAAI,iBAAiB,CAA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U,GAAG,OAAO,CAAC,WAAW,CAAC,MAAM,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;QACrE,OAAO,IAAI,iBAAiB,CAAC,UAAU,CAAC,CAAC;IAC3C,CAAC;CACF"}
@@ -1,7 +1,7 @@
1
1
  import type { Ingredient } from "../../../common/ingredient/index.js";
2
2
  import type { Result } from "../../../common/result/index.js";
3
3
  import type { RecipeDefinition } from "../../../schema/data/recipe.js";
4
- import type { RecipeParseContext, Replacer } from "../index.js";
4
+ import type { RecipeModifier, RecipeParseContext } from "../index.js";
5
5
  import RecipeParser, { Recipe } from "../index.js";
6
6
  export type ThermalRecipeDefinition = RecipeDefinition & Readonly<{
7
7
  ingredient?: unknown;
@@ -16,7 +16,7 @@ export declare class ThermalRecipe extends Recipe {
16
16
  constructor(ingredients: Ingredient[], results: Result[]);
17
17
  getIngredients(): Ingredient[];
18
18
  getResults(): Result[];
19
- replace(ingredientReplacer: Replacer<Ingredient>, resultReplacer: Replacer<Result>): Recipe;
19
+ replace(modifier: RecipeModifier): ThermalRecipe;
20
20
  serialize(context: RecipeParseContext): Partial<ThermalRecipeDefinition>;
21
21
  }
22
22
  export declare class ThermalRecipeParser extends RecipeParser<ThermalRecipeDefinition, ThermalRecipe> {
@@ -14,8 +14,8 @@ export class ThermalRecipe extends Recipe {
14
14
  getResults() {
15
15
  return this.results;
16
16
  }
17
- replace(ingredientReplacer, resultReplacer) {
18
- return new ThermalRecipe(this.ingredients.map(ingredientReplacer), this.results.map(resultReplacer));
17
+ replace(modifier) {
18
+ return new ThermalRecipe(this.ingredients.map(modifier.ingredient), this.results.map(modifier.result));
19
19
  }
20
20
  serialize(context) {
21
21
  const serialized = {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/parser/recipe/thermal/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAGtD,OAAO,YAAY,EAAE,EAAE,MAAM,EAAE,MA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AO,CAAC,CAAC;IACjD,CAAC;CACF"}
@@ -2,7 +2,7 @@ import type { BlockId } from "@adeficior/data-modifier/generated";
2
2
  import { type Ingredient } from "../../../common/ingredient/index.js";
3
3
  import type { Result } from "../../../common/result/index.js";
4
4
  import type { RecipeDefinition } from "../../../schema/data/recipe.js";
5
- import RecipeParser, { Recipe, type RecipeParseContext, type Replacer } from "../index.js";
5
+ import RecipeParser, { Recipe, type RecipeModifier, type RecipeParseContext } from "../index.js";
6
6
  export type TreeExtractionRecipeDefinition = RecipeDefinition & Readonly<{
7
7
  leaves: BlockId;
8
8
  trunk: BlockId;
@@ -15,7 +15,7 @@ export declare class TreeExtractionRecipe extends Recipe {
15
15
  constructor(trunk: Ingredient, leaves: Ingredient, result: Result);
16
16
  getIngredients(): Ingredient[];
17
17
  getResults(): Result[];
18
- replace(ingredientReplacer: Replacer<Ingredient>, resultReplacer: Replacer<Result>): TreeExtractionRecipe;
18
+ replace(modifier: RecipeModifier): TreeExtractionRecipe;
19
19
  private serializeBlockIngredient;
20
20
  serialize(context: RecipeParseContext): Partial<TreeExtractionRecipeDefinition>;
21
21
  }
@@ -18,8 +18,8 @@ export class TreeExtractionRecipe extends Recipe {
18
18
  getResults() {
19
19
  return [this.result];
20
20
  }
21
- replace(ingredientReplacer, resultReplacer) {
22
- return new TreeExtractionRecipe(ingredientReplacer(this.trunk), ingredientReplacer(this.leaves), resultReplacer(this.result));
21
+ replace(modifier) {
22
+ return new TreeExtractionRecipe(modifier.ingredient(this.trunk), modifier.ingredient(this.leaves), modifier.result(this.result));
23
23
  }
24
24
  serializeBlockIngredient(ingredient) {
25
25
  if (ingredient instanceof BlockIngredient) {
@@ -1 +1 @@
1
- {"version":3,"file":"treeExtraction.js","sourceRoot":"","sources":["../../../../src/parser/recipe/thermal/treeExtraction.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EACL,eAAe,GAEhB,MAAM,qCAAqC,CA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AC;CACF;AAED,MAAM,OAAO,0BAA2B,SAAQ,YAG/C;IACC,WAAW,CACT,UAA0C,EAC1C,OAA2B;QAE3B,MAAM,KAAK,GAAG,OAAO,CAAC,WAAW,CAAC,MAAM,CACtC,IAAI,eAAe,CAAC,UAAU,CAAC,KAAK,CAAC,CACtC,CAAC;QACF,MAAM,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,MAAM,CACvC,IAAI,eAAe,CAAC,UAAU,CAAC,MAAM,CAAC,CACvC,CAAC;QACF,MAAM,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;QACzD,OAAO,IAAI,oBAAoB,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IACzD,CAAC;CACF"}
1
+ {"version":3,"file":"treeExtraction.js","sourceRoot":"","sources":["../../../../src/parser/recipe/thermal/treeExtraction.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EACL,eAAe,GAEhB,MAAM,qCAAqC,CAAC;AAE7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAEtD,OAAO,YAAY,EAAE,EACnB,MAAM,GAGP,MAAM,aAAa,CAAC;AASrB,MAAM,OAAO,oBAAqB,SAAQ,MAAM;IAE3B;IACA;IACA;IAHnB,YACmB,KAAiB,EACjB,MAAkB,EAClB,MAAc;QAE/B,KAAK,EAAE,CAAC;QAJS,UAAK,GAAL,KAAK,CAAY;QACjB,WAAM,GAAN,MAAM,CAAY;QAClB,WAAM,GAAN,MAAM,CAAQ;IAGjC,CAAC;IAED,cAAc;QACZ,OAAO,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;IACnC,CAAC;IAED,UAAU;QACR,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACvB,CAAC;IAEQ,OAAO,CAAC,QAAwB;QACvC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ient } from "../../../common/ingredient/index.js";
2
1
  import type { Result } from "../../../common/result/index.js";
3
2
  import type { RecipeDefinition } from "../../../schema/data/recipe.js";
4
- import type { RecipeParseContext, Replacer } from "../index.js";
3
+ import type { RecipeModifier, RecipeParseContext } from "../index.js";
5
4
  import RecipeParser, { Recipe } from "../index.js";
6
5
  import type { IngredientMap, IngredientMapInput } from "../ingredientMap.js";
7
6
  export type ShapedRecipeDefinition = RecipeDefinition & Readonly<{
@@ -13,9 +12,9 @@ export declare class ShapedRecipe extends Recipe {
13
12
  private readonly ingredients;
14
13
  private readonly result;
15
14
  constructor(ingredients: IngredientMap, result: Result);
16
- getIngredients(): Ingredient[];
15
+ getIngredients(): import("../../../common/ingredient/index.js").Ingredient[];
17
16
  getResults(): Result[];
18
- replace(ingredientReplacer: Replacer<Ingredient>, resultReplacer: Replacer<Result>): ShapedRecipe;
17
+ replace(modifier: RecipeModifier): ShapedRecipe;
19
18
  serialize(context: RecipeParseContext): Partial<ShapedRecipeDefinition>;
20
19
  }
21
20
  export declare class ShapedParser extends RecipeParser<ShapedRecipeDefinition, ShapedRecipe> {
@@ -13,8 +13,8 @@ export class ShapedRecipe extends Recipe {
13
13
  getResults() {
14
14
  return [this.result];
15
15
  }
16
- replace(ingredientReplacer, resultReplacer) {
17
- return new ShapedRecipe(this.ingredients.replace(ingredientReplacer), resultReplacer(this.result));
16
+ replace(modifier) {
17
+ return new ShapedRecipe(this.ingredients.replace(modifier.ingredient), modifier.result(this.result));
18
18
  }
19
19
  serialize(context) {
20
20
  return {
@@ -1 +1 @@
1
- {"version":3,"file":"shaped.js","sourceRoot":"","sources":["../../../../src/parser/recipe/vanilla/shaped.ts"],"names":[],"mappings":"AAIA,OAAO,YAAY,EAAE,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAUnD,MAAM,OAAO,YAAa,SAAQ,MAAM;IAEnB;IACA;IAFnB,YACmB,WAA0B,EAC1B,MAAc;QAE/B,KAAK,EAAE,CAAC;QAHS,gBAAW,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QAC1B,WAAM,GAAN,MAAM,CAAQ;IAGjC,CAAC;IAED,cAAc;QACZ,OAAO,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,CAAC;IACjC,CAAC;IAED,UAAU;QACR,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACvB,CAAC;IAEQ,OAAO,CAAC,QAAwB;QACvC,OAAO,IAAI,YAAY,CACrB,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAC,EAC7C,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAC7B,CAAC;IACJ,CAAC;IAEQ,SAAS,CAChB,OAA2B;QAE3B,OAAO;YACL,GAAG,EAAE,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,OAAO,CAAC;YACxC,MAAM,EAAE,OAAO,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC;SAC/C,CAAC;IACJ,CAAC;CACF;AAED,MAAM,OAAO,YAAa,SAAQ,YAGjC;IACC,WAAW,CACT,UAAkC,EAClC,OAA2B;QAE3B,MAAM,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC,aAAa,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;QACtE,MAAM,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;QACzD,OAAO,IAAI,YAAY,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;IAC/C,CAAC;CACF"}
@@ -1,7 +1,7 @@
1
1
  import type { Ingredient } from "../../../common/ingredient/index.js";
2
2
  import type { Result } from "../../../common/result/index.js";
3
3
  import type { RecipeDefinition } from "../../../schema/data/recipe.js";
4
- import type { RecipeParseContext, Replacer } from "../index.js";
4
+ import type { RecipeModifier, RecipeParseContext } from "../index.js";
5
5
  import RecipeParser, { Recipe } from "../index.js";
6
6
  export type SmeltingRecipeDefinition = RecipeDefinition & Readonly<{
7
7
  ingredient: unknown;
@@ -14,7 +14,7 @@ export declare class SmeltingRecipe extends Recipe {
14
14
  constructor(ingredient: Ingredient, result: Result);
15
15
  getIngredients(): Ingredient[];
16
16
  getResults(): Result[];
17
- replace(ingredientReplacer: Replacer<Ingredient>, resultReplacer: Replacer<Result>): SmeltingRecipe;
17
+ replace(modifier: RecipeModifier): SmeltingRecipe;
18
18
  serialize(context: RecipeParseContext): Partial<SmeltingRecipeDefinition>;
19
19
  }
20
20
  export declare class SmeltingParser extends RecipeParser<SmeltingRecipeDefinition, SmeltingRecipe> {
@@ -13,8 +13,8 @@ export class SmeltingRecipe extends Recipe {
13
13
  getResults() {
14
14
  return [this.result];
15
15
  }
16
- replace(ingredientReplacer, resultReplacer) {
17
- return new SmeltingRecipe(ingredientReplacer(this.ingredient), resultReplacer(this.result));
16
+ replace(modifier) {
17
+ return new SmeltingRecipe(modifier.ingredient(this.ingredient), modifier.result(this.result));
18
18
  }
19
19
  serialize(context) {
20
20
  return {
@@ -1 +1 @@
1
- {"version":3,"file":"smelting.js","sourceRoot":"","sources":["../../../../src/parser/recipe/vanilla/smelting.ts"],"names":[],"mappings":"AAIA,OAAO,YAAY,EAAE,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AASnD,MAAM,OAAO,cAAe,SAAQ,MAAM;IAErB;IACA;IAFnB,YACmB,UAAsB,EACtB,MAAc;QAE/B,KAAK,EAAE,CAAC;QAHS,eAAU,GAAV,UAAU,CAAY;QACtB,WAAM,GAAN,MAAM,CAAQ;IAGjC,CAAC;IAED,cAAc;QACZ,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IAC3B,CAAC;IAED,UAAU;QACR,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACvB,CAAC;IAEQ,OAAO,CACd,kBAAwC,EACxC,cAAgC;QAEhC,OAAO,IAAI,cAAc,CACvB,kBAAkB,CAAC,IAAI,CAAC,UAAU,CAAC,EACnC,cAAc,CAAC,IAAI,CAAC,MAAM,CAAC,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,CAAC;IAEQ,SAAS,CAChB,OAA2B;QAE3B,OAAO;YACL,UAAU,EAAE,OAAO,CAAC,WAAW,CAAC,SAAS,CAAC,IAAI,CAAC,UAAU,CAAC;YAC1D,MAAM,EAAE,OAAO,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC;SAC/C,CAAC;IACJ,CAAC;CACF;AAED,MAAM,OAAO,cAAe,SAAQ,YAGnC;IACC,WAAW,CACT,UAAoC,EACpC,OAA2B;QAE3B,MAAM,UAAU,GAAG,OAAO,CAAC,WAAW,CAAC,MAAM,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;QACrE,MAAM,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;QACzD,OAAO,IAAI,cAAc,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;IAChD,CAAC;CACF"}
@@ -1,7 +1,7 @@
1
1
  import type { Ingredient } from "../../../common/ingredient/index.js";
2
2
  import type { Result } from "../../../common/result/index.js";
3
3
  import type { RecipeDefinition } from "../../../schema/data/recipe.js";
4
- import type { RecipeParseContext, Replacer } from "../index.js";
4
+ import type { RecipeModifier, RecipeParseContext } from "../index.js";
5
5
  import RecipeParser, { Recipe } from "../index.js";
6
6
  export type SmithingRecipeDefinition = RecipeDefinition & Readonly<{
7
7
  base: unknown;
@@ -15,7 +15,7 @@ export declare class SmithingRecipe extends Recipe {
15
15
  constructor(base: Ingredient, addition: Ingredient, result: Result);
16
16
  getIngredients(): Ingredient[];
17
17
  getResults(): Result[];
18
- replace(ingredientReplacer: Replacer<Ingredient>, resultReplacer: Replacer<Result>): SmithingRecipe;
18
+ replace(modifier: RecipeModifier): SmithingRecipe;
19
19
  serialize(context: RecipeParseContext): Partial<SmithingRecipeDefinition>;
20
20
  }
21
21
  export declare class SmithingParser extends RecipeParser<SmithingRecipeDefinition, SmithingRecipe> {
@@ -15,8 +15,8 @@ export class SmithingRecipe extends Recipe {
15
15
  getResults() {
16
16
  return [this.result];
17
17
  }
18
- replace(ingredientReplacer, resultReplacer) {
19
- return new SmithingRecipe(ingredientReplacer(this.base), ingredientReplacer(this.addition), resultReplacer(this.result));
18
+ replace(modifier) {
19
+ return new SmithingRecipe(modifier.ingredient(this.base), modifier.ingredient(this.addition), modifier.result(this.result));
20
20
  }
21
21
  serialize(context) {
22
22
  return {
@@ -1 +1 @@
1
- {"version":3,"file":"smithing.js","sourceRoot":"","sources":["../../../../src/parser/recipe/vanilla/smithing.ts"],"names":[],"mappings":"AAIA,OAAO,YAAY,EAAE,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AASnD,MAAM,OAAO,cAAe,SAAQ,MAAM;IAErB;IACA;IACA;IAHnB,YACmB,IAAgB,EAChB,QAAoB,EACpB,MAAc;QAE/B,KAAK,EAAE,CAAC;QAJS,SAAI,GAAJ,IAAI,CAAY;QAChB,aAAQ,GAAR,QAAQ,CAAY;QACpB,WAAM,GAAN,MAAM,CAAQ;IAGjC,CAAC;IAED,cAAc;QACZ,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;IACpC,CAAC;IAED,UAAU;QACR,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACvB,CAAC;IAEQ,OAAO,CACd,kBAAwC,EACxC,cAAgC;QAEhC,OAAO,IAAI,cAAc,CACvB,kBAAkB,CAAC,IAAI,CAAC,IAAI,CAAC,EAC7B,kBAAkB,CAAC,IAAI,CAAC,QAAQ,CAAC,EACjC,cAAc,CAAC,IAAI,CAAC,MAAM,CAAC,CAC5B,CAAC;IACJ,CAAC;IAEQ,SAAS,CAChB,OAA2B;QAE3B,OAAO;YACL,IAAI,EAAE,OAAO,CAAC,WAAW,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC;YAC9C,QAAQ,EAAE,OAAO,CAAC,WAAW,CAAC,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC;YACtD,MAA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QAAQ,CAAC,EAClC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAC7B,CAAC;IACJ,CAAC;IAEQ,SAAS,CAChB,OAA2B;QAE3B,OAAO;YACL,IAAI,EAAE,OAAO,CAAC,WAAW,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC;YAC9C,QAAQ,EAAE,OAAO,CAAC,WAAW,CAAC,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC;YACtD,MAAM,EAAE,OAAO,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC;SAC/C,CAAC;IACJ,CAAC;CACF;AAED,MAAM,OAAO,cAAe,SAAQ,YAGnC;IACC,WAAW,CACT,UAAoC,EACpC,OAA2B;QAE3B,MAAM,IAAI,GAAG,OAAO,CAAC,WAAW,CAAC,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;QACzD,MAAM,QAAQ,GAAG,OAAO,CAAC,WAAW,CAAC,MAAM,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;QACjE,MAAM,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;QACzD,OAAO,IAAI,cAAc,CAAC,IAAI,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;IACpD,CAAC;CACF"}
@@ -1,7 +1,7 @@
1
1
  import type { Ingredient } from "../../../common/ingredient/index.js";
2
2
  import type { Result } from "../../../common/result/index.js";
3
3
  import type { RecipeDefinition } from "../../../schema/data/recipe.js";
4
- import type { RecipeParseContext, Replacer } from "../index.js";
4
+ import type { RecipeModifier, RecipeParseContext } from "../index.js";
5
5
  import RecipeParser, { Recipe } from "../index.js";
6
6
  export type StonecuttingRecipeDefinition = RecipeDefinition & Readonly<{
7
7
  ingredient: unknown;
@@ -14,7 +14,7 @@ export declare class StonecuttingRecipe extends Recipe {
14
14
  constructor(ingredient: Ingredient, result: Result);
15
15
  getIngredients(): Ingredient[];
16
16
  getResults(): Result[];
17
- replace(ingredientReplacer: Replacer<Ingredient>, resultReplacer: Replacer<Result>): StonecuttingRecipe;
17
+ replace(modifier: RecipeModifier): StonecuttingRecipe;
18
18
  serialize(context: RecipeParseContext): Partial<StonecuttingRecipeDefinition>;
19
19
  }
20
20
  export declare class StonecuttingParser extends RecipeParser<StonecuttingRecipeDefinition, StonecuttingRecipe> {
@@ -14,8 +14,8 @@ export class StonecuttingRecipe extends Recipe {
14
14
  getResults() {
15
15
  return [this.result];
16
16
  }
17
- replace(ingredientReplacer, resultReplacer) {
18
- return new StonecuttingRecipe(ingredientReplacer(this.ingredient), resultReplacer(this.result));
17
+ replace(modifier) {
18
+ return new StonecuttingRecipe(modifier.ingredient(this.ingredient), modifier.result(this.result));
19
19
  }
20
20
  serialize(context) {
21
21
  return {
@@ -1 +1 @@
1
- {"version":3,"file":"stonecutting.js","sourceRoot":"","sources":["../../../../src/parser/recipe/vanilla/stonecutting.ts"],"names":[],"mappings":"AAIA,OAAO,YAAY,EAAE,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AASnD,qCAAqC;AACrC,MAAM,OAAO,kBAAmB,SAAQ,MAAM;IAEzB;IACA;IAFnB,YACmB,UAAsB,EACtB,MAAc;QAE/B,KAAK,EAAE,CAAC;QAHS,eAAU,GAAV,UAAU,CAAY;QACtB,WAAM,GAAN,MAAM,CAAQ;IAGjC,CAAC;IAED,cAAc;QACZ,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IAC3B,CAAC;IAED,UAAU;QACR,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACvB,CAAC;IAEQ,OAAO,CACd,kBAAwC,EACxC,cAAgC;QAEhC,OAAO,IAAI,kBAAkB,CAC3B,kBAAkB,CAAC,IAAI,CAAC,UAAU,CAAC,EACnC,cAAc,CAAC,IAAI,CAAC,MAAM,CAAC,CAC5B,CAAC;IACJ,CAAC;IAEQ,SAAS,CAChB,OAA2B;QAE3B,O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2B;QAE3B,OAAO;YACL,UAAU,EAAE,OAAO,CAAC,WAAW,CAAC,SAAS,CAAC,IAAI,CAAC,UAAU,CAAC;YAC1D,MAAM,EAAE,OAAO,CAAC,WAAW,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC;SACnD,CAAC;IACJ,CAAC;CACF;AAED,MAAM,OAAO,kBAAmB,SAAQ,YAGvC;IACC,WAAW,CACT,UAAwC,EACxC,OAA2B;QAE3B,MAAM,UAAU,GAAG,OAAO,CAAC,WAAW,CAAC,MAAM,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;QACrE,MAAM,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;QACzD,OAAO,IAAI,kBAAkB,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;IACpD,CAAC;CACF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adeficior/data-modifier",
3
- "version": "1.0.0-rc.14",
3
+ "version": "1.0.0-rc.15",
4
4
  "description": "Data Modifier",
5
5
  "main": "dist/index.js",
6
6
  "bin": {