@adeficior/data-modifier 1.0.0-rc.13 → 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.
- package/dist/emit/data/recipe.d.ts +6 -5
- package/dist/emit/data/recipe.js +16 -8
- package/dist/emit/data/recipe.js.map +1 -1
- package/dist/emit/rule/recipe.d.ts +4 -4
- package/dist/emit/rule/recipe.js.map +1 -1
- package/dist/loader/recipe.d.ts +3 -3
- package/dist/loader/recipe.js +4 -5
- package/dist/loader/recipe.js.map +1 -1
- package/dist/parser/index.d.ts +1 -1
- package/dist/parser/index.js +1 -1
- package/dist/parser/index.js.map +1 -1
- package/dist/parser/recipe/adAstra/conversion.d.ts +3 -3
- package/dist/parser/recipe/adAstra/conversion.js +5 -5
- package/dist/parser/recipe/adAstra/conversion.js.map +1 -1
- package/dist/parser/recipe/adAstra/inputOutput.d.ts +4 -4
- package/dist/parser/recipe/adAstra/inputOutput.js +5 -5
- package/dist/parser/recipe/adAstra/inputOutput.js.map +1 -1
- package/dist/parser/recipe/adAstra/spaceStation.d.ts +3 -3
- package/dist/parser/recipe/adAstra/spaceStation.js +5 -5
- package/dist/parser/recipe/adAstra/spaceStation.js.map +1 -1
- package/dist/parser/recipe/botania/apothecary.d.ts +3 -3
- package/dist/parser/recipe/botania/apothecary.js +5 -5
- package/dist/parser/recipe/botania/apothecary.js.map +1 -1
- package/dist/parser/recipe/botania/blocks.js +1 -1
- package/dist/parser/recipe/botania/blocks.js.map +1 -1
- package/dist/parser/recipe/botania/brew.d.ts +3 -3
- package/dist/parser/recipe/botania/brew.js +5 -5
- package/dist/parser/recipe/botania/brew.js.map +1 -1
- package/dist/parser/recipe/botania/elvenTrade.js +1 -1
- package/dist/parser/recipe/botania/elvenTrade.js.map +1 -1
- package/dist/parser/recipe/botania/gogWrapper.d.ts +5 -7
- package/dist/parser/recipe/botania/gogWrapper.js +5 -5
- package/dist/parser/recipe/botania/gogWrapper.js.map +1 -1
- package/dist/parser/recipe/botania/manaInfusion.d.ts +3 -3
- package/dist/parser/recipe/botania/manaInfusion.js +5 -5
- package/dist/parser/recipe/botania/manaInfusion.js.map +1 -1
- package/dist/parser/recipe/botania/nbtWrapper.d.ts +5 -7
- package/dist/parser/recipe/botania/nbtWrapper.js +5 -5
- package/dist/parser/recipe/botania/nbtWrapper.js.map +1 -1
- package/dist/parser/recipe/botania/runicAltar.js +1 -1
- package/dist/parser/recipe/botania/runicAltar.js.map +1 -1
- package/dist/parser/recipe/create/assembly.d.ts +3 -3
- package/dist/parser/recipe/create/assembly.js +5 -5
- package/dist/parser/recipe/create/assembly.js.map +1 -1
- package/dist/parser/recipe/farmersdelight/cooking.d.ts +3 -3
- package/dist/parser/recipe/farmersdelight/cooking.js +5 -5
- package/dist/parser/recipe/farmersdelight/cooking.js.map +1 -1
- package/dist/parser/recipe/farmersdelight/cutting.d.ts +3 -4
- package/dist/parser/recipe/farmersdelight/cutting.js +5 -5
- package/dist/parser/recipe/farmersdelight/cutting.js.map +1 -1
- package/dist/parser/recipe/forge/conditional.d.ts +6 -8
- package/dist/parser/recipe/forge/conditional.js +7 -7
- package/dist/parser/recipe/forge/conditional.js.map +1 -1
- package/dist/parser/recipe/index.d.ts +26 -8
- package/dist/parser/recipe/index.js +38 -6
- package/dist/parser/recipe/index.js.map +1 -1
- package/dist/parser/recipe/manyToMany.d.ts +3 -3
- package/dist/parser/recipe/manyToMany.js +5 -5
- package/dist/parser/recipe/manyToMany.js.map +1 -1
- package/dist/parser/recipe/manyToOne.d.ts +3 -3
- package/dist/parser/recipe/manyToOne.js +5 -5
- package/dist/parser/recipe/manyToOne.js.map +1 -1
- package/dist/parser/recipe/oneToOne.d.ts +3 -3
- package/dist/parser/recipe/oneToOne.js +5 -5
- package/dist/parser/recipe/oneToOne.js.map +1 -1
- package/dist/parser/recipe/roots/component.d.ts +3 -3
- package/dist/parser/recipe/roots/component.js +5 -5
- package/dist/parser/recipe/roots/component.js.map +1 -1
- package/dist/parser/recipe/roots/ritual.d.ts +3 -4
- package/dist/parser/recipe/roots/ritual.js +5 -5
- package/dist/parser/recipe/roots/ritual.js.map +1 -1
- package/dist/parser/recipe/thermal/catalyst.d.ts +3 -3
- package/dist/parser/recipe/thermal/catalyst.js +5 -5
- package/dist/parser/recipe/thermal/catalyst.js.map +1 -1
- package/dist/parser/recipe/thermal/fuel.d.ts +3 -3
- package/dist/parser/recipe/thermal/fuel.js +5 -5
- package/dist/parser/recipe/thermal/fuel.js.map +1 -1
- package/dist/parser/recipe/thermal/index.d.ts +3 -3
- package/dist/parser/recipe/thermal/index.js +5 -5
- package/dist/parser/recipe/thermal/index.js.map +1 -1
- package/dist/parser/recipe/thermal/treeExtraction.d.ts +3 -3
- package/dist/parser/recipe/thermal/treeExtraction.js +5 -5
- package/dist/parser/recipe/thermal/treeExtraction.js.map +1 -1
- package/dist/parser/recipe/vanilla/shaped.d.ts +4 -5
- package/dist/parser/recipe/vanilla/shaped.js +5 -5
- package/dist/parser/recipe/vanilla/shaped.js.map +1 -1
- package/dist/parser/recipe/vanilla/smelting.d.ts +3 -3
- package/dist/parser/recipe/vanilla/smelting.js +5 -5
- package/dist/parser/recipe/vanilla/smelting.js.map +1 -1
- package/dist/parser/recipe/vanilla/smithing.d.ts +3 -3
- package/dist/parser/recipe/vanilla/smithing.js +5 -5
- package/dist/parser/recipe/vanilla/smithing.js.map +1 -1
- package/dist/parser/recipe/vanilla/stonecutting.d.ts +3 -3
- package/dist/parser/recipe/vanilla/stonecutting.js +5 -5
- package/dist/parser/recipe/vanilla/stonecutting.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"brew.js","sourceRoot":"","sources":["../../../../src/parser/recipe/botania/brew.ts"],"names":[],"mappings":"AAGA,OAAO,YAAY,EAAE,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAQnD,MAAM,OAAO,UAAW,SAAQ,MAAM;
|
|
1
|
+
{"version":3,"file":"brew.js","sourceRoot":"","sources":["../../../../src/parser/recipe/botania/brew.ts"],"names":[],"mappings":"AAGA,OAAO,YAAY,EAAE,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAQnD,MAAM,OAAO,UAAW,SAAQ,MAAM;IACP;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,UAAU,CAAC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC,CAAC;IACnE,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,gBAAiB,SAAQ,YAGrC;IACC,WAAW,CACT,UAAgC,EAChC,OAA2B;QAE3B,MAAM,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC,UAAU,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;QAC3E,OAAO,IAAI,UAAU,CAAC,WAAW,CAAC,CAAC;IACrC,CAAC;CACF"}
|
|
@@ -10,7 +10,7 @@ export class ElvenTradeRecipeParser extends RecipeParser {
|
|
|
10
10
|
deserialize(definition, context) {
|
|
11
11
|
const ingredients = context.ingredients.createList(definition.ingredients);
|
|
12
12
|
const results = context.results.createList(definition.output);
|
|
13
|
-
return new ElvenTradeRecipe(
|
|
13
|
+
return new ElvenTradeRecipe(ingredients, results);
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
16
|
//# sourceMappingURL=elvenTrade.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"elvenTrade.js","sourceRoot":"","sources":["../../../../src/parser/recipe/botania/elvenTrade.ts"],"names":[],"mappings":"AACA,OAAO,YAAY,EAAE,EAA2B,MAAM,aAAa,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AASpD,MAAM,OAAO,gBAAiB,SAAQ,gBAAgB;IAC3C,SAAS,CAChB,OAA2B;QAE3B,MAAM,EAAE,OAAO,EAAE,GAAG,IAAI,EAAE,GAAG,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;QACtD,OAAO,EAAE,GAAG,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC;IACtC,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,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;QAC9D,OAAO,IAAI,gBAAgB,CAAC,
|
|
1
|
+
{"version":3,"file":"elvenTrade.js","sourceRoot":"","sources":["../../../../src/parser/recipe/botania/elvenTrade.ts"],"names":[],"mappings":"AACA,OAAO,YAAY,EAAE,EAA2B,MAAM,aAAa,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AASpD,MAAM,OAAO,gBAAiB,SAAQ,gBAAgB;IAC3C,SAAS,CAChB,OAA2B;QAE3B,MAAM,EAAE,OAAO,EAAE,GAAG,IAAI,EAAE,GAAG,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;QACtD,OAAO,EAAE,GAAG,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC;IACtC,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,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;QAC9D,OAAO,IAAI,gBAAgB,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;IACpD,CAAC;CACF"}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import type { Ingredient } from "../../../common/ingredient/index.js";
|
|
2
|
-
import type { Result } from "../../../common/result/index.js";
|
|
3
1
|
import type { RecipeDefinition } from "../../../schema/data/recipe.js";
|
|
4
|
-
import type {
|
|
2
|
+
import type { RecipeHolder, RecipeModifier, RecipeParseContext } from "../index.js";
|
|
5
3
|
import RecipeParser, { Recipe } from "../index.js";
|
|
6
4
|
export type GogWrapperRecipeDefinition = RecipeDefinition & Readonly<{
|
|
7
5
|
nbt: string;
|
|
@@ -11,10 +9,10 @@ export type GogWrapperRecipeDefinition = RecipeDefinition & Readonly<{
|
|
|
11
9
|
export declare class GogWrapperRecipe extends Recipe {
|
|
12
10
|
private readonly base;
|
|
13
11
|
private readonly gog;
|
|
14
|
-
constructor(
|
|
15
|
-
getIngredients(): Ingredient[];
|
|
16
|
-
getResults(): Result[];
|
|
17
|
-
replace(
|
|
12
|
+
constructor(base: RecipeHolder, gog: RecipeHolder);
|
|
13
|
+
getIngredients(): import("../../../common/ingredient/index.js").Ingredient[];
|
|
14
|
+
getResults(): import("../../../common/result/index.js").Result[];
|
|
15
|
+
replace(modifier: RecipeModifier): GogWrapperRecipe;
|
|
18
16
|
serialize(context: RecipeParseContext): Partial<GogWrapperRecipeDefinition>;
|
|
19
17
|
}
|
|
20
18
|
export declare class GogWrapperRecipeParser extends RecipeParser<GogWrapperRecipeDefinition, GogWrapperRecipe> {
|
|
@@ -2,8 +2,8 @@ import RecipeParser, { Recipe } from "../index.js";
|
|
|
2
2
|
export class GogWrapperRecipe extends Recipe {
|
|
3
3
|
base;
|
|
4
4
|
gog;
|
|
5
|
-
constructor(
|
|
6
|
-
super(
|
|
5
|
+
constructor(base, gog) {
|
|
6
|
+
super();
|
|
7
7
|
this.base = base;
|
|
8
8
|
this.gog = gog;
|
|
9
9
|
}
|
|
@@ -13,8 +13,8 @@ export class GogWrapperRecipe extends Recipe {
|
|
|
13
13
|
getResults() {
|
|
14
14
|
return [...this.base.getResults(), ...this.gog.getResults()];
|
|
15
15
|
}
|
|
16
|
-
replace(
|
|
17
|
-
return new GogWrapperRecipe(this.
|
|
16
|
+
replace(modifier) {
|
|
17
|
+
return new GogWrapperRecipe(this.base.replace(modifier), this.gog.replace(modifier));
|
|
18
18
|
}
|
|
19
19
|
serialize(context) {
|
|
20
20
|
return {
|
|
@@ -27,7 +27,7 @@ export class GogWrapperRecipeParser extends RecipeParser {
|
|
|
27
27
|
deserialize(definition, context) {
|
|
28
28
|
const base = context.recipes.deserialize(definition.base);
|
|
29
29
|
const gog = context.recipes.deserialize(definition.gog);
|
|
30
|
-
return new GogWrapperRecipe(
|
|
30
|
+
return new GogWrapperRecipe(base, gog);
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
//# sourceMappingURL=gogWrapper.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gogWrapper.js","sourceRoot":"","sources":["../../../../src/parser/recipe/botania/gogWrapper.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"gogWrapper.js","sourceRoot":"","sources":["../../../../src/parser/recipe/botania/gogWrapper.ts"],"names":[],"mappings":"AAMA,OAAO,YAAY,EAAE,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AASnD,MAAM,OAAO,gBAAiB,SAAQ,MAAM;IAEvB;IACA;IAFnB,YACmB,IAAkB,EAClB,GAAiB;QAElC,KAAK,EAAE,CAAC;QAHS,SAAI,GAAJ,IAAI,CAAc;QAClB,QAAG,GAAH,GAAG,CAAc;IAGpC,CAAC;IAED,cAAc;QACZ,OAAO,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE,EAAE,GAAG,IAAI,CAAC,GAAG,CAAC,cAAc,EAAE,CAAC,CAAC;IACvE,CAAC;IAED,UAAU;QACR,OAAO,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,EAAE,GAAG,IAAI,CAAC,GAAG,CAAC,UAAU,EAAE,CAAC,CAAC;IAC/D,CAAC;IAEQ,OAAO,CAAC,QAAwB;QACvC,OAAO,IAAI,gBAAgB,CACzB,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,EAC3B,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,QAAQ,CAAC,CAC3B,CAAC;IACJ,CAAC;IAEQ,SAAS,CAChB,OAA2B;QAE3B,OAAO;YACL,IAAI,EAAE,OAAO,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC;YAC1C,GAAG,EAAE,OAAO,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC;SACzC,CAAC;IACJ,CAAC;CACF;AAED,MAAM,OAAO,sBAAuB,SAAQ,YAG3C;IACC,WAAW,CACT,UAAsC,EACtC,OAA2B;QAE3B,MAAM,IAAI,GAAG,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;QAC1D,MAAM,GAAG,GAAG,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;QACxD,OAAO,IAAI,gBAAgB,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;IACzC,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 {
|
|
4
|
+
import type { RecipeModifier, RecipeParseContext } from "../index.js";
|
|
5
5
|
import RecipeParser, { Recipe } from "../index.js";
|
|
6
6
|
export type ManaInfusionRecipeDefinition = RecipeDefinition & Readonly<{
|
|
7
7
|
input: unknown;
|
|
@@ -13,10 +13,10 @@ export declare class ManaInfusionRecipe extends Recipe {
|
|
|
13
13
|
private readonly ingredient;
|
|
14
14
|
private readonly result;
|
|
15
15
|
private readonly catalyst?;
|
|
16
|
-
constructor(
|
|
16
|
+
constructor(ingredient: Ingredient, result: Result, catalyst?: Ingredient | undefined);
|
|
17
17
|
getIngredients(): Ingredient[];
|
|
18
18
|
getResults(): Result[];
|
|
19
|
-
replace(
|
|
19
|
+
replace(modifier: RecipeModifier): ManaInfusionRecipe;
|
|
20
20
|
serialize(context: RecipeParseContext): Partial<ManaInfusionRecipeDefinition>;
|
|
21
21
|
}
|
|
22
22
|
export declare class ManaInfusionRecipeParser extends RecipeParser<ManaInfusionRecipeDefinition, ManaInfusionRecipe> {
|
|
@@ -5,8 +5,8 @@ export class ManaInfusionRecipe extends Recipe {
|
|
|
5
5
|
ingredient;
|
|
6
6
|
result;
|
|
7
7
|
catalyst;
|
|
8
|
-
constructor(
|
|
9
|
-
super(
|
|
8
|
+
constructor(ingredient, result, catalyst) {
|
|
9
|
+
super();
|
|
10
10
|
this.ingredient = ingredient;
|
|
11
11
|
this.result = result;
|
|
12
12
|
this.catalyst = catalyst;
|
|
@@ -17,8 +17,8 @@ export class ManaInfusionRecipe extends Recipe {
|
|
|
17
17
|
getResults() {
|
|
18
18
|
return [this.result];
|
|
19
19
|
}
|
|
20
|
-
replace(
|
|
21
|
-
return new ManaInfusionRecipe(
|
|
20
|
+
replace(modifier) {
|
|
21
|
+
return new ManaInfusionRecipe(modifier.ingredient(this.ingredient), modifier.result(this.result), this.catalyst && modifier.ingredient(this.catalyst));
|
|
22
22
|
}
|
|
23
23
|
serialize(context) {
|
|
24
24
|
return {
|
|
@@ -35,7 +35,7 @@ export class ManaInfusionRecipeParser extends RecipeParser {
|
|
|
35
35
|
: deserializeBlockInput(context.ingredients, definition.catalyst);
|
|
36
36
|
const ingredient = context.ingredients.create(definition.input);
|
|
37
37
|
const result = context.results.create(definition.output);
|
|
38
|
-
return new ManaInfusionRecipe(
|
|
38
|
+
return new ManaInfusionRecipe(ingredient, result, catalyst);
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
41
|
//# sourceMappingURL=manaInfusion.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manaInfusion.js","sourceRoot":"","sources":["../../../../src/parser/recipe/botania/manaInfusion.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAKlD,OAAO,YAAY,EAAE,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAUzE,MAAM,OAAO,kBAAmB,SAAQ,MAAM;
|
|
1
|
+
{"version":3,"file":"manaInfusion.js","sourceRoot":"","sources":["../../../../src/parser/recipe/botania/manaInfusion.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAKlD,OAAO,YAAY,EAAE,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAUzE,MAAM,OAAO,kBAAmB,SAAQ,MAAM;IAEzB;IACA;IACA;IAHnB,YACmB,UAAsB,EACtB,MAAc,EACd,QAAqB;QAEtC,KAAK,EAAE,CAAC;QAJS,eAAU,GAAV,UAAU,CAAY;QACtB,WAAM,GAAN,MAAM,CAAQ;QACd,aAAQ,GAAR,QAAQ,CAAa;IAGxC,CAAC;IAED,cAAc;QACZ,OAAO,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IACzD,CAAC;IAED,U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index.js";
|
|
2
|
-
import type { Result } from "../../../common/result/index.js";
|
|
3
1
|
import type { RecipeDefinition } from "../../../schema/data/recipe.js";
|
|
4
|
-
import type {
|
|
2
|
+
import type { RecipeHolder, RecipeModifier, RecipeParseContext } from "../index.js";
|
|
5
3
|
import RecipeParser, { Recipe } from "../index.js";
|
|
6
4
|
export type NbtWrapperRecipeDefinition = RecipeDefinition & Readonly<{
|
|
7
5
|
nbt: string;
|
|
@@ -9,10 +7,10 @@ export type NbtWrapperRecipeDefinition = RecipeDefinition & Readonly<{
|
|
|
9
7
|
}>;
|
|
10
8
|
export declare class NbtWrapperRecipe extends Recipe {
|
|
11
9
|
private readonly recipe;
|
|
12
|
-
constructor(
|
|
13
|
-
getIngredients(): Ingredient[];
|
|
14
|
-
getResults(): Result[];
|
|
15
|
-
replace(
|
|
10
|
+
constructor(recipe: RecipeHolder);
|
|
11
|
+
getIngredients(): import("../../../common/ingredient/index.js").Ingredient[];
|
|
12
|
+
getResults(): import("../../../common/result/index.js").Result[];
|
|
13
|
+
replace(modifier: RecipeModifier): NbtWrapperRecipe;
|
|
16
14
|
serialize(context: RecipeParseContext): Partial<NbtWrapperRecipeDefinition>;
|
|
17
15
|
}
|
|
18
16
|
export declare class NbtWrapperRecipeParser extends RecipeParser<NbtWrapperRecipeDefinition, NbtWrapperRecipe> {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import RecipeParser, { Recipe } from "../index.js";
|
|
2
2
|
export class NbtWrapperRecipe extends Recipe {
|
|
3
3
|
recipe;
|
|
4
|
-
constructor(
|
|
5
|
-
super(
|
|
4
|
+
constructor(recipe) {
|
|
5
|
+
super();
|
|
6
6
|
this.recipe = recipe;
|
|
7
7
|
}
|
|
8
8
|
getIngredients() {
|
|
@@ -11,8 +11,8 @@ export class NbtWrapperRecipe extends Recipe {
|
|
|
11
11
|
getResults() {
|
|
12
12
|
return this.recipe.getResults();
|
|
13
13
|
}
|
|
14
|
-
replace(
|
|
15
|
-
return new NbtWrapperRecipe(this.
|
|
14
|
+
replace(modifier) {
|
|
15
|
+
return new NbtWrapperRecipe(this.recipe.replace(modifier));
|
|
16
16
|
}
|
|
17
17
|
serialize(context) {
|
|
18
18
|
return {
|
|
@@ -23,7 +23,7 @@ export class NbtWrapperRecipe extends Recipe {
|
|
|
23
23
|
export class NbtWrapperRecipeParser extends RecipeParser {
|
|
24
24
|
deserialize(definition, context) {
|
|
25
25
|
const recipe = context.recipes.deserialize(definition.recipe);
|
|
26
|
-
return new NbtWrapperRecipe(
|
|
26
|
+
return new NbtWrapperRecipe(recipe);
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
//# sourceMappingURL=nbtWrapper.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nbtWrapper.js","sourceRoot":"","sources":["../../../../src/parser/recipe/botania/nbtWrapper.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"nbtWrapper.js","sourceRoot":"","sources":["../../../../src/parser/recipe/botania/nbtWrapper.ts"],"names":[],"mappings":"AAMA,OAAO,YAAY,EAAE,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAQnD,MAAM,OAAO,gBAAiB,SAAQ,MAAM;IACb;IAA7B,YAA6B,MAAoB;QAC/C,KAAK,EAAE,CAAC;QADmB,WAAM,GAAN,MAAM,CAAc;IAEjD,CAAC;IAED,cAAc;QACZ,OAAO,IAAI,CAAC,MAAM,CAAC,cAAc,EAAE,CAAC;IACtC,CAAC;IAED,UAAU;QACR,OAAO,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,CAAC;IAClC,CAAC;IAEQ,OAAO,CAAC,QAAwB;QACvC,OAAO,IAAI,gBAAgB,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC;IAC7D,CAAC;IAEQ,SAAS,CAChB,OAA2B;QAE3B,OAAO;YACL,MAAM,EAAE,OAAO,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC;SAC/C,CAAC;IACJ,CAAC;CACF;AAED,MAAM,OAAO,sBAAuB,SAAQ,YAG3C;IACC,WAAW,CACT,UAAsC,EACtC,OAA2B;QAE3B,MAAM,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;QAC9D,OAAO,IAAI,gBAAgB,CAAC,MAAM,CAAC,CAAC;IACtC,CAAC;CACF"}
|
|
@@ -10,7 +10,7 @@ export class RunicAltarRecipeParser extends RecipeParser {
|
|
|
10
10
|
deserialize(definition, context) {
|
|
11
11
|
const ingredients = context.ingredients.createList(definition.ingredients);
|
|
12
12
|
const result = context.results.create(definition.output);
|
|
13
|
-
return new RunicAltarRecipe(
|
|
13
|
+
return new RunicAltarRecipe(ingredients, result);
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
16
|
//# sourceMappingURL=runicAltar.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runicAltar.js","sourceRoot":"","sources":["../../../../src/parser/recipe/botania/runicAltar.ts"],"names":[],"mappings":"AACA,OAAO,YAAY,EAAE,EAA2B,MAAM,aAAa,CAAC;AACpE,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AASlD,MAAM,OAAO,gBAAiB,SAAQ,eAAe;IAC1C,SAAS,CAChB,OAA2B;QAE3B,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;QACrD,OAAO,EAAE,GAAG,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;IACrC,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,OAAO,IAAI,gBAAgB,CAAC,
|
|
1
|
+
{"version":3,"file":"runicAltar.js","sourceRoot":"","sources":["../../../../src/parser/recipe/botania/runicAltar.ts"],"names":[],"mappings":"AACA,OAAO,YAAY,EAAE,EAA2B,MAAM,aAAa,CAAC;AACpE,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AASlD,MAAM,OAAO,gBAAiB,SAAQ,eAAe;IAC1C,SAAS,CAChB,OAA2B;QAE3B,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;QACrD,OAAO,EAAE,GAAG,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;IACrC,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,OAAO,IAAI,gBAAgB,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;IACnD,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 {
|
|
4
|
+
import type { RecipeHolder, RecipeModifier, RecipeParseContext } from "../index.js";
|
|
5
5
|
import RecipeParser, { Recipe } from "../index.js";
|
|
6
6
|
export type AssemblyRecipeDefinition = RecipeDefinition & Readonly<{
|
|
7
7
|
ingredient: unknown;
|
|
@@ -15,10 +15,10 @@ export declare class AssemblyRecipe extends Recipe {
|
|
|
15
15
|
private readonly transitionalItem;
|
|
16
16
|
private readonly results;
|
|
17
17
|
private readonly sequence;
|
|
18
|
-
constructor(
|
|
18
|
+
constructor(ingredient: Ingredient, transitionalItem: Ingredient, results: Result[], sequence: RecipeHolder[]);
|
|
19
19
|
getIngredients(): Ingredient[];
|
|
20
20
|
getResults(): Result[];
|
|
21
|
-
replace(
|
|
21
|
+
replace(modifier: RecipeModifier): AssemblyRecipe;
|
|
22
22
|
serialize(context: RecipeParseContext): Partial<AssemblyRecipeDefinition>;
|
|
23
23
|
}
|
|
24
24
|
export declare class AssemblyRecipeParser extends RecipeParser<AssemblyRecipeDefinition, AssemblyRecipe> {
|
|
@@ -4,8 +4,8 @@ export class AssemblyRecipe extends Recipe {
|
|
|
4
4
|
transitionalItem;
|
|
5
5
|
results;
|
|
6
6
|
sequence;
|
|
7
|
-
constructor(
|
|
8
|
-
super(
|
|
7
|
+
constructor(ingredient, transitionalItem, results, sequence) {
|
|
8
|
+
super();
|
|
9
9
|
this.ingredient = ingredient;
|
|
10
10
|
this.transitionalItem = transitionalItem;
|
|
11
11
|
this.results = results;
|
|
@@ -21,8 +21,8 @@ export class AssemblyRecipe extends Recipe {
|
|
|
21
21
|
getResults() {
|
|
22
22
|
return [...this.results, ...this.sequence.flatMap((it) => it.getResults())];
|
|
23
23
|
}
|
|
24
|
-
replace(
|
|
25
|
-
return new AssemblyRecipe(
|
|
24
|
+
replace(modifier) {
|
|
25
|
+
return new AssemblyRecipe(modifier.ingredient(this.ingredient), modifier.ingredient(this.transitionalItem), this.results.map(modifier.result), this.sequence.map((it) => it.replace(modifier)));
|
|
26
26
|
}
|
|
27
27
|
serialize(context) {
|
|
28
28
|
return {
|
|
@@ -39,7 +39,7 @@ export class AssemblyRecipeParser extends RecipeParser {
|
|
|
39
39
|
const transitionalItem = context.ingredients.create(definition.transitionalItem);
|
|
40
40
|
const results = context.results.createList(definition.results);
|
|
41
41
|
const sequence = definition.sequence.map((it) => context.recipes.deserialize(it));
|
|
42
|
-
return new AssemblyRecipe(
|
|
42
|
+
return new AssemblyRecipe(ingredient, transitionalItem, results, sequence);
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
45
|
//# sourceMappingURL=assembly.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assembly.js","sourceRoot":"","sources":["../../../../src/parser/recipe/create/assembly.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"assembly.js","sourceRoot":"","sources":["../../../../src/parser/recipe/create/assembly.ts"],"names":[],"mappings":"AAQA,OAAO,YAAY,EAAE,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAWnD,MAAM,OAAO,cAAe,SAAQ,MAAM;IAErB;IACA;IACA;IACA;IAJnB,YACmB,UAAsB,EACtB,gBAA4B,EAC5B,OAAiB,EACjB,QAAwB;QAEzC,KAAK,EAAE,CAAC;QALS,eAAU,GAAV,UAAU,CAAY;QACtB,qBAAgB,GAAhB,gBAAgB,CAAY;QAC5B,YAAO,GAAP,OAAO,CAAU;QACjB,aAAQ,GAAR,QAAQ,CAAgB;IAG3C,CAAC;IAED,cAAc;QACZ,OAAO;YACL,IAAI,CAAC,UAAU;YACf,IAAI,CAAC,gBAAgB;YACrB,GAAG,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,cAAc,EAAE,CAAC;SACtD,CAAC;IACJ,CAAC;IAED,UAAU;QACR,OAAO,CAAC,GAAG,IAAI,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC;IAC9E,CAAC;IAEQ,OAAO,CAAC,QAAwB;QACvC,OAAO,IAAI,cAAc,CACvB,QAAQ,CAAC,UAAU,CAAC,IAAI,CAAC,UAAU,CAAC,EACpC,QAAQ,CAAC,UA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AAU,EAAE,gBAAgB,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;IAC7E,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 {
|
|
4
|
+
import type { RecipeModifier, RecipeParseContext } from "../index.js";
|
|
5
5
|
import RecipeParser, { Recipe } from "../index.js";
|
|
6
6
|
export type CookingRecipeDefinition = RecipeDefinition & Readonly<{
|
|
7
7
|
ingredients: unknown[];
|
|
@@ -15,10 +15,10 @@ export declare class CookingRecipe extends Recipe {
|
|
|
15
15
|
private readonly ingredients;
|
|
16
16
|
private readonly result;
|
|
17
17
|
private readonly container?;
|
|
18
|
-
constructor(
|
|
18
|
+
constructor(ingredients: Ingredient[], result: Result, container?: Ingredient | undefined);
|
|
19
19
|
getIngredients(): Ingredient[];
|
|
20
20
|
getResults(): Result[];
|
|
21
|
-
replace(
|
|
21
|
+
replace(modifier: RecipeModifier): CookingRecipe;
|
|
22
22
|
serialize(context: RecipeParseContext): Partial<CookingRecipeDefinition>;
|
|
23
23
|
}
|
|
24
24
|
export default class CookingRecipeParser extends RecipeParser<CookingRecipeDefinition, CookingRecipe> {
|
|
@@ -4,8 +4,8 @@ export class CookingRecipe extends Recipe {
|
|
|
4
4
|
ingredients;
|
|
5
5
|
result;
|
|
6
6
|
container;
|
|
7
|
-
constructor(
|
|
8
|
-
super(
|
|
7
|
+
constructor(ingredients, result, container) {
|
|
8
|
+
super();
|
|
9
9
|
this.ingredients = ingredients;
|
|
10
10
|
this.result = result;
|
|
11
11
|
this.container = container;
|
|
@@ -16,8 +16,8 @@ export class CookingRecipe extends Recipe {
|
|
|
16
16
|
getResults() {
|
|
17
17
|
return [this.result];
|
|
18
18
|
}
|
|
19
|
-
replace(
|
|
20
|
-
return new CookingRecipe(this.
|
|
19
|
+
replace(modifier) {
|
|
20
|
+
return new CookingRecipe(this.ingredients.map(modifier.ingredient), modifier.result(this.result), this.container && modifier.ingredient(this.container));
|
|
21
21
|
}
|
|
22
22
|
serialize(context) {
|
|
23
23
|
return {
|
|
@@ -35,7 +35,7 @@ export default class CookingRecipeParser extends RecipeParser {
|
|
|
35
35
|
const container = definition.container === undefined
|
|
36
36
|
? undefined
|
|
37
37
|
: context.ingredients.create(definition.container);
|
|
38
|
-
return new CookingRecipe(
|
|
38
|
+
return new CookingRecipe(ingredients, result, container);
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
41
|
//# sourceMappingURL=cooking.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cooking.js","sourceRoot":"","sources":["../../../../src/parser/recipe/farmersdelight/cooking.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAKlD,OAAO,YAAY,EAAE,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAYnD,MAAM,OAAO,aAAc,SAAQ,MAAM;
|
|
1
|
+
{"version":3,"file":"cooking.js","sourceRoot":"","sources":["../../../../src/parser/recipe/farmersdelight/cooking.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAKlD,OAAO,YAAY,EAAE,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAYnD,MAAM,OAAO,aAAc,SAAQ,MAAM;IAEpB;IACA;IACA;IAHnB,YACmB,WAAyB,EACzB,MAAc,EACd,SAAsB;QAEvC,KAAK,EAAE,CAAC;QAJS,gBAAW,GAAX,WAAW,CAAc;QACzB,WAAM,GAAN,MAAM,CAAQ;QACd,cAAS,GAAT,SAAS,CAAa;IAGzC,CAAC;IAED,cAAc;QACZ,OAAO,CAAC,IAAI,CAAC,SAAS,EAAE,GAAG,IAAI,CAAC,WAAW,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IAC9D,CA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,6 @@
|
|
|
1
1
|
import type { Ingredient } from "../../../common/ingredient/index.js";
|
|
2
2
|
import type { Result } from "../../../common/result/index.js";
|
|
3
|
-
import
|
|
4
|
-
import RecipeParser, { type RecipeParseContext, type Replacer } from "../index.js";
|
|
3
|
+
import RecipeParser, { type RecipeModifier, type RecipeParseContext } from "../index.js";
|
|
5
4
|
import { ManyToManyRecipe, type ManyToManyRecipeDefinition } from "../manyToMany.js";
|
|
6
5
|
export type ToolInput = Readonly<{
|
|
7
6
|
type: "farmersdelight:tool_action";
|
|
@@ -13,9 +12,9 @@ export type CuttingRecipeDefinition = Omit<ManyToManyRecipeDefinition, "results"
|
|
|
13
12
|
}>;
|
|
14
13
|
export declare class CuttingRecipe extends ManyToManyRecipe {
|
|
15
14
|
private readonly tool;
|
|
16
|
-
constructor(
|
|
15
|
+
constructor(ingredients: Ingredient[], results: Result[], tool: Ingredient);
|
|
17
16
|
getIngredients(): Ingredient[];
|
|
18
|
-
replace(
|
|
17
|
+
replace(modifier: RecipeModifier): CuttingRecipe;
|
|
19
18
|
serialize(context: RecipeParseContext): Partial<CuttingRecipeDefinition>;
|
|
20
19
|
}
|
|
21
20
|
export default class CuttingRecipeParser extends RecipeParser<CuttingRecipeDefinition, CuttingRecipe> {
|
|
@@ -11,15 +11,15 @@ import { ManyToManyRecipe, } from "../manyToMany.js";
|
|
|
11
11
|
// }
|
|
12
12
|
export class CuttingRecipe extends ManyToManyRecipe {
|
|
13
13
|
tool;
|
|
14
|
-
constructor(
|
|
15
|
-
super(
|
|
14
|
+
constructor(ingredients, results, tool) {
|
|
15
|
+
super(ingredients, results);
|
|
16
16
|
this.tool = tool;
|
|
17
17
|
}
|
|
18
18
|
getIngredients() {
|
|
19
19
|
return [...super.getIngredients(), this.tool];
|
|
20
20
|
}
|
|
21
|
-
replace(
|
|
22
|
-
return new CuttingRecipe(this.
|
|
21
|
+
replace(modifier) {
|
|
22
|
+
return new CuttingRecipe(this.ingredients.map(modifier.ingredient), this.results.map(modifier.result), modifier.ingredient(this.tool));
|
|
23
23
|
}
|
|
24
24
|
serialize(context) {
|
|
25
25
|
const { results, ...rest } = super.serialize(context);
|
|
@@ -35,7 +35,7 @@ export default class CuttingRecipeParser extends RecipeParser {
|
|
|
35
35
|
const ingredients = context.ingredients.createList(definition.ingredients);
|
|
36
36
|
const result = context.results.createList(definition.result);
|
|
37
37
|
const tool = context.ingredients.create(definition.tool);
|
|
38
|
-
return new CuttingRecipe(
|
|
38
|
+
return new CuttingRecipe(ingredients, result, tool);
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
41
|
//# sourceMappingURL=cutting.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cutting.js","sourceRoot":"","sources":["../../../../src/parser/recipe/farmersdelight/cutting.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"cutting.js","sourceRoot":"","sources":["../../../../src/parser/recipe/farmersdelight/cutting.ts"],"names":[],"mappings":"AAEA,OAAO,YAAY,EAAE,EAGpB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,gBAAgB,GAEjB,MAAM,kBAAkB,CAAC;AAgB1B,2BAA2B;AAC3B,sEAAsE;AACtE,aAAa;AACb,iBAAiB;AACjB,mCAAmC;AACnC,yBAAyB;AACzB,kDAAkD;AAClD,OAAO;AACP,IAAI;AAEJ,MAAM,OAAO,aAAc,SAAQ,gBAAgB;IAI9B;IAHnB,YACE,WAAyB,EACzB,OAAiB,EACA,IAAgB;QAEjC,KAAK,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;QAFX,SAAI,GAAJ,IAAI,CAAY;IAGnC,CAAC;IAEQ,cAAc;QACrB,OAAO,CAAC,GAAG,KAAK,CAAC,cAAc,EAAE,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;IAChD,CAAC;IAEQ,OAAO,CAAC,QAAwB;QACvC,OAAO,IAAI,aAAa,CACtB,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,QAAQ,CAAC,UAAU,CAAC,EACzC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,MAAM,CAAC,EACjC,QAAQ,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAC/B,CAAC;IACJ,CAAC;IAEQ,SAAS,CAChB,OAA2B;QAE3B,MAAM,EAAE,OAAO,EAAE,GAAG,IAAI,EAAE,GAAG,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;QACtD,OAAO;YACL,GAAG,IAAI;YACP,MAAM,EAAE,OAAO;YACf,IAAI,EAAE,OAAO,CAAC,WAAW,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC;SAC/C,CAAC;IACJ,CAAC;CACF;AAED,MAAM,CAAC,OAAO,OAAO,mBAAoB,SAAQ,YAGhD;IACC,WAAW,CACT,UAAmC,EACnC,OAA2B;QAE3B,MAAM,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC,UAAU,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;QAC3E,MAAM,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;QAC7D,MAAM,IAAI,GAAG,OAAO,CAAC,WAAW,CAAC,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;QACzD,OAAO,IAAI,aAAa,CAAC,WAAW,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC;IACtD,CAAC;CACF"}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import type { Ingredient } from "../../../common/ingredient/index.js";
|
|
2
|
-
import type { Result } from "../../../common/result/index.js";
|
|
3
1
|
import type { RecipeDefinition } from "../../../schema/data/recipe.js";
|
|
4
|
-
import type {
|
|
2
|
+
import type { RecipeHolder, RecipeModifier, RecipeParseContext } from "../index.js";
|
|
5
3
|
import RecipeParser, { Recipe } from "../index.js";
|
|
6
4
|
type WithConditions<T> = {
|
|
7
5
|
conditions: unknown[];
|
|
@@ -12,12 +10,12 @@ export type ForgeConditionalRecipeDefinition = RecipeDefinition & Readonly<{
|
|
|
12
10
|
}>;
|
|
13
11
|
export declare class ForgeConditionalRecipe extends Recipe {
|
|
14
12
|
private readonly recipes;
|
|
15
|
-
constructor(
|
|
16
|
-
getIngredients(): Ingredient[];
|
|
17
|
-
getResults(): Result[];
|
|
18
|
-
replace(
|
|
13
|
+
constructor(recipes: WithConditions<RecipeHolder>[]);
|
|
14
|
+
getIngredients(): import("../../../common/ingredient/index.js").Ingredient[];
|
|
15
|
+
getResults(): import("../../../common/result/index.js").Result[];
|
|
16
|
+
replace(modifier: RecipeModifier): ForgeConditionalRecipe;
|
|
19
17
|
serialize(context: RecipeParseContext): Partial<ForgeConditionalRecipeDefinition>;
|
|
20
|
-
|
|
18
|
+
additionalTypes(): `${string}:${string}`[];
|
|
21
19
|
}
|
|
22
20
|
export default class ForgeConditionalRecipeParser extends RecipeParser<ForgeConditionalRecipeDefinition, ForgeConditionalRecipe> {
|
|
23
21
|
deserialize(definition: ForgeConditionalRecipeDefinition, context: RecipeParseContext): ForgeConditionalRecipe;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import RecipeParser, { Recipe } from "../index.js";
|
|
2
2
|
export class ForgeConditionalRecipe extends Recipe {
|
|
3
3
|
recipes;
|
|
4
|
-
constructor(
|
|
5
|
-
super(
|
|
4
|
+
constructor(recipes) {
|
|
5
|
+
super();
|
|
6
6
|
this.recipes = recipes;
|
|
7
7
|
}
|
|
8
8
|
getIngredients() {
|
|
@@ -11,10 +11,10 @@ export class ForgeConditionalRecipe extends Recipe {
|
|
|
11
11
|
getResults() {
|
|
12
12
|
return this.recipes.flatMap((it) => it.recipe.getResults());
|
|
13
13
|
}
|
|
14
|
-
replace(
|
|
15
|
-
return new ForgeConditionalRecipe(this.
|
|
14
|
+
replace(modifier) {
|
|
15
|
+
return new ForgeConditionalRecipe(this.recipes.map((it) => ({
|
|
16
16
|
...it,
|
|
17
|
-
recipe: it.recipe.replace(
|
|
17
|
+
recipe: it.recipe.replace(modifier),
|
|
18
18
|
})));
|
|
19
19
|
}
|
|
20
20
|
serialize(context) {
|
|
@@ -25,7 +25,7 @@ export class ForgeConditionalRecipe extends Recipe {
|
|
|
25
25
|
})),
|
|
26
26
|
};
|
|
27
27
|
}
|
|
28
|
-
|
|
28
|
+
additionalTypes() {
|
|
29
29
|
return this.recipes.flatMap((it) => it.recipe.getTypes());
|
|
30
30
|
}
|
|
31
31
|
}
|
|
@@ -35,7 +35,7 @@ export default class ForgeConditionalRecipeParser extends RecipeParser {
|
|
|
35
35
|
conditions: it.conditions,
|
|
36
36
|
recipe: context.recipes.deserialize(it.recipe),
|
|
37
37
|
}));
|
|
38
|
-
return new ForgeConditionalRecipe(
|
|
38
|
+
return new ForgeConditionalRecipe(recipes);
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
41
|
//# sourceMappingURL=conditional.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conditional.js","sourceRoot":"","sources":["../../../../src/parser/recipe/forge/conditional.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"conditional.js","sourceRoot":"","sources":["../../../../src/parser/recipe/forge/conditional.ts"],"names":[],"mappings":"AAMA,OAAO,YAAY,EAAE,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAYnD,MAAM,OAAO,sBAAuB,SAAQ,MAAM;IACnB;IAA7B,YAA6B,OAAuC;QAClE,KAAK,EAAE,CAAC;QADmB,YAAO,GAAP,OAAO,CAAgC;IAEpE,CAAC;IAED,cAAc;QACZ,OAAO,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,MAAM,CAAC,cAAc,EAAE,CAAC,CAAC;IAClE,CAAC;IAED,UAAU;QACR,OAAO,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,MAAM,CAAC,UAAU,EAAE,CAAC,CAAC;IAC9D,CAAC;IAEQ,OAAO,CAAC,QAAwB;QACvC,OAAO,IAAI,sBAAsB,CAC/B,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;YACxB,GAAG,EAAE;YACL,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC;SACpC,CAAC,CAAC,CACJ,CAAC;IACJ,CAAC;IAEQ,SAAS,CAChB,OAA2B;QAE3B,OAAO;YACL,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;gBACjC,GAAG,EAAE;gBACL,MAAM,EAAE,OAAO,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,CAAC,MAAM,CAAC;aAC7C,CAAC,CAAC;SACJ,CAAC;IACJ,CAAC;IAEQ,eAAe;QACtB,OAAO,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC,CAAC;IAC5D,CAAC;CACF;AAED,MAAM,CAAC,OAAO,OAAO,4BAA6B,SAAQ,YAGzD;IACU,WAAW,CAClB,UAA4C,EAC5C,OAA2B;QAE3B,MAAM,OAAO,GAAG,UAAU,CAAC,OAAO,CAAC,GAAG,CACpC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;YACP,UAAU,EAAE,EAAE,CAAC,UAAU;YACzB,MAAM,EAAE,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE,CAAC,MAAM,CAAC;SAC/C,CAAC,CACH,CAAC;QAEF,OAAO,IAAI,sBAAsB,CAAC,OAAO,CAAC,CAAC;IAC7C,CAAC;CACF"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type NormalizedId } from "../../common/id.js";
|
|
1
2
|
import type { Ingredient } from "../../common/ingredient/index.js";
|
|
2
3
|
import type { Predicate } from "../../common/predicates.js";
|
|
3
4
|
import type { Result } from "../../common/result/index.js";
|
|
@@ -5,20 +6,37 @@ import type { PackContext } from "../../loader/context.js";
|
|
|
5
6
|
import type { RecipeDefinition } from "../../schema/data/recipe.js";
|
|
6
7
|
export type Replacer<T> = (value: T) => T;
|
|
7
8
|
export declare function createReplacer<T>(from: Predicate<T>, to: T): Replacer<T>;
|
|
9
|
+
export type RecipeModifier = {
|
|
10
|
+
result: Replacer<Result>;
|
|
11
|
+
ingredient: Replacer<Ingredient>;
|
|
12
|
+
};
|
|
13
|
+
export declare class RecipeHolder {
|
|
14
|
+
private readonly definition;
|
|
15
|
+
private readonly recipe;
|
|
16
|
+
private readonly type;
|
|
17
|
+
constructor(definition: RecipeDefinition, recipe: Recipe);
|
|
18
|
+
serialize(context: RecipeParseContext): {
|
|
19
|
+
type: import("@adeficior/data-modifier/generated").RecipeSerializerId;
|
|
20
|
+
conditions?: import("../../index.js").ForgeCondition[];
|
|
21
|
+
"fabric:load_conditions"?: import("../../index.js").FabricCondition[];
|
|
22
|
+
};
|
|
23
|
+
getIngredients(): Ingredient[];
|
|
24
|
+
getResults(): Result[];
|
|
25
|
+
replace(modifier: RecipeModifier): RecipeHolder;
|
|
26
|
+
replaceIngredient(replace: Replacer<Ingredient>): RecipeHolder;
|
|
27
|
+
replaceResult(replace: Replacer<Result>): RecipeHolder;
|
|
28
|
+
getTypes(): NormalizedId[];
|
|
29
|
+
}
|
|
8
30
|
export declare abstract class Recipe {
|
|
9
|
-
readonly definition: RecipeDefinition;
|
|
10
|
-
constructor(definition: RecipeDefinition);
|
|
11
31
|
abstract getIngredients(): Ingredient[];
|
|
12
|
-
replaceIngredient(replace: Replacer<Ingredient>): Recipe;
|
|
13
32
|
abstract getResults(): Result[];
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
getTypes(): string[];
|
|
33
|
+
abstract replace(modifier: RecipeModifier): Recipe;
|
|
34
|
+
additionalTypes(): NormalizedId[];
|
|
17
35
|
abstract serialize(context: RecipeParseContext): Partial<RecipeDefinition>;
|
|
18
36
|
}
|
|
19
37
|
export type RecipeSerializer = {
|
|
20
|
-
deserialize(definition: RecipeDefinition):
|
|
21
|
-
serialize(recipe:
|
|
38
|
+
deserialize(definition: RecipeDefinition): RecipeHolder;
|
|
39
|
+
serialize(recipe: RecipeHolder): RecipeDefinition;
|
|
22
40
|
};
|
|
23
41
|
export type RecipeParseContext = Pick<PackContext, "ingredients" | "results"> & {
|
|
24
42
|
recipes: RecipeSerializer;
|