zen-flow 2.1.1 → 2.2.0
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/README.md +5 -4
- package/dist/zenflow.cjs +12 -2
- package/dist/zenflow.d.ts +5 -1
- package/dist/zenflow.mjs +12 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<a href="/LICENSE">
|
|
7
7
|
<img alt="License MIT" src="https://img.shields.io/badge/license-MIT-blue.svg" />
|
|
8
8
|
</a>
|
|
9
|
-
<a href="
|
|
9
|
+
<a href="https://www.npmjs.com/package/zen-flow">
|
|
10
10
|
<img alt="NPM - ZenFlow" src="https://img.shields.io/npm/v/zen-flow" />
|
|
11
11
|
</a>
|
|
12
12
|
</div>
|
|
@@ -74,7 +74,7 @@ Array.from({ length: 11 })
|
|
|
74
74
|
.map(generator => [
|
|
75
75
|
vanilla.remove(generator),
|
|
76
76
|
nei.hide(generator)
|
|
77
|
-
].join('\n'))
|
|
77
|
+
].join('\n'));
|
|
78
78
|
|
|
79
79
|
/**
|
|
80
80
|
* recipes.remove(<ExtraUtilities:generator>);
|
|
@@ -82,7 +82,7 @@ Array.from({ length: 11 })
|
|
|
82
82
|
* [...]
|
|
83
83
|
* recipes.remove(<ExtraUtilities:generator.64:10>);
|
|
84
84
|
* NEI.hide(<ExtraUtilities:generator.64:10>);
|
|
85
|
-
|
|
85
|
+
**/
|
|
86
86
|
```
|
|
87
87
|
|
|
88
88
|
## API
|
|
@@ -90,7 +90,7 @@ Array.from({ length: 11 })
|
|
|
90
90
|
- [Types](#types)
|
|
91
91
|
- MineCraft
|
|
92
92
|
- [Vanilla](#vanilla)
|
|
93
|
-
- [Crafting patterns](#
|
|
93
|
+
- [Crafting patterns](#crafting-patterns)
|
|
94
94
|
- [Items](#items)
|
|
95
95
|
- [Formatting](#formatting)
|
|
96
96
|
- Mods
|
|
@@ -152,6 +152,7 @@ type Text = string | TextRich;
|
|
|
152
152
|
- `add` - Add a crafting table recipe.
|
|
153
153
|
- Shaped recipe: `object`
|
|
154
154
|
- Shapeless recipe: `Array`
|
|
155
|
+
- `addMirror` - Adds a shaped crafting table recipe with mirrored variant.
|
|
155
156
|
- `remove` - Removes both shaped and shapeless recipes
|
|
156
157
|
- `removeShaped` - Removes only shaped recipes
|
|
157
158
|
- `removeShapeless` - Removes only shaped recipes
|
package/dist/zenflow.cjs
CHANGED
|
@@ -145,9 +145,14 @@ const formatRecipe = (recipe) => {
|
|
|
145
145
|
recipe.ring || recipe.corner || recipe[7],
|
|
146
146
|
recipe.ring || recipe.edge || recipe[8],
|
|
147
147
|
recipe.ring || recipe.corner || recipe[9]
|
|
148
|
-
]]
|
|
148
|
+
]];
|
|
149
|
+
if (!matrix[0][2] && !matrix[1][2] && matrix[2].every((x) => !x)) {
|
|
150
|
+
matrix[0].splice(-1);
|
|
151
|
+
matrix[1].splice(-1);
|
|
152
|
+
matrix.splice(-1);
|
|
153
|
+
}
|
|
149
154
|
return `[
|
|
150
|
-
${matrix.join(",\n ")}
|
|
155
|
+
${matrix.map((row) => formatList(row.map(formatId))).join(",\n ")}
|
|
151
156
|
]`;
|
|
152
157
|
};
|
|
153
158
|
const formatArgs = (...args) => {
|
|
@@ -278,6 +283,10 @@ const add = (item, recipe) => {
|
|
|
278
283
|
const out = formatArgs(formatIngredient(item), Array.isArray(recipe) ? formatList(recipe) : formatRecipe(recipe));
|
|
279
284
|
return `recipes.add${type}(${out});`;
|
|
280
285
|
};
|
|
286
|
+
const addMirror = (item, recipe) => {
|
|
287
|
+
const out = formatArgs(formatIngredient(item), formatRecipe(recipe));
|
|
288
|
+
return `recipes.addShapedMirrored(${out});`;
|
|
289
|
+
};
|
|
281
290
|
const remove = (id) => `recipes.remove(${id});`;
|
|
282
291
|
const removeShaped = (id, recipe) => `recipes.removeShaped(${id}${recipe ? `, ${formatRecipe(recipe)}` : ""});`;
|
|
283
292
|
const removeShapeless = (id, recipe) => `recipes.removeShapeless(${id}${recipe ? `, ${formatList(recipe)}` : ""});`;
|
|
@@ -320,6 +329,7 @@ exports.addFurnaceThermal = addFurnace$1;
|
|
|
320
329
|
exports.addHammer = addHammer;
|
|
321
330
|
exports.addInsolator = addInsolator;
|
|
322
331
|
exports.addLaser = addLaser;
|
|
332
|
+
exports.addMirror = addMirror;
|
|
323
333
|
exports.addNEI = addNEI;
|
|
324
334
|
exports.addPulverizer = addPulverizer;
|
|
325
335
|
exports.addQED = addQED;
|
package/dist/zenflow.d.ts
CHANGED
|
@@ -315,6 +315,10 @@ declare type RecipeFurnace = {
|
|
|
315
315
|
* - Recipe: `[]` => Shapeless recipe
|
|
316
316
|
*/
|
|
317
317
|
declare const add: (item: Ingredient, recipe: Recipe) => string;
|
|
318
|
+
/**
|
|
319
|
+
* Add shaped crafint recipe with mirror
|
|
320
|
+
*/
|
|
321
|
+
declare const addMirror: (item: Ingredient, recipe: RecipeShaped) => string;
|
|
318
322
|
/**
|
|
319
323
|
* Remove all crafting recipes (shaped & shapeless)
|
|
320
324
|
*/
|
|
@@ -372,4 +376,4 @@ declare const replace: (ingredient: Ingredient, recipe: Recipe) => string;
|
|
|
372
376
|
declare const replaceAll: (ingredient: Ingredient, recipe: Recipe) => string;
|
|
373
377
|
declare const replaceMany: (ingredient: Ingredient, recipes: Recipe[]) => string;
|
|
374
378
|
|
|
375
|
-
export { Enchantment, Ingredient, Recipe, RecipeShaped, RecipeShapeless, Stack, Text, TextRich, add, addComposter, addCompressor, addCrucible$1 as addCrucibleNihilo, addCrucibleSource, addCrucible as addCrucibleThermal, addDict, addExtreme, addFoci, addFurnace, addFurnace$1 as addFurnaceThermal, addHammer, addInsolator, addLaser, addNEI, addPulverizer, addQED, addSawmill, addSieve, addSmelter, addTransposerExtract, addTransposerFill, hide, remove, removeComposter, removeCompressor, removeCrucible$1 as removeCrucibleNihilo, removeCrucibleSource, removeCrucible as removeCrucibleThermal, removeDict, removeExtreme, removeFoci, removeFurnace, removeFurnace$1 as removeFurnaceThermal, removeHammer, removeInsolator, removeLaser, removePulverizer, removeQED, removeSawmill, removeShaped, removeShapeless, removeSieve, removeSmelter, removeTransposerExtract, removeTransposerFill, replace, replaceAll, replaceMany, replaceQED, withEnchantment, withName, withTag, withTooltip, withTooltipShift };
|
|
379
|
+
export { Enchantment, Ingredient, Recipe, RecipeShaped, RecipeShapeless, Stack, Text, TextRich, add, addComposter, addCompressor, addCrucible$1 as addCrucibleNihilo, addCrucibleSource, addCrucible as addCrucibleThermal, addDict, addExtreme, addFoci, addFurnace, addFurnace$1 as addFurnaceThermal, addHammer, addInsolator, addLaser, addMirror, addNEI, addPulverizer, addQED, addSawmill, addSieve, addSmelter, addTransposerExtract, addTransposerFill, hide, remove, removeComposter, removeCompressor, removeCrucible$1 as removeCrucibleNihilo, removeCrucibleSource, removeCrucible as removeCrucibleThermal, removeDict, removeExtreme, removeFoci, removeFurnace, removeFurnace$1 as removeFurnaceThermal, removeHammer, removeInsolator, removeLaser, removePulverizer, removeQED, removeSawmill, removeShaped, removeShapeless, removeSieve, removeSmelter, removeTransposerExtract, removeTransposerFill, replace, replaceAll, replaceMany, replaceQED, withEnchantment, withName, withTag, withTooltip, withTooltipShift };
|
package/dist/zenflow.mjs
CHANGED
|
@@ -141,9 +141,14 @@ const formatRecipe = (recipe) => {
|
|
|
141
141
|
recipe.ring || recipe.corner || recipe[7],
|
|
142
142
|
recipe.ring || recipe.edge || recipe[8],
|
|
143
143
|
recipe.ring || recipe.corner || recipe[9]
|
|
144
|
-
]]
|
|
144
|
+
]];
|
|
145
|
+
if (!matrix[0][2] && !matrix[1][2] && matrix[2].every((x) => !x)) {
|
|
146
|
+
matrix[0].splice(-1);
|
|
147
|
+
matrix[1].splice(-1);
|
|
148
|
+
matrix.splice(-1);
|
|
149
|
+
}
|
|
145
150
|
return `[
|
|
146
|
-
${matrix.join(",\n ")}
|
|
151
|
+
${matrix.map((row) => formatList(row.map(formatId))).join(",\n ")}
|
|
147
152
|
]`;
|
|
148
153
|
};
|
|
149
154
|
const formatArgs = (...args) => {
|
|
@@ -274,6 +279,10 @@ const add = (item, recipe) => {
|
|
|
274
279
|
const out = formatArgs(formatIngredient(item), Array.isArray(recipe) ? formatList(recipe) : formatRecipe(recipe));
|
|
275
280
|
return `recipes.add${type}(${out});`;
|
|
276
281
|
};
|
|
282
|
+
const addMirror = (item, recipe) => {
|
|
283
|
+
const out = formatArgs(formatIngredient(item), formatRecipe(recipe));
|
|
284
|
+
return `recipes.addShapedMirrored(${out});`;
|
|
285
|
+
};
|
|
277
286
|
const remove = (id) => `recipes.remove(${id});`;
|
|
278
287
|
const removeShaped = (id, recipe) => `recipes.removeShaped(${id}${recipe ? `, ${formatRecipe(recipe)}` : ""});`;
|
|
279
288
|
const removeShapeless = (id, recipe) => `recipes.removeShapeless(${id}${recipe ? `, ${formatList(recipe)}` : ""});`;
|
|
@@ -302,4 +311,4 @@ const replaceMany = (ingredient, recipes) => [
|
|
|
302
311
|
...recipes.map((recipe) => add(ingredient, recipe))
|
|
303
312
|
].join("\n");
|
|
304
313
|
|
|
305
|
-
export { add, addComposter, addCompressor, addCrucible$1 as addCrucibleNihilo, addCrucibleSource, addCrucible as addCrucibleThermal, addDict, addExtreme, addFoci, addFurnace, addFurnace$1 as addFurnaceThermal, addHammer, addInsolator, addLaser, addNEI, addPulverizer, addQED, addSawmill, addSieve, addSmelter, addTransposerExtract, addTransposerFill, hide, remove, removeComposter, removeCompressor, removeCrucible$1 as removeCrucibleNihilo, removeCrucibleSource, removeCrucible as removeCrucibleThermal, removeDict, removeExtreme, removeFoci, removeFurnace, removeFurnace$1 as removeFurnaceThermal, removeHammer, removeInsolator, removeLaser, removePulverizer, removeQED, removeSawmill, removeShaped, removeShapeless, removeSieve, removeSmelter, removeTransposerExtract, removeTransposerFill, replace, replaceAll, replaceMany, replaceQED, withEnchantment, withName, withTag, withTooltip, withTooltipShift };
|
|
314
|
+
export { add, addComposter, addCompressor, addCrucible$1 as addCrucibleNihilo, addCrucibleSource, addCrucible as addCrucibleThermal, addDict, addExtreme, addFoci, addFurnace, addFurnace$1 as addFurnaceThermal, addHammer, addInsolator, addLaser, addMirror, addNEI, addPulverizer, addQED, addSawmill, addSieve, addSmelter, addTransposerExtract, addTransposerFill, hide, remove, removeComposter, removeCompressor, removeCrucible$1 as removeCrucibleNihilo, removeCrucibleSource, removeCrucible as removeCrucibleThermal, removeDict, removeExtreme, removeFoci, removeFurnace, removeFurnace$1 as removeFurnaceThermal, removeHammer, removeInsolator, removeLaser, removePulverizer, removeQED, removeSawmill, removeShaped, removeShapeless, removeSieve, removeSmelter, removeTransposerExtract, removeTransposerFill, replace, replaceAll, replaceMany, replaceQED, withEnchantment, withName, withTag, withTooltip, withTooltipShift };
|