@adeficior/data-modifier-botania 2.0.0-rc.20260814115618

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 (46) hide show
  1. package/dist/index.d.ts +12 -0
  2. package/dist/index.js +13 -0
  3. package/dist/index.js.map +1 -0
  4. package/dist/module.d.ts +2 -0
  5. package/dist/module.js +13 -0
  6. package/dist/module.js.map +1 -0
  7. package/dist/registration.d.ts +2 -0
  8. package/dist/registration.js +34 -0
  9. package/dist/registration.js.map +1 -0
  10. package/dist/serializer/apothecary.d.ts +20 -0
  11. package/dist/serializer/apothecary.js +38 -0
  12. package/dist/serializer/apothecary.js.map +1 -0
  13. package/dist/serializer/blocks.d.ts +17 -0
  14. package/dist/serializer/blocks.js +24 -0
  15. package/dist/serializer/blocks.js.map +1 -0
  16. package/dist/serializer/brew.d.ts +17 -0
  17. package/dist/serializer/brew.js +30 -0
  18. package/dist/serializer/brew.js.map +1 -0
  19. package/dist/serializer/elvenTrade.d.ts +12 -0
  20. package/dist/serializer/elvenTrade.js +15 -0
  21. package/dist/serializer/elvenTrade.js.map +1 -0
  22. package/dist/serializer/gogWrapper.d.ts +19 -0
  23. package/dist/serializer/gogWrapper.js +34 -0
  24. package/dist/serializer/gogWrapper.js.map +1 -0
  25. package/dist/serializer/manaInfusion.d.ts +24 -0
  26. package/dist/serializer/manaInfusion.js +43 -0
  27. package/dist/serializer/manaInfusion.js.map +1 -0
  28. package/dist/serializer/module.d.ts +7 -0
  29. package/dist/serializer/module.js +30 -0
  30. package/dist/serializer/module.js.map +1 -0
  31. package/dist/serializer/nbtWrapper.d.ts +17 -0
  32. package/dist/serializer/nbtWrapper.js +30 -0
  33. package/dist/serializer/nbtWrapper.js.map +1 -0
  34. package/dist/serializer/orechid.d.ts +8 -0
  35. package/dist/serializer/orechid.js +4 -0
  36. package/dist/serializer/orechid.js.map +1 -0
  37. package/dist/serializer/pureDaisy.d.ts +8 -0
  38. package/dist/serializer/pureDaisy.js +19 -0
  39. package/dist/serializer/pureDaisy.js.map +1 -0
  40. package/dist/serializer/runicAltar.d.ts +12 -0
  41. package/dist/serializer/runicAltar.js +15 -0
  42. package/dist/serializer/runicAltar.js.map +1 -0
  43. package/dist/serializer/terraPlate.d.ts +6 -0
  44. package/dist/serializer/terraPlate.js +4 -0
  45. package/dist/serializer/terraPlate.js.map +1 -0
  46. package/package.json +36 -0
@@ -0,0 +1,12 @@
1
+ export { default } from "./module";
2
+ export * from "./serializer/apothecary";
3
+ export * from "./serializer/blocks";
4
+ export * from "./serializer/brew";
5
+ export * from "./serializer/elvenTrade";
6
+ export * from "./serializer/gogWrapper";
7
+ export * from "./serializer/manaInfusion";
8
+ export * from "./serializer/nbtWrapper";
9
+ export * from "./serializer/orechid";
10
+ export * from "./serializer/pureDaisy";
11
+ export * from "./serializer/runicAltar";
12
+ export * from "./serializer/terraPlate";
package/dist/index.js ADDED
@@ -0,0 +1,13 @@
1
+ export { default } from "./module";
2
+ export * from "./serializer/apothecary";
3
+ export * from "./serializer/blocks";
4
+ export * from "./serializer/brew";
5
+ export * from "./serializer/elvenTrade";
6
+ export * from "./serializer/gogWrapper";
7
+ export * from "./serializer/manaInfusion";
8
+ export * from "./serializer/nbtWrapper";
9
+ export * from "./serializer/orechid";
10
+ export * from "./serializer/pureDaisy";
11
+ export * from "./serializer/runicAltar";
12
+ export * from "./serializer/terraPlate";
13
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AACnC,cAAc,yBAAyB,CAAC;AACxC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,yBAAyB,CAAC;AACxC,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC"}
@@ -0,0 +1,2 @@
1
+ declare const _default: import("@adeficior/data-modifier-core").ModuleConfig<import("@adeficior/data-modifier-core").ModuleTypes>;
2
+ export default _default;
package/dist/module.js ADDED
@@ -0,0 +1,13 @@
1
+ import { defineModule } from "@adeficior/data-modifier-core";
2
+ import { name } from "../package.json";
3
+ import { registerParsers } from "./registration";
4
+ export default defineModule({
5
+ importModule: name,
6
+ dependencies: {
7
+ "@adeficior/data-modifier-recipes": "required",
8
+ },
9
+ setup: (pack) => {
10
+ pack.hook("recipes:register-parser", registerParsers);
11
+ },
12
+ });
13
+ //# sourceMappingURL=module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"module.js","sourceRoot":"","sources":["../src/module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAC7D,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AACvC,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEjD,eAAe,YAAY,CAAC;IAC1B,YAAY,EAAE,IAAI;IAClB,YAAY,EAAE;QACZ,kCAAkC,EAAE,UAAU;KAC/C;IACD,KAAK,EAAE,CAAC,IAAI,EAAE,EAAE;QACd,IAAI,CAAC,IAAI,CAAC,yBAAyB,EAAE,eAAe,CAAC,CAAC;IACxD,CAAC;CACF,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { type RegisterRecipeParser } from "@adeficior/data-modifier-recipes";
2
+ export declare function registerParsers(event: RegisterRecipeParser): void;
@@ -0,0 +1,34 @@
1
+ import {} from "@adeficior/data-modifier-recipes";
2
+ import { ShapedParser, ShapelessParser, } from "@adeficior/data-modifier-recipes";
3
+ import { ApothecaryRecipeParser } from "./serializer/apothecary";
4
+ import { BrewRecipeParser } from "./serializer/brew";
5
+ import { ElvenTradeRecipeParser } from "./serializer/elvenTrade";
6
+ import { GogWrapperRecipeParser } from "./serializer/gogWrapper";
7
+ import { ManaInfusionRecipeParser } from "./serializer/manaInfusion";
8
+ import { NbtWrapperRecipeParser } from "./serializer/nbtWrapper";
9
+ import { OrechidRecipeParser } from "./serializer/orechid";
10
+ import { PureDaisyRecipeParser } from "./serializer/pureDaisy";
11
+ import { RunicAltarRecipeParser } from "./serializer/runicAltar";
12
+ import { TerraPlateRecipeParser } from "./serializer/terraPlate";
13
+ export function registerParsers(event) {
14
+ event.register("botania:nbt_output_wrapper", new NbtWrapperRecipeParser());
15
+ event.register("botania:orechid", new OrechidRecipeParser());
16
+ event.register("botania:orechid_ignem", new OrechidRecipeParser());
17
+ event.register("botania:marimorphosis", new OrechidRecipeParser());
18
+ event.register("botania:pure_daisy", new PureDaisyRecipeParser());
19
+ event.register("botania:state_copying_pure_daisy", new PureDaisyRecipeParser());
20
+ event.register("botania:mana_upgrade", new ShapedParser());
21
+ event.register("botania:water_bottle_matching_shaped", new ShapedParser());
22
+ event.register("botania:runic_altar", new RunicAltarRecipeParser());
23
+ event.register("botania:runic_altar_head", new RunicAltarRecipeParser());
24
+ event.register("botania:terra_plate", new TerraPlateRecipeParser());
25
+ event.register("botania:elven_trade", new ElvenTradeRecipeParser());
26
+ event.register("botania:brew", new BrewRecipeParser());
27
+ event.register("botania:twig_wand", new ShapedParser());
28
+ event.register("botania:mana_infusion", new ManaInfusionRecipeParser());
29
+ event.register("botania:mana_upgrade_shapeless", new ShapelessParser());
30
+ event.register("botania:armor_upgrade", new ShapedParser());
31
+ event.register("botania:gog_alternation", new GogWrapperRecipeParser());
32
+ event.register("botania:petal_apothecary", new ApothecaryRecipeParser());
33
+ }
34
+ //# sourceMappingURL=registration.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registration.js","sourceRoot":"","sources":["../src/registration.ts"],"names":[],"mappings":"AAAA,OAAO,EAA6B,MAAM,kCAAkC,CAAC;AAC7E,OAAO,EACL,YAAY,EACZ,eAAe,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AK,CAAC,QAAQ,CAAC,qBAAqB,EAAE,IAAI,sBAAsB,EAAE,CAAC,CAAC;IACpE,KAAK,CAAC,QAAQ,CAAC,0BAA0B,EAAE,IAAI,sBAAsB,EAAE,CAAC,CAAC;IACzE,KAAK,CAAC,QAAQ,CAAC,qBAAqB,EAAE,IAAI,sBAAsB,EAAE,CAAC,CAAC;IACpE,KAAK,CAAC,QAAQ,CAAC,qBAAqB,EAAE,IAAI,sBAAsB,EAAE,CAAC,CAAC;IACpE,KAAK,CAAC,QAAQ,CAAC,cAAc,EAAE,IAAI,gBAAgB,EAAE,CAAC,CAAC;IACvD,KAAK,CAAC,QAAQ,CAAC,mBAAmB,EAAE,IAAI,YAAY,EAAE,CAAC,CAAC;IACxD,KAAK,CAAC,QAAQ,CAAC,uBAAuB,EAAE,IAAI,wBAAwB,EAAE,CAAC,CAAC;IACxE,KAAK,CAAC,QAAQ,CAAC,gCAAgC,EAAE,IAAI,eAAe,EAAE,CAAC,CAAC;IACxE,KAAK,CAAC,QAAQ,CAAC,uBAAuB,EAAE,IAAI,YAAY,EAAE,CAAC,CAAC;IAC5D,KAAK,CAAC,QAAQ,CAAC,yBAAyB,EAAE,IAAI,sBAAsB,EAAE,CAAC,CAAC;IACxE,KAAK,CAAC,QAAQ,CAAC,0BAA0B,EAAE,IAAI,sBAAsB,EAAE,CAAC,CAAC;AAC3E,CAAC"}
@@ -0,0 +1,20 @@
1
+ import { type Ingredient, type Result } from "@adeficior/data-modifier-ingredients";
2
+ import { Recipe, RecipeParser, type RecipeDefinition, type RecipeModifier, type RecipeParseContext } from "@adeficior/data-modifier-recipes";
3
+ export type ApothecaryRecipeDefinition = RecipeDefinition & Readonly<{
4
+ ingredients: unknown[];
5
+ output: unknown;
6
+ reagent: unknown;
7
+ }>;
8
+ export declare class ApothecaryRecipe extends Recipe {
9
+ protected readonly ingredients: Ingredient[];
10
+ protected readonly result: Result;
11
+ protected readonly reagent: Ingredient;
12
+ constructor(ingredients: Ingredient[], result: Result, reagent: Ingredient);
13
+ getIngredients(): Ingredient[];
14
+ getResults(): Result[];
15
+ modify(modifier: RecipeModifier): ApothecaryRecipe;
16
+ serialize(context: RecipeParseContext): Partial<ApothecaryRecipeDefinition>;
17
+ }
18
+ export declare class ApothecaryRecipeParser extends RecipeParser<ApothecaryRecipeDefinition, ApothecaryRecipe> {
19
+ deserialize(definition: ApothecaryRecipeDefinition, context: RecipeParseContext): ApothecaryRecipe;
20
+ }
@@ -0,0 +1,38 @@
1
+ import {} from "@adeficior/data-modifier-ingredients";
2
+ import { Recipe, RecipeParser, } from "@adeficior/data-modifier-recipes";
3
+ export class ApothecaryRecipe extends Recipe {
4
+ ingredients;
5
+ result;
6
+ reagent;
7
+ constructor(ingredients, result, reagent) {
8
+ super();
9
+ this.ingredients = ingredients;
10
+ this.result = result;
11
+ this.reagent = reagent;
12
+ }
13
+ getIngredients() {
14
+ return [...this.ingredients, this.reagent];
15
+ }
16
+ getResults() {
17
+ return [this.result];
18
+ }
19
+ modify(modifier) {
20
+ return new ApothecaryRecipe(this.ingredients.map(modifier.ingredient), modifier.result(this.result), modifier.ingredient(this.reagent));
21
+ }
22
+ serialize(context) {
23
+ return {
24
+ ingredients: context.ingredients.serializeList(this.ingredients),
25
+ output: context.results.serialize(this.result),
26
+ reagent: context.ingredients.serialize(this.reagent),
27
+ };
28
+ }
29
+ }
30
+ export class ApothecaryRecipeParser extends RecipeParser {
31
+ deserialize(definition, context) {
32
+ const ingredients = context.ingredients.deserializeList(definition.ingredients);
33
+ const result = context.results.deserialize(definition.output);
34
+ const reagent = context.ingredients.deserialize(definition.ingredients);
35
+ return new ApothecaryRecipe(ingredients, result, reagent);
36
+ }
37
+ }
38
+ //# sourceMappingURL=apothecary.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"apothecary.js","sourceRoot":"","sources":["../../src/serializer/apothecary.ts"],"names":[],"mappings":"AAAA,OAAO,EAGN,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EACL,MAAM,EACN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U,CAAC,MAAM,CAAC,CAAC;QAC9D,MAAM,OAAO,GAAG,OAAO,CAAC,WAAW,CAAC,WAAW,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;QACxE,OAAO,IAAI,gBAAgB,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;IAC5D,CAAC;CACF"}
@@ -0,0 +1,17 @@
1
+ import { OneToOneRecipe, RecipeParser, type RecipeDefinition, type RecipeParseContext } from "@adeficior/data-modifier-recipes";
2
+ export type BotaniaBlockRecipeDefinition = RecipeDefinition & Readonly<{
3
+ input: unknown;
4
+ output: unknown;
5
+ }>;
6
+ export declare class BotaniaBlockRecipe extends OneToOneRecipe {
7
+ serialize(context: RecipeParseContext): Partial<BotaniaBlockRecipeDefinition>;
8
+ }
9
+ export declare class BotaniaBlockRecipeParser<TDefinition extends BotaniaBlockRecipeDefinition> extends RecipeParser<TDefinition, BotaniaBlockRecipe> {
10
+ resultModules(): {
11
+ 15: import("@adeficior/data-modifier-core/serializer").SerializerModule<import("@adeficior/data-modifier-ingredients").Result, unknown>;
12
+ };
13
+ ingredientModules(): {
14
+ 15: import("@adeficior/data-modifier-core/serializer").SerializerModule<import("@adeficior/data-modifier-ingredients").Ingredient, unknown>;
15
+ };
16
+ deserialize(definition: TDefinition, context: RecipeParseContext): BotaniaBlockRecipe;
17
+ }
@@ -0,0 +1,24 @@
1
+ import { OneToOneRecipe, RecipeParser, } from "@adeficior/data-modifier-recipes";
2
+ import { ingredientSerializerModules, resultSerializerModules } from "./module";
3
+ export class BotaniaBlockRecipe extends OneToOneRecipe {
4
+ serialize(context) {
5
+ return {
6
+ output: context.results.serialize(this.result),
7
+ input: context.ingredients.serialize(this.ingredient),
8
+ };
9
+ }
10
+ }
11
+ export class BotaniaBlockRecipeParser extends RecipeParser {
12
+ resultModules() {
13
+ return resultSerializerModules;
14
+ }
15
+ ingredientModules() {
16
+ return ingredientSerializerModules;
17
+ }
18
+ deserialize(definition, context) {
19
+ const ingredient = context.ingredients.deserialize(definition.input);
20
+ const result = context.results.deserialize(definition.output);
21
+ return new BotaniaBlockRecipe(ingredient, result);
22
+ }
23
+ }
24
+ //# sourceMappingURL=blocks.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"blocks.js","sourceRoot":"","sources":["../../src/serializer/blocks.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,YAAY,GAGb,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,2BAA2B,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAC;AAQhF,MAAM,OAAO,kBAAmB,SAAQ,cAAc;IAC3C,SAAS,CAChB,OAA2B;QAE3B,OAAO;YACL,MAAM,EAAE,OAAO,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC;YAC9C,KAAK,EAAE,OAAO,CAAC,WAAW,CAAC,SAAS,CAAC,IAAI,CAAC,UAAU,CAAC;SACtD,CAAC;IACJ,CAAC;CACF;AAED,MAAM,OAAO,wBAEX,SAAQ,YAA6C;IAC5C,aAAa;QACpB,OAAO,uBAAuB,CAAC;IACjC,CAAC;IAEQ,iBAAiB;QACxB,OAAO,2BAA2B,CAAC;IACrC,CAAC;IAED,WAAW,CACT,UAAuB,EACvB,OAA2B;QAE3B,MAAM,UAAU,GAAG,OAAO,CAAC,WAAW,CAAC,WAAW,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;QACrE,MAAM,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;QAC9D,OAAO,IAAI,kBAAkB,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;IACpD,CAAC;CACF"}
@@ -0,0 +1,17 @@
1
+ import { type Ingredient } from "@adeficior/data-modifier-ingredients";
2
+ import { Recipe, RecipeParser, type RecipeDefinition, type RecipeModifier, type RecipeParseContext } from "@adeficior/data-modifier-recipes";
3
+ export type BrewRecipeDefinition = RecipeDefinition & Readonly<{
4
+ ingredients: unknown[];
5
+ brew: string;
6
+ }>;
7
+ export declare class BrewRecipe extends Recipe {
8
+ private readonly ingredients;
9
+ constructor(ingredients: Ingredient[]);
10
+ getIngredients(): Ingredient[];
11
+ getResults(): never[];
12
+ modify(modifier: RecipeModifier): BrewRecipe;
13
+ serialize(context: RecipeParseContext): Partial<BrewRecipeDefinition>;
14
+ }
15
+ export declare class BrewRecipeParser extends RecipeParser<BrewRecipeDefinition, BrewRecipe> {
16
+ deserialize(definition: BrewRecipeDefinition, context: RecipeParseContext): BrewRecipe;
17
+ }
@@ -0,0 +1,30 @@
1
+ import {} from "@adeficior/data-modifier-ingredients";
2
+ import { Recipe, RecipeParser, } from "@adeficior/data-modifier-recipes";
3
+ export class BrewRecipe extends Recipe {
4
+ ingredients;
5
+ constructor(ingredients) {
6
+ super();
7
+ this.ingredients = ingredients;
8
+ }
9
+ getIngredients() {
10
+ return this.ingredients;
11
+ }
12
+ getResults() {
13
+ return [];
14
+ }
15
+ modify(modifier) {
16
+ return new BrewRecipe(this.ingredients.map(modifier.ingredient));
17
+ }
18
+ serialize(context) {
19
+ return {
20
+ ingredients: context.ingredients.serializeList(this.ingredients),
21
+ };
22
+ }
23
+ }
24
+ export class BrewRecipeParser extends RecipeParser {
25
+ deserialize(definition, context) {
26
+ const ingredients = context.ingredients.deserializeList(definition.ingredients);
27
+ return new BrewRecipe(ingredients);
28
+ }
29
+ }
30
+ //# sourceMappingURL=brew.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"brew.js","sourceRoot":"","sources":["../../src/serializer/brew.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,MAAM,sCAAsC,CAAC;AACvE,OAAO,EACL,MAAM,EACN,YAAY,GAIb,MAAM,kCAAkC,CAAC;AAQ1C,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,MAAM,CAAC,QAAwB;QACtC,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,eAAe,CACrD,UAAU,CAAC,WAAW,CACvB,CAAC;QACF,OAAO,IAAI,UAAU,CAAC,WAAW,CAAC,CAAC;IACrC,CAAC;CACF"}
@@ -0,0 +1,12 @@
1
+ import { ManyToManyRecipe, RecipeParser, type RecipeDefinition, type RecipeParseContext } from "@adeficior/data-modifier-recipes";
2
+ export type ElvenTradeRecipeDefinition = RecipeDefinition & Readonly<{
3
+ ingredients: unknown[];
4
+ output: unknown[];
5
+ mana?: number;
6
+ }>;
7
+ export declare class ElvenTradeRecipe extends ManyToManyRecipe {
8
+ serialize(context: RecipeParseContext): Partial<ElvenTradeRecipeDefinition>;
9
+ }
10
+ export declare class ElvenTradeRecipeParser extends RecipeParser<ElvenTradeRecipeDefinition, ElvenTradeRecipe> {
11
+ deserialize(definition: ElvenTradeRecipeDefinition, context: RecipeParseContext): ElvenTradeRecipe;
12
+ }
@@ -0,0 +1,15 @@
1
+ import { ManyToManyRecipe, RecipeParser, } from "@adeficior/data-modifier-recipes";
2
+ export class ElvenTradeRecipe extends ManyToManyRecipe {
3
+ serialize(context) {
4
+ const { results, ...rest } = super.serialize(context);
5
+ return { ...rest, output: results };
6
+ }
7
+ }
8
+ export class ElvenTradeRecipeParser extends RecipeParser {
9
+ deserialize(definition, context) {
10
+ const ingredients = context.ingredients.deserializeList(definition.ingredients);
11
+ const results = context.results.deserializeList(definition.output);
12
+ return new ElvenTradeRecipe(ingredients, results);
13
+ }
14
+ }
15
+ //# sourceMappingURL=elvenTrade.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"elvenTrade.js","sourceRoot":"","sources":["../../src/serializer/elvenTrade.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,YAAY,GAGb,MAAM,kCAAkC,CAAC;AAS1C,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,eAAe,CACrD,UAAU,CAAC,WAAW,CACvB,CAAC;QACF,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,eAAe,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;QACnE,OAAO,IAAI,gBAAgB,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;IACpD,CAAC;CACF"}
@@ -0,0 +1,19 @@
1
+ import { type RecipeDefinition, type RecipeHolder, type RecipeModifier, type RecipeParseContext } from "@adeficior/data-modifier-recipes";
2
+ import { Recipe, RecipeParser } from "@adeficior/data-modifier-recipes";
3
+ export type GogWrapperRecipeDefinition = RecipeDefinition & Readonly<{
4
+ nbt: string;
5
+ base: RecipeDefinition;
6
+ gog: RecipeDefinition;
7
+ }>;
8
+ export declare class GogWrapperRecipe extends Recipe {
9
+ private readonly base;
10
+ private readonly gog;
11
+ constructor(base: RecipeHolder, gog: RecipeHolder);
12
+ getIngredients(): import("@adeficior/data-modifier-ingredients").Ingredient[];
13
+ getResults(): import("@adeficior/data-modifier-ingredients").Result[];
14
+ modify(modifier: RecipeModifier): GogWrapperRecipe;
15
+ serialize(context: RecipeParseContext): Partial<GogWrapperRecipeDefinition>;
16
+ }
17
+ export declare class GogWrapperRecipeParser extends RecipeParser<GogWrapperRecipeDefinition, GogWrapperRecipe> {
18
+ deserialize(definition: GogWrapperRecipeDefinition, context: RecipeParseContext): GogWrapperRecipe;
19
+ }
@@ -0,0 +1,34 @@
1
+ import {} from "@adeficior/data-modifier-recipes";
2
+ import { Recipe, RecipeParser } from "@adeficior/data-modifier-recipes";
3
+ export class GogWrapperRecipe extends Recipe {
4
+ base;
5
+ gog;
6
+ constructor(base, gog) {
7
+ super();
8
+ this.base = base;
9
+ this.gog = gog;
10
+ }
11
+ getIngredients() {
12
+ return [...this.base.getIngredients(), ...this.gog.getIngredients()];
13
+ }
14
+ getResults() {
15
+ return [...this.base.getResults(), ...this.gog.getResults()];
16
+ }
17
+ modify(modifier) {
18
+ return new GogWrapperRecipe(this.base.modify(modifier), this.gog.modify(modifier));
19
+ }
20
+ serialize(context) {
21
+ return {
22
+ base: context.recipes.serialize(this.base),
23
+ gog: context.recipes.serialize(this.gog),
24
+ };
25
+ }
26
+ }
27
+ export class GogWrapperRecipeParser extends RecipeParser {
28
+ deserialize(definition, context) {
29
+ const base = context.recipes.deserialize(definition.base);
30
+ const gog = context.recipes.deserialize(definition.gog);
31
+ return new GogWrapperRecipe(base, gog);
32
+ }
33
+ }
34
+ //# sourceMappingURL=gogWrapper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gogWrapper.js","sourceRoot":"","sources":["../../src/serializer/gogWrapper.ts"],"names":[],"mappings":"AAAA,OAAO,EAKN,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,k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CACF"}
@@ -0,0 +1,24 @@
1
+ import { type Ingredient, type Result } from "@adeficior/data-modifier-ingredients";
2
+ import { Recipe, RecipeParser, type RecipeDefinition, type RecipeModifier, type RecipeParseContext } from "@adeficior/data-modifier-recipes";
3
+ export type ManaInfusionRecipeDefinition = RecipeDefinition & Readonly<{
4
+ input: unknown;
5
+ output: unknown;
6
+ catalyst?: unknown;
7
+ mana?: number;
8
+ }>;
9
+ export declare class ManaInfusionRecipe extends Recipe {
10
+ private readonly ingredient;
11
+ private readonly result;
12
+ private readonly catalyst?;
13
+ constructor(ingredient: Ingredient, result: Result, catalyst?: Ingredient | undefined);
14
+ getIngredients(): Ingredient[];
15
+ getResults(): Result[];
16
+ modify(modifier: RecipeModifier): ManaInfusionRecipe;
17
+ serialize(context: RecipeParseContext): Partial<ManaInfusionRecipeDefinition>;
18
+ }
19
+ export declare class ManaInfusionRecipeParser extends RecipeParser<ManaInfusionRecipeDefinition, ManaInfusionRecipe> {
20
+ ingredientModules(): {
21
+ 15: import("@adeficior/data-modifier-core/serializer").SerializerModule<Ingredient, unknown>;
22
+ };
23
+ deserialize(definition: ManaInfusionRecipeDefinition, context: RecipeParseContext): ManaInfusionRecipe;
24
+ }
@@ -0,0 +1,43 @@
1
+ import {} from "@adeficior/data-modifier-ingredients";
2
+ import { Recipe, RecipeParser, } from "@adeficior/data-modifier-recipes";
3
+ import { notNull } from "@adeficior/pack-resolver";
4
+ import { ingredientSerializerModules } from "./module";
5
+ export class ManaInfusionRecipe extends Recipe {
6
+ ingredient;
7
+ result;
8
+ catalyst;
9
+ constructor(ingredient, result, catalyst) {
10
+ super();
11
+ this.ingredient = ingredient;
12
+ this.result = result;
13
+ this.catalyst = catalyst;
14
+ }
15
+ getIngredients() {
16
+ return [this.ingredient, this.catalyst].filter(notNull);
17
+ }
18
+ getResults() {
19
+ return [this.result];
20
+ }
21
+ modify(modifier) {
22
+ return new ManaInfusionRecipe(modifier.ingredient(this.ingredient), modifier.result(this.result), this.catalyst && modifier.ingredient(this.catalyst));
23
+ }
24
+ serialize(context) {
25
+ return {
26
+ input: context.ingredients.serialize(this.ingredient),
27
+ output: context.results.serialize(this.result),
28
+ catalyst: context.ingredients.serializeOptional(this.catalyst),
29
+ };
30
+ }
31
+ }
32
+ export class ManaInfusionRecipeParser extends RecipeParser {
33
+ ingredientModules() {
34
+ return ingredientSerializerModules;
35
+ }
36
+ deserialize(definition, context) {
37
+ const catalyst = context.ingredients.deserializeOptional(definition.catalyst);
38
+ const ingredient = context.ingredients.deserialize(definition.input);
39
+ const result = context.results.deserialize(definition.output);
40
+ return new ManaInfusionRecipe(ingredient, result, catalyst);
41
+ }
42
+ }
43
+ //# sourceMappingURL=manaInfusion.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"manaInfusion.js","sourceRoot":"","sources":["../../src/serializer/manaInfusion.ts"],"names":[],"mappings":"AAAA,OAAO,EAGN,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EACL,MAAM,EACN,YAAY,GAIb,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AACnD,OAAO,EAAE,2BAA2B,EAAE,MAAM,UAAU,CAAC;AAUvD,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,OAAO,CAAC,CAAC;IAC1D,CAAC;IAED,UAAU;QACR,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACvB,CAAC;IAEQ,MAAM,CAAC,QAAwB;QACtC,OAAO,IAAI,kBAAkB,CAC3B,QAAQ,CAAC,UAAU,CAAC,IAAI,CAAC,UAAU,CAAC,EACpC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,EAC5B,IAAI,CAAC,QAAQ,IAAI,QAAQ,CAAC,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,CACpD,CAAC;IACJ,CAAC;IAEQ,SAAS,CAChB,OAA2B;QAE3B,OAAO;YACL,KAAK,EAAE,OAAO,CAAC,WAAW,CAAC,SAAS,CAAC,IAAI,CAAC,UAAU,CAAC;YACrD,MAAM,EAAE,OAAO,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC;YAC9C,QAAQ,EAAE,OAAO,CAAC,WAAW,CAAC,iBAAiB,CAAC,IAAI,CAAC,QAAQ,CAAC;SAC/D,CAAC;IACJ,CAAC;CACF;AAED,MAAM,OAAO,wBAAyB,SAAQ,YAG7C;IACU,iBAAiB;QACxB,OAAO,2BAA2B,CAAC;IACrC,CAAC;IAED,WAAW,CACT,UAAwC,EACxC,OAA2B;QAE3B,MAAM,QAAQ,GAAG,OAAO,CAAC,WAAW,CAAC,mBAAmB,CACtD,UAAU,CAAC,QAAQ,CACpB,CAAC;QACF,MAAM,UAAU,GAAG,OAAO,CAAC,WAAW,CAAC,WAAW,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;QACrE,MAAM,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;QAC9D,OAAO,IAAI,kBAAkB,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC;IAC9D,CAAC;CACF"}
@@ -0,0 +1,7 @@
1
+ import { type Ingredient, type Result } from "@adeficior/data-modifier-ingredients";
2
+ export declare const resultSerializerModules: {
3
+ 15: import("@adeficior/data-modifier-core/serializer").SerializerModule<Result, unknown>;
4
+ };
5
+ export declare const ingredientSerializerModules: {
6
+ 15: import("@adeficior/data-modifier-core/serializer").SerializerModule<Ingredient, unknown>;
7
+ };
@@ -0,0 +1,30 @@
1
+ import { IdSchema } from "@adeficior/data-modifier-core";
2
+ import { createSerializerModule, hasType, } from "@adeficior/data-modifier-core/serializer";
3
+ import { BlockIngredient, BlockResult, BlockTagIngredient, } from "@adeficior/data-modifier-ingredients";
4
+ import * as z from "zod";
5
+ const ingredientSerializer15 = createSerializerModule((builder) => {
6
+ const blockType = "block";
7
+ builder.register(BlockIngredient, hasType(blockType), z.object({
8
+ type: z.literal(blockType),
9
+ block: IdSchema,
10
+ }), ({ block }) => new BlockIngredient(block), ({ id }) => ({ block: id, type: blockType }));
11
+ const tagType = "tag";
12
+ builder.register(BlockTagIngredient, hasType(tagType), z.object({
13
+ type: z.literal(tagType),
14
+ tag: IdSchema,
15
+ }), ({ tag }) => new BlockTagIngredient(tag), ({ tag }) => ({ tag, type: tagType }));
16
+ });
17
+ const resultSerializer15 = createSerializerModule((builder) => {
18
+ const blockType = "block";
19
+ builder.register(BlockResult, hasType(blockType), z.object({
20
+ type: z.literal(blockType),
21
+ block: IdSchema,
22
+ }), ({ block }) => new BlockResult(block), ({ id }) => ({ block: id, type: blockType }));
23
+ });
24
+ export const resultSerializerModules = {
25
+ 15: resultSerializer15,
26
+ };
27
+ export const ingredientSerializerModules = {
28
+ 15: ingredientSerializer15,
29
+ };
30
+ //# sourceMappingURL=module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"module.js","sourceRoot":"","sources":["../../src/serializer/module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AACzD,OAAO,EACL,sBAAsB,EACtB,OAAO,GACR,MAAM,0CAA0C,CAAC;AAClD,OAAO,EACL,eAAe,EACf,WAAW,EACX,kBAAkB,GAGnB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,MAAM,sBAAsB,GAAG,sBAAsB,CAAa,CAAC,OAAO,EAAE,EAAE;IAC5E,M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rC,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,CAC7C,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,EAAE,EAAE,kBAAkB;CACvB,CAAC;AAEF,MAAM,CAAC,MAAM,2BAA2B,GAAG;IACzC,EAAE,EAAE,sBAAsB;CAC3B,CAAC"}
@@ -0,0 +1,17 @@
1
+ import { type RecipeDefinition, type RecipeHolder, type RecipeModifier, type RecipeParseContext } from "@adeficior/data-modifier-recipes";
2
+ import { Recipe, RecipeParser } from "@adeficior/data-modifier-recipes";
3
+ export type NbtWrapperRecipeDefinition = RecipeDefinition & Readonly<{
4
+ nbt: string;
5
+ recipe: RecipeDefinition;
6
+ }>;
7
+ export declare class NbtWrapperRecipe extends Recipe {
8
+ private readonly recipe;
9
+ constructor(recipe: RecipeHolder);
10
+ getIngredients(): import("@adeficior/data-modifier-ingredients").Ingredient[];
11
+ getResults(): import("@adeficior/data-modifier-ingredients").Result[];
12
+ modify(modifier: RecipeModifier): NbtWrapperRecipe;
13
+ serialize(context: RecipeParseContext): Partial<NbtWrapperRecipeDefinition>;
14
+ }
15
+ export declare class NbtWrapperRecipeParser extends RecipeParser<NbtWrapperRecipeDefinition, NbtWrapperRecipe> {
16
+ deserialize(definition: NbtWrapperRecipeDefinition, context: RecipeParseContext): NbtWrapperRecipe;
17
+ }
@@ -0,0 +1,30 @@
1
+ import {} from "@adeficior/data-modifier-recipes";
2
+ import { Recipe, RecipeParser } from "@adeficior/data-modifier-recipes";
3
+ export class NbtWrapperRecipe extends Recipe {
4
+ recipe;
5
+ constructor(recipe) {
6
+ super();
7
+ this.recipe = recipe;
8
+ }
9
+ getIngredients() {
10
+ return this.recipe.getIngredients();
11
+ }
12
+ getResults() {
13
+ return this.recipe.getResults();
14
+ }
15
+ modify(modifier) {
16
+ return new NbtWrapperRecipe(this.recipe.modify(modifier));
17
+ }
18
+ serialize(context) {
19
+ return {
20
+ recipe: context.recipes.serialize(this.recipe),
21
+ };
22
+ }
23
+ }
24
+ export class NbtWrapperRecipeParser extends RecipeParser {
25
+ deserialize(definition, context) {
26
+ const recipe = context.recipes.deserialize(definition.recipe);
27
+ return new NbtWrapperRecipe(recipe);
28
+ }
29
+ }
30
+ //# sourceMappingURL=nbtWrapper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nbtWrapper.js","sourceRoot":"","sources":["../../src/serializer/nbtWrapper.ts"],"names":[],"mappings":"AAAA,OAAO,EAKN,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAQxE,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,MAAM,CAAC,QAAwB;QACtC,OAAO,IAAI,gBAAgB,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC;IAC5D,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"}
@@ -0,0 +1,8 @@
1
+ import { BotaniaBlockRecipeParser, type BotaniaBlockRecipeDefinition } from "./blocks";
2
+ export type OrechidRecipeDefinition = BotaniaBlockRecipeDefinition & Readonly<{
3
+ biome_bonus?: number;
4
+ biome_bonus_tag?: string;
5
+ weight?: number;
6
+ }>;
7
+ export declare class OrechidRecipeParser extends BotaniaBlockRecipeParser<OrechidRecipeDefinition> {
8
+ }
@@ -0,0 +1,4 @@
1
+ import { BotaniaBlockRecipeParser, } from "./blocks";
2
+ export class OrechidRecipeParser extends BotaniaBlockRecipeParser {
3
+ }
4
+ //# sourceMappingURL=orechid.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"orechid.js","sourceRoot":"","sources":["../../src/serializer/orechid.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,GAEzB,MAAM,UAAU,CAAC;AASlB,MAAM,OAAO,mBAAoB,SAAQ,wBAAiD;CAAG"}
@@ -0,0 +1,8 @@
1
+ import { type Result } from "@adeficior/data-modifier-ingredients";
2
+ import { BotaniaBlockRecipeParser, type BotaniaBlockRecipeDefinition } from "./blocks";
3
+ export type PureDaisyRecipeDefinition = BotaniaBlockRecipeDefinition;
4
+ export declare class PureDaisyRecipeParser extends BotaniaBlockRecipeParser<PureDaisyRecipeDefinition> {
5
+ resultModules(): {
6
+ 15: import("@adeficior/data-modifier-core/serializer").SerializerModule<Result, unknown>;
7
+ };
8
+ }
@@ -0,0 +1,19 @@
1
+ import { IdSchema } from "@adeficior/data-modifier-core";
2
+ import { createSerializerModule, isObjectWith, } from "@adeficior/data-modifier-core/serializer";
3
+ import {} from "@adeficior/data-modifier-ingredients";
4
+ import { BlockResult } from "@adeficior/data-modifier-ingredients";
5
+ import * as z from "zod";
6
+ import { BotaniaBlockRecipeParser, } from "./blocks";
7
+ const resultSerializer15 = createSerializerModule((builder) => {
8
+ builder.register(BlockResult, isObjectWith("name"), z.object({
9
+ name: IdSchema,
10
+ }), ({ name }) => new BlockResult(name), ({ id }) => ({ name: id }));
11
+ });
12
+ export class PureDaisyRecipeParser extends BotaniaBlockRecipeParser {
13
+ resultModules() {
14
+ return {
15
+ 15: resultSerializer15,
16
+ };
17
+ }
18
+ }
19
+ //# sourceMappingURL=pureDaisy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pureDaisy.js","sourceRoot":"","sources":["../../src/serializer/pureDaisy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AACzD,OAAO,EACL,sBAAsB,EACtB,YAAY,GACb,MAAM,0CAA0C,CAAC;AAClD,OAAO,EAAe,MAAM,sCAAsC,CAAC;AACnE,OAAO,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AACnE,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,EACL,wBAAwB,GAEzB,MAAM,UAAU,CAAC;AAIlB,MAAM,kBAAkB,GAAG,sBAAsB,CAAS,CAAC,OAAO,EAAE,EAAE;IACpE,OAAO,CAAC,QAAQ,CACd,WAAW,EACX,YAAY,CAAC,MAAM,CAAC,EACpB,CAAC,CAAC,MAAM,CAAC;QACP,IAAI,EAAE,QAAQ;KACf,CAAC,EACF,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,IAAI,WAAW,CAAC,IAAI,CAAC,EACnC,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,CAC3B,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,MAAM,OAAO,qBAAsB,SAAQ,wBAAmD;IACnF,aAAa;QACpB,OAAO;YACL,EAAE,EAAE,kBAAkB;SACvB,CAAC;IACJ,CAAC;CACF"}
@@ -0,0 +1,12 @@
1
+ import { ManyToOneRecipe, RecipeParser, type RecipeDefinition, type RecipeParseContext } from "@adeficior/data-modifier-recipes";
2
+ export type RunicAltarRecipeDefinition = RecipeDefinition & Readonly<{
3
+ ingredients: unknown[];
4
+ output: unknown;
5
+ mana: number;
6
+ }>;
7
+ export declare class RunicAltarRecipe extends ManyToOneRecipe {
8
+ serialize(context: RecipeParseContext): Partial<RunicAltarRecipeDefinition>;
9
+ }
10
+ export declare class RunicAltarRecipeParser extends RecipeParser<RunicAltarRecipeDefinition, RunicAltarRecipe> {
11
+ deserialize(definition: RunicAltarRecipeDefinition, context: RecipeParseContext): RunicAltarRecipe;
12
+ }
@@ -0,0 +1,15 @@
1
+ import { ManyToOneRecipe, RecipeParser, } from "@adeficior/data-modifier-recipes";
2
+ export class RunicAltarRecipe extends ManyToOneRecipe {
3
+ serialize(context) {
4
+ const { result, ...rest } = super.serialize(context);
5
+ return { ...rest, output: result };
6
+ }
7
+ }
8
+ export class RunicAltarRecipeParser extends RecipeParser {
9
+ deserialize(definition, context) {
10
+ const ingredients = context.ingredients.deserializeList(definition.ingredients);
11
+ const result = context.results.deserialize(definition.output);
12
+ return new RunicAltarRecipe(ingredients, result);
13
+ }
14
+ }
15
+ //# sourceMappingURL=runicAltar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runicAltar.js","sourceRoot":"","sources":["../../src/serializer/runicAltar.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,YAAY,GAGb,MAAM,kCAAkC,CAAC;AAS1C,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,eAAe,CACrD,UAAU,CAAC,WAAW,CACvB,CAAC;QACF,MAAM,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;QAC9D,OAAO,IAAI,gBAAgB,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;IACnD,CAAC;CACF"}
@@ -0,0 +1,6 @@
1
+ import { ManyToOneRecipeParser, type ManyToOneRecipeDefinition } from "@adeficior/data-modifier-recipes";
2
+ export type TerraPlateRecipeDefinition = ManyToOneRecipeDefinition & Readonly<{
3
+ mana?: number;
4
+ }>;
5
+ export declare class TerraPlateRecipeParser extends ManyToOneRecipeParser<TerraPlateRecipeDefinition> {
6
+ }
@@ -0,0 +1,4 @@
1
+ import { ManyToOneRecipeParser, } from "@adeficior/data-modifier-recipes";
2
+ export class TerraPlateRecipeParser extends ManyToOneRecipeParser {
3
+ }
4
+ //# sourceMappingURL=terraPlate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"terraPlate.js","sourceRoot":"","sources":["../../src/serializer/terraPlate.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,GAEtB,MAAM,kCAAkC,CAAC;AAM1C,MAAM,OAAO,sBAAuB,SAAQ,qBAAiD;CAAG"}
package/package.json ADDED
@@ -0,0 +1,36 @@
1
+ {
2
+ "name": "@adeficior/data-modifier-botania",
3
+ "version": "2.0.0-rc.20260814115618",
4
+ "exports": {
5
+ ".": "./dist/index.js"
6
+ },
7
+ "types": "./dist/index.d.ts",
8
+ "files": [
9
+ "dist"
10
+ ],
11
+ "type": "module",
12
+ "scripts": {
13
+ "build": "tsc --project tsconfig.build.json",
14
+ "check": "tsc --noEmit",
15
+ "dev": "bun run build --watch",
16
+ "lint": "eslint {src,test}",
17
+ "test": "bun test --timeout 10000",
18
+ "prune": "bun run datamod-dev --prune",
19
+ "prepare": "datamod-dev --configs && datamod-dev --types",
20
+ "test:ci": "bun run lint && bun run check && bun run test --coverage"
21
+ },
22
+ "devDependencies": {
23
+ "@adeficior/configs": "workspace:*",
24
+ "@adeficior/testing": "workspace:*",
25
+ "@adeficior/data-modifier-recipes": "workspace:*"
26
+ },
27
+ "peerDependencies": {
28
+ "@adeficior/pack-resolver": "catalog:",
29
+ "typescript": "catalog:",
30
+ "zod": "catalog:",
31
+ "@adeficior/data-modifier-core": "workspace:*",
32
+ "@adeficior/data-modifier-recipes": "workspace:*",
33
+ "@adeficior/data-modifier-ingredients": "workspace:*",
34
+ "@adeficior/data-modifier-tags": "workspace:*"
35
+ }
36
+ }