@adeficior/data-modifier 1.0.0-rc.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/codegen/registry.d.ts +3 -0
- package/dist/cli/codegen/registry.js +81 -0
- package/dist/cli/codegen/registry.js.map +1 -0
- package/dist/cli/config.d.ts +10 -0
- package/dist/cli/config.js +60 -0
- package/dist/cli/config.js.map +1 -0
- package/dist/cli/index.d.ts +1 -0
- package/dist/cli/index.js +34 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/common/id.d.ts +15 -0
- package/dist/common/id.js +42 -0
- package/dist/common/id.js.map +1 -0
- package/dist/common/ingredient.d.ts +49 -0
- package/dist/common/ingredient.js +108 -0
- package/dist/common/ingredient.js.map +1 -0
- package/dist/common/predicates.d.ts +7 -0
- package/dist/common/predicates.js +32 -0
- package/dist/common/predicates.js.map +1 -0
- package/dist/common/registry.d.ts +12 -0
- package/dist/common/registry.js +36 -0
- package/dist/common/registry.js.map +1 -0
- package/dist/common/result.d.ts +48 -0
- package/dist/common/result.js +37 -0
- package/dist/common/result.js.map +1 -0
- package/dist/emit/assets/blockstates.d.ts +18 -0
- package/dist/emit/assets/blockstates.js +46 -0
- package/dist/emit/assets/blockstates.js.map +1 -0
- package/dist/emit/assets/lang.d.ts +33 -0
- package/dist/emit/assets/lang.js +103 -0
- package/dist/emit/assets/lang.js.map +1 -0
- package/dist/emit/assets/models.d.ts +24 -0
- package/dist/emit/assets/models.js +59 -0
- package/dist/emit/assets/models.js.map +1 -0
- package/dist/emit/blacklist.d.ts +32 -0
- package/dist/emit/blacklist.js +99 -0
- package/dist/emit/blacklist.js.map +1 -0
- package/dist/emit/content/blockDefinition.d.ts +58 -0
- package/dist/emit/content/blockDefinition.js +58 -0
- package/dist/emit/content/blockDefinition.js.map +1 -0
- package/dist/emit/content/innerBlockDefinition.d.ts +12 -0
- package/dist/emit/content/innerBlockDefinition.js +32 -0
- package/dist/emit/content/innerBlockDefinition.js.map +1 -0
- package/dist/emit/content/itemDefinition.d.ts +58 -0
- package/dist/emit/content/itemDefinition.js +54 -0
- package/dist/emit/content/itemDefinition.js.map +1 -0
- package/dist/emit/custom.d.ts +15 -0
- package/dist/emit/custom.js +42 -0
- package/dist/emit/custom.js.map +1 -0
- package/dist/emit/data/loot.d.ts +48 -0
- package/dist/emit/data/loot.js +108 -0
- package/dist/emit/data/loot.js.map +1 -0
- package/dist/emit/data/recipe.d.ts +46 -0
- package/dist/emit/data/recipe.js +106 -0
- package/dist/emit/data/recipe.js.map +1 -0
- package/dist/emit/data/tags.d.ts +38 -0
- package/dist/emit/data/tags.js +115 -0
- package/dist/emit/data/tags.js.map +1 -0
- package/dist/emit/index.d.ts +11 -0
- package/dist/emit/index.js +1 -0
- package/dist/emit/index.js.map +1 -0
- package/dist/emit/polytoneTabs.d.ts +65 -0
- package/dist/emit/polytoneTabs.js +101 -0
- package/dist/emit/polytoneTabs.js.map +1 -0
- package/dist/emit/rule/index.d.ts +10 -0
- package/dist/emit/rule/index.js +10 -0
- package/dist/emit/rule/index.js.map +1 -0
- package/dist/emit/rule/lootTable.d.ts +14 -0
- package/dist/emit/rule/lootTable.js +47 -0
- package/dist/emit/rule/lootTable.js.map +1 -0
- package/dist/emit/rule/recipe.d.ts +16 -0
- package/dist/emit/rule/recipe.js +29 -0
- package/dist/emit/rule/recipe.js.map +1 -0
- package/dist/emit/ruled.d.ts +18 -0
- package/dist/emit/ruled.js +47 -0
- package/dist/emit/ruled.js.map +1 -0
- package/dist/error.d.ts +12 -0
- package/dist/error.js +45 -0
- package/dist/error.js.map +1 -0
- package/dist/index.d.ts +31 -0
- package/dist/index.js +12 -0
- package/dist/index.js.map +1 -0
- package/dist/loader/index.d.ts +16 -0
- package/dist/loader/index.js +40 -0
- package/dist/loader/index.js.map +1 -0
- package/dist/loader/lang.d.ts +7 -0
- package/dist/loader/lang.js +12 -0
- package/dist/loader/lang.js.map +1 -0
- package/dist/loader/loot.d.ts +7 -0
- package/dist/loader/loot.js +12 -0
- package/dist/loader/loot.js.map +1 -0
- package/dist/loader/pack.d.ts +62 -0
- package/dist/loader/pack.js +131 -0
- package/dist/loader/pack.js.map +1 -0
- package/dist/loader/recipe.d.ts +25 -0
- package/dist/loader/recipe.js +207 -0
- package/dist/loader/recipe.js.map +1 -0
- package/dist/loader/registry/dump.d.ts +19 -0
- package/dist/loader/registry/dump.js +74 -0
- package/dist/loader/registry/dump.js.map +1 -0
- package/dist/loader/registry/empty.d.ts +11 -0
- package/dist/loader/registry/empty.js +22 -0
- package/dist/loader/registry/empty.js.map +1 -0
- package/dist/loader/registry/index.d.ts +11 -0
- package/dist/loader/registry/index.js +1 -0
- package/dist/loader/registry/index.js.map +1 -0
- package/dist/loader/tags.d.ts +26 -0
- package/dist/loader/tags.js +131 -0
- package/dist/loader/tags.js.map +1 -0
- package/dist/parser/adAstra.d.ts +11 -0
- package/dist/parser/adAstra.js +6 -0
- package/dist/parser/adAstra.js.map +1 -0
- package/dist/parser/botania.d.ts +20 -0
- package/dist/parser/botania.js +11 -0
- package/dist/parser/botania.js.map +1 -0
- package/dist/parser/create.d.ts +4 -0
- package/dist/parser/create.js +3 -0
- package/dist/parser/create.js.map +1 -0
- package/dist/parser/farmersdelight.d.ts +4 -0
- package/dist/parser/farmersdelight.js +3 -0
- package/dist/parser/farmersdelight.js.map +1 -0
- package/dist/parser/index.d.ts +13 -0
- package/dist/parser/index.js +8 -0
- package/dist/parser/index.js.map +1 -0
- package/dist/parser/lootTable.d.ts +7 -0
- package/dist/parser/lootTable.js +70 -0
- package/dist/parser/lootTable.js.map +1 -0
- package/dist/parser/recipe/adAstra/conversion.d.ts +20 -0
- package/dist/parser/recipe/adAstra/conversion.js +33 -0
- package/dist/parser/recipe/adAstra/conversion.js.map +1 -0
- package/dist/parser/recipe/adAstra/hammering.d.ts +18 -0
- package/dist/parser/recipe/adAstra/hammering.js +27 -0
- package/dist/parser/recipe/adAstra/hammering.js.map +1 -0
- package/dist/parser/recipe/adAstra/index.d.ts +5 -0
- package/dist/parser/recipe/adAstra/index.js +1 -0
- package/dist/parser/recipe/adAstra/index.js.map +1 -0
- package/dist/parser/recipe/adAstra/inputOutput.d.ts +24 -0
- package/dist/parser/recipe/adAstra/inputOutput.js +42 -0
- package/dist/parser/recipe/adAstra/inputOutput.js.map +1 -0
- package/dist/parser/recipe/adAstra/nasaWorkbench.d.ts +20 -0
- package/dist/parser/recipe/adAstra/nasaWorkbench.js +30 -0
- package/dist/parser/recipe/adAstra/nasaWorkbench.js.map +1 -0
- package/dist/parser/recipe/adAstra/spaceStation.d.ts +19 -0
- package/dist/parser/recipe/adAstra/spaceStation.js +27 -0
- package/dist/parser/recipe/adAstra/spaceStation.js.map +1 -0
- package/dist/parser/recipe/botania/apothecary.d.ts +19 -0
- package/dist/parser/recipe/botania/apothecary.js +28 -0
- package/dist/parser/recipe/botania/apothecary.js.map +1 -0
- package/dist/parser/recipe/botania/brew.d.ts +18 -0
- package/dist/parser/recipe/botania/brew.js +24 -0
- package/dist/parser/recipe/botania/brew.js.map +1 -0
- package/dist/parser/recipe/botania/elvenTrade.d.ts +19 -0
- package/dist/parser/recipe/botania/elvenTrade.js +27 -0
- package/dist/parser/recipe/botania/elvenTrade.js.map +1 -0
- package/dist/parser/recipe/botania/gogWrapper.d.ts +22 -0
- package/dist/parser/recipe/botania/gogWrapper.js +34 -0
- package/dist/parser/recipe/botania/gogWrapper.js.map +1 -0
- package/dist/parser/recipe/botania/manaInfusion.d.ts +21 -0
- package/dist/parser/recipe/botania/manaInfusion.js +33 -0
- package/dist/parser/recipe/botania/manaInfusion.js.map +1 -0
- package/dist/parser/recipe/botania/nbtWrapper.d.ts +20 -0
- package/dist/parser/recipe/botania/nbtWrapper.js +30 -0
- package/dist/parser/recipe/botania/nbtWrapper.js.map +1 -0
- package/dist/parser/recipe/botania/orechid.d.ts +35 -0
- package/dist/parser/recipe/botania/orechid.js +74 -0
- package/dist/parser/recipe/botania/orechid.js.map +1 -0
- package/dist/parser/recipe/botania/pureDaisy.d.ts +19 -0
- package/dist/parser/recipe/botania/pureDaisy.js +30 -0
- package/dist/parser/recipe/botania/pureDaisy.js.map +1 -0
- package/dist/parser/recipe/botania/runicAltar.d.ts +19 -0
- package/dist/parser/recipe/botania/runicAltar.js +27 -0
- package/dist/parser/recipe/botania/runicAltar.js.map +1 -0
- package/dist/parser/recipe/botania/terraPlate.d.ts +19 -0
- package/dist/parser/recipe/botania/terraPlate.js +27 -0
- package/dist/parser/recipe/botania/terraPlate.js.map +1 -0
- package/dist/parser/recipe/create/assembly.d.ts +25 -0
- package/dist/parser/recipe/create/assembly.js +45 -0
- package/dist/parser/recipe/create/assembly.js.map +1 -0
- package/dist/parser/recipe/create/processing.d.ts +21 -0
- package/dist/parser/recipe/create/processing.js +27 -0
- package/dist/parser/recipe/create/processing.js.map +1 -0
- package/dist/parser/recipe/farmersdelight/cooking.d.ts +22 -0
- package/dist/parser/recipe/farmersdelight/cooking.js +29 -0
- package/dist/parser/recipe/farmersdelight/cooking.js.map +1 -0
- package/dist/parser/recipe/farmersdelight/cutting.d.ts +23 -0
- package/dist/parser/recipe/farmersdelight/cutting.js +38 -0
- package/dist/parser/recipe/farmersdelight/cutting.js.map +1 -0
- package/dist/parser/recipe/forge/conditional.d.ts +25 -0
- package/dist/parser/recipe/forge/conditional.js +45 -0
- package/dist/parser/recipe/forge/conditional.js.map +1 -0
- package/dist/parser/recipe/ignored.d.ts +10 -0
- package/dist/parser/recipe/ignored.js +16 -0
- package/dist/parser/recipe/ignored.js.map +1 -0
- package/dist/parser/recipe/index.d.ts +19 -0
- package/dist/parser/recipe/index.js +22 -0
- package/dist/parser/recipe/index.js.map +1 -0
- package/dist/parser/recipe/quark/exclusion.d.ts +20 -0
- package/dist/parser/recipe/quark/exclusion.js +32 -0
- package/dist/parser/recipe/quark/exclusion.js.map +1 -0
- package/dist/parser/recipe/roots/component.d.ts +18 -0
- package/dist/parser/recipe/roots/component.js +24 -0
- package/dist/parser/recipe/roots/component.js.map +1 -0
- package/dist/parser/recipe/roots/ritual.d.ts +22 -0
- package/dist/parser/recipe/roots/ritual.js +32 -0
- package/dist/parser/recipe/roots/ritual.js.map +1 -0
- package/dist/parser/recipe/sullys/polishing.d.ts +19 -0
- package/dist/parser/recipe/sullys/polishing.js +27 -0
- package/dist/parser/recipe/sullys/polishing.js.map +1 -0
- package/dist/parser/recipe/thermal/catalyst.d.ts +22 -0
- package/dist/parser/recipe/thermal/catalyst.js +24 -0
- package/dist/parser/recipe/thermal/catalyst.js.map +1 -0
- package/dist/parser/recipe/thermal/fuel.d.ts +18 -0
- package/dist/parser/recipe/thermal/fuel.js +24 -0
- package/dist/parser/recipe/thermal/fuel.js.map +1 -0
- package/dist/parser/recipe/thermal/index.d.ts +22 -0
- package/dist/parser/recipe/thermal/index.js +36 -0
- package/dist/parser/recipe/thermal/index.js.map +1 -0
- package/dist/parser/recipe/thermal/ingredient.d.ts +21 -0
- package/dist/parser/recipe/thermal/ingredient.js +43 -0
- package/dist/parser/recipe/thermal/ingredient.js.map +1 -0
- package/dist/parser/recipe/thermal/treeExtraction.d.ts +24 -0
- package/dist/parser/recipe/thermal/treeExtraction.js +47 -0
- package/dist/parser/recipe/thermal/treeExtraction.js.map +1 -0
- package/dist/parser/recipe/vanilla/shaped.d.ts +19 -0
- package/dist/parser/recipe/vanilla/shaped.js +28 -0
- package/dist/parser/recipe/vanilla/shaped.js.map +1 -0
- package/dist/parser/recipe/vanilla/shapeless.d.ts +18 -0
- package/dist/parser/recipe/vanilla/shapeless.js +27 -0
- package/dist/parser/recipe/vanilla/shapeless.js.map +1 -0
- package/dist/parser/recipe/vanilla/smelting.d.ts +19 -0
- package/dist/parser/recipe/vanilla/smelting.js +27 -0
- package/dist/parser/recipe/vanilla/smelting.js.map +1 -0
- package/dist/parser/recipe/vanilla/smithing.d.ts +19 -0
- package/dist/parser/recipe/vanilla/smithing.js +28 -0
- package/dist/parser/recipe/vanilla/smithing.js.map +1 -0
- package/dist/parser/recipe/vanilla/stonecutting.d.ts +20 -0
- package/dist/parser/recipe/vanilla/stonecutting.js +36 -0
- package/dist/parser/recipe/vanilla/stonecutting.js.map +1 -0
- package/dist/parser/roots.d.ts +4 -0
- package/dist/parser/roots.js +3 -0
- package/dist/parser/roots.js.map +1 -0
- package/dist/parser/thermal.d.ts +10 -0
- package/dist/parser/thermal.js +6 -0
- package/dist/parser/thermal.js.map +1 -0
- package/dist/schema/assets/blockstate.d.ts +10 -0
- package/dist/schema/assets/blockstate.js +1 -0
- package/dist/schema/assets/blockstate.js.map +1 -0
- package/dist/schema/assets/lang.d.ts +3 -0
- package/dist/schema/assets/lang.js +3 -0
- package/dist/schema/assets/lang.js.map +1 -0
- package/dist/schema/assets/model.d.ts +27 -0
- package/dist/schema/assets/model.js +1 -0
- package/dist/schema/assets/model.js.map +1 -0
- package/dist/schema/content/blockDefinition.d.ts +11 -0
- package/dist/schema/content/blockDefinition.js +1 -0
- package/dist/schema/content/blockDefinition.js.map +1 -0
- package/dist/schema/content/itemDefinition.d.ts +14 -0
- package/dist/schema/content/itemDefinition.js +1 -0
- package/dist/schema/content/itemDefinition.js.map +1 -0
- package/dist/schema/data/loot.d.ts +1151 -0
- package/dist/schema/data/loot.js +76 -0
- package/dist/schema/data/loot.js.map +1 -0
- package/dist/schema/data/recipe.d.ts +13 -0
- package/dist/schema/data/recipe.js +1 -0
- package/dist/schema/data/recipe.js.map +1 -0
- package/dist/schema/data/tag.d.ts +11 -0
- package/dist/schema/data/tag.js +6 -0
- package/dist/schema/data/tag.js.map +1 -0
- package/dist/stubTypes.d.ts +7 -0
- package/dist/stubTypes.js +1 -0
- package/dist/stubTypes.js.map +1 -0
- package/dist/textHelper.d.ts +3 -0
- package/dist/textHelper.js +20 -0
- package/dist/textHelper.js.map +1 -0
- package/package.json +96 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import RecipeParser, { Recipe } from "../index.js";
|
|
2
|
+
export class ShapelessRecipe extends Recipe {
|
|
3
|
+
getIngredients() {
|
|
4
|
+
return this.definition.ingredients;
|
|
5
|
+
}
|
|
6
|
+
getResults() {
|
|
7
|
+
return [this.definition.result];
|
|
8
|
+
}
|
|
9
|
+
replaceIngredient(replace) {
|
|
10
|
+
return new ShapelessRecipe({
|
|
11
|
+
...this.definition,
|
|
12
|
+
ingredients: this.definition.ingredients.map(replace),
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
replaceResult(replace) {
|
|
16
|
+
return new ShapelessRecipe({
|
|
17
|
+
...this.definition,
|
|
18
|
+
result: replace(this.definition.result),
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
export default class ShapelessParser extends RecipeParser {
|
|
23
|
+
create(definition) {
|
|
24
|
+
return new ShapelessRecipe(definition);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=shapeless.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shapeless.js","sourceRoot":"","sources":["../../../../src/parser/recipe/vanilla/shapeless.ts"],"names":[],"mappings":"AACA,OAAO,YAAY,EAAE,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAcnD,MAAM,OAAO,eAAgB,SAAQ,MAAiC;IACpE,cAAc;QACZ,OAAO,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC;IACrC,CAAC;IAED,UAAU;QACR,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;IAClC,CAAC;IAED,iBAAiB,CAAC,OAA6B;QAC7C,OAAO,IAAI,eAAe,CAAC;YACzB,GAAG,IAAI,CAAC,UAAU;YAClB,WAAW,EAAE,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,GAAG,CAAC,OAAO,CAAC;SACtD,CAAC,CAAC;IACL,CAAC;IAED,aAAa,CAAC,OAAyB;QACrC,OAAO,IAAI,eAAe,CAAC;YACzB,GAAG,IAAI,CAAC,UAAU;YAClB,MAAM,EAAE,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC;SACxC,CAAC,CAAC;IACL,CAAC;CACF;AAED,MAAM,CAAC,OAAO,OAAO,eAAgB,SAAQ,YAG5C;IACC,MAAM,CAAC,UAAqC;QAC1C,OAAO,IAAI,eAAe,CAAC,UAAU,CAAC,CAAC;IACzC,CAAC;CACF"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { Replacer } from "../index.js";
|
|
2
|
+
import RecipeParser, { Recipe } from "../index.js";
|
|
3
|
+
import type { Ingredient, IngredientInput } from "../../../common/ingredient.js";
|
|
4
|
+
import type { RecipeDefinition } from "../../../schema/data/recipe.js";
|
|
5
|
+
import type { Result, ResultInput } from "../../../common/result.js";
|
|
6
|
+
export type SmeltingRecipeDefinition = RecipeDefinition & Readonly<{
|
|
7
|
+
ingredient: Ingredient;
|
|
8
|
+
result: Result;
|
|
9
|
+
experience?: number;
|
|
10
|
+
}>;
|
|
11
|
+
export declare class SmeltingRecipe extends Recipe<SmeltingRecipeDefinition> {
|
|
12
|
+
getIngredients(): IngredientInput[];
|
|
13
|
+
getResults(): ResultInput[];
|
|
14
|
+
replaceIngredient(replace: Replacer<Ingredient>): Recipe;
|
|
15
|
+
replaceResult(replace: Replacer<Result>): Recipe;
|
|
16
|
+
}
|
|
17
|
+
export default class SmeltingParser extends RecipeParser<SmeltingRecipeDefinition, SmeltingRecipe> {
|
|
18
|
+
create(definition: SmeltingRecipeDefinition): SmeltingRecipe;
|
|
19
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import RecipeParser, { Recipe } from "../index.js";
|
|
2
|
+
export class SmeltingRecipe extends Recipe {
|
|
3
|
+
getIngredients() {
|
|
4
|
+
return [this.definition.ingredient];
|
|
5
|
+
}
|
|
6
|
+
getResults() {
|
|
7
|
+
return [this.definition.result];
|
|
8
|
+
}
|
|
9
|
+
replaceIngredient(replace) {
|
|
10
|
+
return new SmeltingRecipe({
|
|
11
|
+
...this.definition,
|
|
12
|
+
ingredient: replace(this.definition.ingredient),
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
replaceResult(replace) {
|
|
16
|
+
return new SmeltingRecipe({
|
|
17
|
+
...this.definition,
|
|
18
|
+
result: replace(this.definition.result),
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
export default class SmeltingParser extends RecipeParser {
|
|
23
|
+
create(definition) {
|
|
24
|
+
return new SmeltingRecipe(definition);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=smelting.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"smelting.js","sourceRoot":"","sources":["../../../../src/parser/recipe/vanilla/smelting.ts"],"names":[],"mappings":"AACA,OAAO,YAAY,EAAE,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAenD,MAAM,OAAO,cAAe,SAAQ,MAAgC;IAClE,cAAc;QACZ,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;IACtC,CAAC;IAED,UAAU;QACR,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;IAClC,CAAC;IAED,iBAAiB,CAAC,OAA6B;QAC7C,OAAO,IAAI,cAAc,CAAC;YACxB,GAAG,IAAI,CAAC,UAAU;YAClB,UAAU,EAAE,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC;SAChD,CAAC,CAAC;IACL,CAAC;IAED,aAAa,CAAC,OAAyB;QACrC,OAAO,IAAI,cAAc,CAAC;YACxB,GAAG,IAAI,CAAC,UAAU;YAClB,MAAM,EAAE,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC;SACxC,CAAC,CAAC;IACL,CAAC;CACF;AAED,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,YAG3C;IACC,MAAM,CAAC,UAAoC;QACzC,OAAO,IAAI,cAAc,CAAC,UAAU,CAAC,CAAC;IACxC,CAAC;CACF"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { Replacer } from "../index.js";
|
|
2
|
+
import RecipeParser, { Recipe } from "../index.js";
|
|
3
|
+
import type { Ingredient, IngredientInput } from "../../../common/ingredient.js";
|
|
4
|
+
import type { RecipeDefinition } from "../../../schema/data/recipe.js";
|
|
5
|
+
import type { Result, ResultInput } from "../../../common/result.js";
|
|
6
|
+
export type SmithingRecipeDefinition = RecipeDefinition & Readonly<{
|
|
7
|
+
base: Ingredient;
|
|
8
|
+
addition: Ingredient;
|
|
9
|
+
result: Result;
|
|
10
|
+
}>;
|
|
11
|
+
export declare class SmithingRecipe extends Recipe<SmithingRecipeDefinition> {
|
|
12
|
+
getIngredients(): IngredientInput[];
|
|
13
|
+
getResults(): ResultInput[];
|
|
14
|
+
replaceIngredient(replace: Replacer<Ingredient>): Recipe;
|
|
15
|
+
replaceResult(replace: Replacer<Result>): Recipe;
|
|
16
|
+
}
|
|
17
|
+
export default class SmithingParser extends RecipeParser<SmithingRecipeDefinition, SmithingRecipe> {
|
|
18
|
+
create(definition: SmithingRecipeDefinition): SmithingRecipe;
|
|
19
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import RecipeParser, { Recipe } from "../index.js";
|
|
2
|
+
export class SmithingRecipe extends Recipe {
|
|
3
|
+
getIngredients() {
|
|
4
|
+
return [this.definition.base, this.definition.addition];
|
|
5
|
+
}
|
|
6
|
+
getResults() {
|
|
7
|
+
return [this.definition.result];
|
|
8
|
+
}
|
|
9
|
+
replaceIngredient(replace) {
|
|
10
|
+
return new SmithingRecipe({
|
|
11
|
+
...this.definition,
|
|
12
|
+
base: replace(this.definition.base),
|
|
13
|
+
addition: replace(this.definition.addition),
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
replaceResult(replace) {
|
|
17
|
+
return new SmithingRecipe({
|
|
18
|
+
...this.definition,
|
|
19
|
+
result: replace(this.definition.result),
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
export default class SmithingParser extends RecipeParser {
|
|
24
|
+
create(definition) {
|
|
25
|
+
return new SmithingRecipe(definition);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=smithing.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"smithing.js","sourceRoot":"","sources":["../../../../src/parser/recipe/vanilla/smithing.ts"],"names":[],"mappings":"AACA,OAAO,YAAY,EAAE,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAenD,MAAM,OAAO,cAAe,SAAQ,MAAgC;IAClE,cAAc;QACZ,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;IAC1D,CAAC;IAED,UAAU;QACR,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;IAClC,CAAC;IAED,iBAAiB,CAAC,OAA6B;QAC7C,OAAO,IAAI,cAAc,CAAC;YACxB,GAAG,IAAI,CAAC,UAAU;YAClB,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC;YACnC,QAAQ,EAAE,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC;SAC5C,CAAC,CAAC;IACL,CAAC;IAED,aAAa,CAAC,OAAyB;QACrC,OAAO,IAAI,cAAc,CAAC;YACxB,GAAG,IAAI,CAAC,UAAU;YAClB,MAAM,EAAE,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC;SACxC,CAAC,CAAC;IACL,CAAC;CACF;AAED,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,YAG3C;IACC,MAAM,CAAC,UAAoC;QACzC,OAAO,IAAI,cAAc,CAAC,UAAU,CAAC,CAAC;IACxC,CAAC;CACF"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { ItemId } from "@adeficior/data-modifier/generated";
|
|
2
|
+
import type { Ingredient, IngredientInput } from "../../../common/ingredient.js";
|
|
3
|
+
import type { Result, ResultInput } from "../../../common/result.js";
|
|
4
|
+
import type { RecipeDefinition } from "../../../schema/data/recipe.js";
|
|
5
|
+
import type { Replacer } from "../index.js";
|
|
6
|
+
import RecipeParser, { Recipe } from "../index.js";
|
|
7
|
+
export type StonecuttingRecipeDefinition = RecipeDefinition & Readonly<{
|
|
8
|
+
ingredient: Ingredient;
|
|
9
|
+
result: ItemId;
|
|
10
|
+
count?: number;
|
|
11
|
+
}>;
|
|
12
|
+
export declare class StonecuttingRecipe extends Recipe<StonecuttingRecipeDefinition> {
|
|
13
|
+
getIngredients(): IngredientInput[];
|
|
14
|
+
getResults(): ResultInput[];
|
|
15
|
+
replaceIngredient(replace: Replacer<Ingredient>): Recipe;
|
|
16
|
+
replaceResult(replace: Replacer<Result>): Recipe;
|
|
17
|
+
}
|
|
18
|
+
export default class StonecuttingParser extends RecipeParser<StonecuttingRecipeDefinition, StonecuttingRecipe> {
|
|
19
|
+
create(definition: StonecuttingRecipeDefinition): StonecuttingRecipe;
|
|
20
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { encodeId } from "../../../common/id.js";
|
|
2
|
+
import { createResult } from "../../../common/result.js";
|
|
3
|
+
import { IllegalShapeError } from "../../../error.js";
|
|
4
|
+
import RecipeParser, { Recipe } from "../index.js";
|
|
5
|
+
export class StonecuttingRecipe extends Recipe {
|
|
6
|
+
getIngredients() {
|
|
7
|
+
return [this.definition.ingredient];
|
|
8
|
+
}
|
|
9
|
+
getResults() {
|
|
10
|
+
return [
|
|
11
|
+
{ item: encodeId(this.definition.result), count: this.definition.count },
|
|
12
|
+
];
|
|
13
|
+
}
|
|
14
|
+
replaceIngredient(replace) {
|
|
15
|
+
return new StonecuttingRecipe({
|
|
16
|
+
...this.definition,
|
|
17
|
+
ingredient: replace(this.definition.ingredient),
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
replaceResult(replace) {
|
|
21
|
+
const result = createResult(replace);
|
|
22
|
+
if (!("item" in result))
|
|
23
|
+
throw new IllegalShapeError("stonecutting does only support item results", result);
|
|
24
|
+
return new StonecuttingRecipe({
|
|
25
|
+
...this.definition,
|
|
26
|
+
result: result.item,
|
|
27
|
+
count: result.count ?? 1,
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
export default class StonecuttingParser extends RecipeParser {
|
|
32
|
+
create(definition) {
|
|
33
|
+
return new StonecuttingRecipe(definition);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=stonecutting.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stonecutting.js","sourceRoot":"","sources":["../../../../src/parser/recipe/vanilla/stonecutting.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAMjD,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAGtD,OAAO,YAAY,EAAE,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AASnD,MAAM,OAAO,kBAAmB,SAAQ,MAAoC;IAC1E,cAAc;QACZ,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;IACtC,CAAC;IAED,UAAU;QACR,OAAO;YACL,EAAE,IAAI,EAAE,QAAQ,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE;SACzE,CAAC;IACJ,CAAC;IAED,iBAAiB,CAAC,OAA6B;QAC7C,OAAO,IAAI,kBAAkB,CAAC;YAC5B,GAAG,IAAI,CAAC,UAAU;YAClB,UAAU,EAAE,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC;SAChD,CAAC,CAAC;IACL,CAAC;IAED,aAAa,CAAC,OAAyB;QACrC,MAAM,MAAM,GAAG,YAAY,CAAC,OAAO,CAAC,CAAC;QACrC,IAAI,CAAC,CAAC,MAAM,IAAI,MAAM,CAAC;YACrB,MAAM,IAAI,iBAAiB,CACzB,6CAA6C,EAC7C,MAAM,CACP,CAAC;QAEJ,OAAO,IAAI,kBAAkB,CAAC;YAC5B,GAAG,IAAI,CAAC,UAAU;YAClB,MAAM,EAAE,MAAM,CAAC,IAAI;YACnB,KAAK,EAAE,MAAM,CAAC,KAAK,IAAI,CAAC;SACzB,CAAC,CAAC;IACL,CAAC;CACF;AAED,MAAM,CAAC,OAAO,OAAO,kBAAmB,SAAQ,YAG/C;IACC,MAAM,CAAC,UAAwC;QAC7C,OAAO,IAAI,kBAAkB,CAAC,UAAU,CAAC,CAAC;IAC5C,CAAC;CACF"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export type { RootRitualRecipeDefinition } from "./recipe/roots/ritual.js";
|
|
2
|
+
export { RootRitualRecipe, default as RootRitualRecipeParser, } from "./recipe/roots/ritual.js";
|
|
3
|
+
export type { RootComponentRecipeDefinition } from "./recipe/roots/component.js";
|
|
4
|
+
export { RootComponentRecipe, default as RootComponentRecipeParser, } from "./recipe/roots/component.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"roots.js","sourceRoot":"","sources":["../../src/parser/roots.ts"],"names":[],"mappings":"AACA,OAAO,EACL,gBAAgB,EAChB,OAAO,IAAI,sBAAsB,GAClC,MAAM,0BAA0B,CAAC;AAElC,OAAO,EACL,mBAAmB,EACnB,OAAO,IAAI,yBAAyB,GACrC,MAAM,6BAA6B,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export type { ThermalRecipeDefinition } from "./recipe/thermal/index.js";
|
|
2
|
+
export { ThermalRecipe, default as ThermalRecipeParser, } from "./recipe/thermal/index.js";
|
|
3
|
+
export type { TreeExtractionRecipeDefinition } from "./recipe/thermal/treeExtraction.js";
|
|
4
|
+
export { TreeExtractionRecipe, default as TreeExtractionRecipeParser, } from "./recipe/thermal/treeExtraction.js";
|
|
5
|
+
export type { ThermalCatalystRecipeDefinition } from "./recipe/thermal/catalyst.js";
|
|
6
|
+
export { ThermalCatalystRecipe, default as ThermalCatalystRecipeParser, } from "./recipe/thermal/catalyst.js";
|
|
7
|
+
export type { ThermalFuelRecipeDefinition } from "./recipe/thermal/fuel.js";
|
|
8
|
+
export { ThermalFuelRecipe, default as ThermalFuelRecipeParser, } from "./recipe/thermal/fuel.js";
|
|
9
|
+
export type { ThermalIngredientInput } from "./recipe/thermal/ingredient.js";
|
|
10
|
+
export { fromThermalIngredient, toThermalIngredient, } from "./recipe/thermal/ingredient.js";
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { ThermalRecipe, default as ThermalRecipeParser, } from "./recipe/thermal/index.js";
|
|
2
|
+
export { TreeExtractionRecipe, default as TreeExtractionRecipeParser, } from "./recipe/thermal/treeExtraction.js";
|
|
3
|
+
export { ThermalCatalystRecipe, default as ThermalCatalystRecipeParser, } from "./recipe/thermal/catalyst.js";
|
|
4
|
+
export { ThermalFuelRecipe, default as ThermalFuelRecipeParser, } from "./recipe/thermal/fuel.js";
|
|
5
|
+
export { fromThermalIngredient, toThermalIngredient, } from "./recipe/thermal/ingredient.js";
|
|
6
|
+
//# sourceMappingURL=thermal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"thermal.js","sourceRoot":"","sources":["../../src/parser/thermal.ts"],"names":[],"mappings":"AACA,OAAO,EACL,aAAa,EACb,OAAO,IAAI,mBAAmB,GAC/B,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EACL,oBAAoB,EACpB,OAAO,IAAI,0BAA0B,GACtC,MAAM,oCAAoC,CAAC;AAE5C,OAAO,EACL,qBAAqB,EACrB,OAAO,IAAI,2BAA2B,GACvC,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EACL,iBAAiB,EACjB,OAAO,IAAI,uBAAuB,GACnC,MAAM,0BAA0B,CAAC;AAElC,OAAO,EACL,qBAAqB,EACrB,mBAAmB,GACpB,MAAM,gCAAgC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=blockstate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"blockstate.js","sourceRoot":"","sources":["../../../src/schema/assets/blockstate.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lang.js","sourceRoot":"","sources":["../../../src/schema/assets/lang.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,KAAK,CAAC;AAEtB,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,EAAE,EAAE,GAAG,CAAC,MAAM,EAAE,CAAC,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
type Facing = "up" | "down" | "north" | "south" | "west" | "east";
|
|
2
|
+
type Axis = "x" | "y" | "z";
|
|
3
|
+
type Vec3 = [number, number, number];
|
|
4
|
+
type Vec4 = [number, number, number, number];
|
|
5
|
+
type Element = Readonly<{
|
|
6
|
+
from: Vec3;
|
|
7
|
+
to: Vec3;
|
|
8
|
+
faces: Record<Facing, {
|
|
9
|
+
texture: string;
|
|
10
|
+
uv?: Vec4;
|
|
11
|
+
cullface?: Facing;
|
|
12
|
+
}>;
|
|
13
|
+
rotation?: {
|
|
14
|
+
origin: Vec3;
|
|
15
|
+
axis: Axis;
|
|
16
|
+
angle: number;
|
|
17
|
+
rescale?: boolean;
|
|
18
|
+
};
|
|
19
|
+
shade?: boolean;
|
|
20
|
+
}>;
|
|
21
|
+
export type Model = Readonly<{
|
|
22
|
+
parent?: string;
|
|
23
|
+
textures?: Record<string, string>;
|
|
24
|
+
elements?: Element[];
|
|
25
|
+
ambientocclusion?: boolean;
|
|
26
|
+
}>;
|
|
27
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=model.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"model.js","sourceRoot":"","sources":["../../../src/schema/assets/model.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export type BlockProperties = Readonly<{
|
|
2
|
+
material?: string;
|
|
3
|
+
strength?: number;
|
|
4
|
+
}>;
|
|
5
|
+
export type BlockDefinition = Readonly<{
|
|
6
|
+
type: string;
|
|
7
|
+
properties: BlockProperties | string;
|
|
8
|
+
}>;
|
|
9
|
+
export type CogBlockDefinition = BlockDefinition & Readonly<{
|
|
10
|
+
large?: boolean;
|
|
11
|
+
}>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=blockDefinition.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"blockDefinition.js","sourceRoot":"","sources":["../../../src/schema/content/blockDefinition.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { BlockDefinition } from "./blockDefinition.js";
|
|
2
|
+
export type Rarity = "common" | "rare";
|
|
3
|
+
export type ItemProperties = Readonly<{
|
|
4
|
+
rarity?: Rarity;
|
|
5
|
+
stack_size?: number;
|
|
6
|
+
creative_tab?: string;
|
|
7
|
+
}>;
|
|
8
|
+
export type ItemDefinition = Readonly<{
|
|
9
|
+
type: string;
|
|
10
|
+
properties?: ItemProperties;
|
|
11
|
+
}>;
|
|
12
|
+
export type BlockItemDefinition = ItemDefinition & Readonly<{
|
|
13
|
+
block: BlockDefinition;
|
|
14
|
+
}>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=itemDefinition.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"itemDefinition.js","sourceRoot":"","sources":["../../../src/schema/content/itemDefinition.ts"],"names":[],"mappings":""}
|