zen-flow 2.0.2 → 2.1.1
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 +2 -2
- package/dist/zenflow.cjs +4 -4
- package/dist/zenflow.d.ts +25 -4
- package/dist/zenflow.mjs +4 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -87,7 +87,7 @@ Array.from({ length: 11 })
|
|
|
87
87
|
|
|
88
88
|
## API
|
|
89
89
|
|
|
90
|
-
- Types(#types)
|
|
90
|
+
- [Types](#types)
|
|
91
91
|
- MineCraft
|
|
92
92
|
- [Vanilla](#vanilla)
|
|
93
93
|
- [Crafting patterns](#craftingpatterns)
|
|
@@ -324,4 +324,4 @@ exnihilo.addSieve('<minecraft:cobblestone>', {
|
|
|
324
324
|
- `addTransposerExtract` - Add Fluid Transposer extract recipe
|
|
325
325
|
- `removeTransposerExtract` - Remove Fluid Transposer extract recipe
|
|
326
326
|
|
|
327
|
-
<i>* All bonus properties take a number between 1 and 100</i>
|
|
327
|
+
<i>* All bonus properties take a number between 1 and 100</i>
|
package/dist/zenflow.cjs
CHANGED
|
@@ -213,8 +213,8 @@ const replaceQED = (ingredient, recipe) => [
|
|
|
213
213
|
const addDict = (dict, ids) => ids.map((id) => `${dict}.add(${id});`).join("\n");
|
|
214
214
|
const removeDict = (dict, ids) => ids.map((id) => `${dict}.remove(${id});`).join("\n");
|
|
215
215
|
const withName = (id, name) => `${id}.displayName = ${formatName(name)};`;
|
|
216
|
-
const withTooltip = (id,
|
|
217
|
-
const withTooltipShift = (id,
|
|
216
|
+
const withTooltip = (id, tooltip) => `${id}.addTooltip(${formatTooltip(tooltip)});`;
|
|
217
|
+
const withTooltipShift = (id, tooltip) => `${id}.addShiftTooltip(${formatTooltip(tooltip)});`;
|
|
218
218
|
const withTag = (tag) => (id) => `${id}.withTag(${tag})`;
|
|
219
219
|
const withEnchantment = (enchantments) => withTag(`{ ench: ${formatList(toArray(enchantments).map(formatEnchantment))} }`);
|
|
220
220
|
|
|
@@ -279,8 +279,8 @@ const add = (item, recipe) => {
|
|
|
279
279
|
return `recipes.add${type}(${out});`;
|
|
280
280
|
};
|
|
281
281
|
const remove = (id) => `recipes.remove(${id});`;
|
|
282
|
-
const removeShaped = (id) => `recipes.removeShaped(${id});`;
|
|
283
|
-
const removeShapeless = (id) => `recipes.removeShapeless(${id});`;
|
|
282
|
+
const removeShaped = (id, recipe) => `recipes.removeShaped(${id}${recipe ? `, ${formatRecipe(recipe)}` : ""});`;
|
|
283
|
+
const removeShapeless = (id, recipe) => `recipes.removeShapeless(${id}${recipe ? `, ${formatList(recipe)}` : ""});`;
|
|
284
284
|
const addFurnace = (recipe) => {
|
|
285
285
|
const out = formatArgs(formatIngredient(recipe.out), recipe.in);
|
|
286
286
|
return `furnace.addRecipe(${out});`;
|
package/dist/zenflow.d.ts
CHANGED
|
@@ -157,8 +157,8 @@ declare const addDict: (dict: string, ids: string[]) => string;
|
|
|
157
157
|
*/
|
|
158
158
|
declare const removeDict: (dict: string, ids: string[]) => string;
|
|
159
159
|
declare const withName: (id: string, name: Text) => string;
|
|
160
|
-
declare const withTooltip: (id: string,
|
|
161
|
-
declare const withTooltipShift: (id: string,
|
|
160
|
+
declare const withTooltip: (id: string, tooltip: Text | Text[]) => string;
|
|
161
|
+
declare const withTooltipShift: (id: string, tooltip: Text | Text[]) => string;
|
|
162
162
|
declare const withTag: (tag: string) => (id: string) => string;
|
|
163
163
|
declare const withEnchantment: (enchantments: Enchantment | Enchantment[]) => (id: string) => string;
|
|
164
164
|
|
|
@@ -322,11 +322,32 @@ declare const remove: (id: string) => string;
|
|
|
322
322
|
/**
|
|
323
323
|
* Remove all shaped crafting recipes
|
|
324
324
|
*/
|
|
325
|
-
declare const removeShaped: (id: string
|
|
325
|
+
declare const removeShaped: (id: string, recipe?: Partial<{
|
|
326
|
+
1: string;
|
|
327
|
+
2: string;
|
|
328
|
+
3: string;
|
|
329
|
+
4: string;
|
|
330
|
+
5: string;
|
|
331
|
+
6: string;
|
|
332
|
+
7: string;
|
|
333
|
+
8: string;
|
|
334
|
+
/**
|
|
335
|
+
* Add crafting recipe
|
|
336
|
+
*
|
|
337
|
+
* - Recipe: `{}` => Shaped recipe
|
|
338
|
+
* - Recipe: `[]` => Shapeless recipe
|
|
339
|
+
*/
|
|
340
|
+
9: string;
|
|
341
|
+
corner: string;
|
|
342
|
+
edge: string;
|
|
343
|
+
ring: string;
|
|
344
|
+
square: string;
|
|
345
|
+
center: string;
|
|
346
|
+
}> | undefined) => string;
|
|
326
347
|
/**
|
|
327
348
|
* Remove all shapeless crafting recipes
|
|
328
349
|
*/
|
|
329
|
-
declare const removeShapeless: (id: string) => string;
|
|
350
|
+
declare const removeShapeless: (id: string, recipe?: RecipeShapeless | undefined) => string;
|
|
330
351
|
declare const addFurnace: (recipe: RecipeFurnace) => string;
|
|
331
352
|
/**
|
|
332
353
|
* Remove furnace recipe
|
package/dist/zenflow.mjs
CHANGED
|
@@ -209,8 +209,8 @@ const replaceQED = (ingredient, recipe) => [
|
|
|
209
209
|
const addDict = (dict, ids) => ids.map((id) => `${dict}.add(${id});`).join("\n");
|
|
210
210
|
const removeDict = (dict, ids) => ids.map((id) => `${dict}.remove(${id});`).join("\n");
|
|
211
211
|
const withName = (id, name) => `${id}.displayName = ${formatName(name)};`;
|
|
212
|
-
const withTooltip = (id,
|
|
213
|
-
const withTooltipShift = (id,
|
|
212
|
+
const withTooltip = (id, tooltip) => `${id}.addTooltip(${formatTooltip(tooltip)});`;
|
|
213
|
+
const withTooltipShift = (id, tooltip) => `${id}.addShiftTooltip(${formatTooltip(tooltip)});`;
|
|
214
214
|
const withTag = (tag) => (id) => `${id}.withTag(${tag})`;
|
|
215
215
|
const withEnchantment = (enchantments) => withTag(`{ ench: ${formatList(toArray(enchantments).map(formatEnchantment))} }`);
|
|
216
216
|
|
|
@@ -275,8 +275,8 @@ const add = (item, recipe) => {
|
|
|
275
275
|
return `recipes.add${type}(${out});`;
|
|
276
276
|
};
|
|
277
277
|
const remove = (id) => `recipes.remove(${id});`;
|
|
278
|
-
const removeShaped = (id) => `recipes.removeShaped(${id});`;
|
|
279
|
-
const removeShapeless = (id) => `recipes.removeShapeless(${id});`;
|
|
278
|
+
const removeShaped = (id, recipe) => `recipes.removeShaped(${id}${recipe ? `, ${formatRecipe(recipe)}` : ""});`;
|
|
279
|
+
const removeShapeless = (id, recipe) => `recipes.removeShapeless(${id}${recipe ? `, ${formatList(recipe)}` : ""});`;
|
|
280
280
|
const addFurnace = (recipe) => {
|
|
281
281
|
const out = formatArgs(formatIngredient(recipe.out), recipe.in);
|
|
282
282
|
return `furnace.addRecipe(${out});`;
|