zen-flow 1.4.1 → 1.6.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 +1 -0
- package/dist/zenflow.cjs +9 -7
- package/dist/zenflow.d.ts +34 -17
- package/dist/zenflow.mjs +9 -8
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -166,6 +166,7 @@ Shaped crafting recipes support the following shorthand patterns, in order:
|
|
|
166
166
|
- `withTooltipShift` - Add shift item tooltip*
|
|
167
167
|
- `withTag` - Add item NBT tag data
|
|
168
168
|
- [Display properties](https://minecraft.fandom.com/wiki/Player.dat_format#Display_Properties)
|
|
169
|
+
- `withEnchantment` - Add item enchantment
|
|
169
170
|
- `withEnchantments` - Add item enchantments
|
|
170
171
|
|
|
171
172
|
<i>* It is currently not possible to remove item tooltips.</i>
|
package/dist/zenflow.cjs
CHANGED
|
@@ -209,6 +209,7 @@ const withName = (ingredient, name) => `${ingredient}.displayName = ${formatName
|
|
|
209
209
|
const withTooltip = (ingredient, tooltip) => `${ingredient}.addTooltip(${formatTooltip(tooltip)});`;
|
|
210
210
|
const withTooltipShift = (ingredient, tooltip) => `${ingredient}.addShiftTooltip(${formatTooltip(tooltip)});`;
|
|
211
211
|
const withTag = (tag) => (ingredient) => `${ingredient}.withTag(${tag});`;
|
|
212
|
+
const withEnchantment = (enchantment) => withTag(`{ ench: ${formatList([formatEnchantment(enchantment)])} }`);
|
|
212
213
|
const withEnchantments = (enchantments) => withTag(`{ ench: ${formatList(enchantments.map(formatEnchantment))} }`);
|
|
213
214
|
|
|
214
215
|
const addLaser = (item) => `MiningLaser.addOre(${formatArgs(item)});`;
|
|
@@ -230,22 +231,22 @@ const addFurnace$1 = (recipe) => {
|
|
|
230
231
|
};
|
|
231
232
|
const removeFurnace$1 = (ingredient) => `mods.thermalexpansion.Furnace.removeRecipe(${ingredient});`;
|
|
232
233
|
const addInsolator = (recipe) => {
|
|
233
|
-
const out = formatArgs(recipe.rf, recipe.left, recipe.right, recipe.out, recipe.bonus);
|
|
234
|
+
const out = formatArgs(recipe.rf, recipe.left, recipe.right, recipe.out, recipe.bonus && recipe.bonus[0], recipe.bonus && recipe.bonus[1]);
|
|
234
235
|
return `mods.thermalexpansion.Insolator.addRecipe(${out});`;
|
|
235
236
|
};
|
|
236
237
|
const removeInsolator = (left, right) => `mods.thermalexpansion.Insolator.removeRecipe(${formatArgs(left, right)});`;
|
|
237
238
|
const addPulverizer = (recipe) => {
|
|
238
|
-
const out = formatArgs(recipe.rf, recipe.in, recipe.out, recipe.bonus);
|
|
239
|
+
const out = formatArgs(recipe.rf, recipe.in, recipe.out, recipe.bonus && recipe.bonus[0], recipe.bonus && recipe.bonus[1]);
|
|
239
240
|
return `mods.thermalexpansion.Pulverizer.addRecipe(${out});`;
|
|
240
241
|
};
|
|
241
242
|
const removePulverizer = (ingredient) => `mods.thermalexpansion.Pulverizer.removeRecipe(${ingredient});`;
|
|
242
243
|
const addSawmill = (recipe) => {
|
|
243
|
-
const out = formatArgs(recipe.rf, recipe.in, recipe.out, recipe.bonus);
|
|
244
|
+
const out = formatArgs(recipe.rf, recipe.in, recipe.out, recipe.bonus && recipe.bonus[0], recipe.bonus && recipe.bonus[1]);
|
|
244
245
|
return `mods.thermalexpansion.Sawmill.addRecipe(${out});`;
|
|
245
246
|
};
|
|
246
247
|
const removeSawmill = (ingredient) => `mods.thermalexpansion.Sawmill.removeRecipe(${ingredient});`;
|
|
247
248
|
const addSmelter = (recipe) => {
|
|
248
|
-
const out = formatArgs(recipe.rf, recipe.right, recipe.left, recipe.out, recipe.bonus);
|
|
249
|
+
const out = formatArgs(recipe.rf, recipe.right, recipe.left, recipe.out, recipe.bonus && recipe.bonus[0], recipe.bonus && recipe.bonus[1]);
|
|
249
250
|
return `mods.thermalexpansion.Smelter.addRecipe(${out});`;
|
|
250
251
|
};
|
|
251
252
|
const removeSmelter = (left, right) => `mods.thermalexpansion.Smelter.removeRecipe(${formatArgs(left, right)});`;
|
|
@@ -255,7 +256,7 @@ const addTransposerFill = (recipe) => {
|
|
|
255
256
|
};
|
|
256
257
|
const removeTransposerFill = (ingredient, liquid) => `mods.thermalexpansion.Transposer.removeFillRecipe(${formatArgs(ingredient, liquid)});`;
|
|
257
258
|
const addTransposerExtract = (recipe) => {
|
|
258
|
-
const out = formatArgs(recipe.rf, recipe.in, recipe.liquid, recipe.bonus);
|
|
259
|
+
const out = formatArgs(recipe.rf, recipe.in, recipe.liquid, recipe.bonus && recipe.bonus[0], recipe.bonus && recipe.bonus[1]);
|
|
259
260
|
return `mods.thermalexpansion.Transposer.addExtractRecipe(${out});`;
|
|
260
261
|
};
|
|
261
262
|
const removeTransposerExtract = (ingredient) => `mods.thermalexpansion.Transposer.removeExtractRecipe(${ingredient});`;
|
|
@@ -265,8 +266,8 @@ const add = (item, recipe) => {
|
|
|
265
266
|
return `recipes.add${type}(${formatArgs(item, recipe)});`;
|
|
266
267
|
};
|
|
267
268
|
const remove = (ingredient) => `recipes.remove(${ingredient});`;
|
|
268
|
-
const removeShaped = (ingredient) => `recipes.removeShaped(${ingredient});`;
|
|
269
|
-
const removeShapeless = (ingredient) => `recipes.removeShapeless(${ingredient});`;
|
|
269
|
+
const removeShaped = (ingredient, recipe) => `recipes.removeShaped(${formatArgs(ingredient, recipe)});`;
|
|
270
|
+
const removeShapeless = (ingredient, recipe) => `recipes.removeShapeless(${formatArgs(ingredient, recipe)});`;
|
|
270
271
|
const addFurnace = (recipe) => `furnace.addRecipe(${formatArgs(recipe.out, recipe.in)});`;
|
|
271
272
|
const removeFurnace = (ingredient) => `furnace.remove(${ingredient});`;
|
|
272
273
|
const replace = (item, recipe) => {
|
|
@@ -327,6 +328,7 @@ exports.removeTransposerExtract = removeTransposerExtract;
|
|
|
327
328
|
exports.removeTransposerFill = removeTransposerFill;
|
|
328
329
|
exports.replace = replace;
|
|
329
330
|
exports.replaceAll = replaceAll;
|
|
331
|
+
exports.withEnchantment = withEnchantment;
|
|
330
332
|
exports.withEnchantments = withEnchantments;
|
|
331
333
|
exports.withName = withName;
|
|
332
334
|
exports.withTag = withTag;
|
package/dist/zenflow.d.ts
CHANGED
|
@@ -41,6 +41,7 @@ declare const MFR_LASER_LENSES: {
|
|
|
41
41
|
|
|
42
42
|
declare type Ingredients = [ingredient: string, n: number];
|
|
43
43
|
declare type Item = string | Ingredients;
|
|
44
|
+
declare type Bonus = [item: Item, chance: number];
|
|
44
45
|
declare type RecipeShaped = Partial<{
|
|
45
46
|
1: string;
|
|
46
47
|
2: string;
|
|
@@ -132,6 +133,7 @@ declare const withName: (ingredient: string, name: Text | Text[]) => string;
|
|
|
132
133
|
declare const withTooltip: (ingredient: string, tooltip: Text | Text[]) => string;
|
|
133
134
|
declare const withTooltipShift: (ingredient: string, tooltip: Text | Text[]) => string;
|
|
134
135
|
declare const withTag: (tag: string) => (ingredient: string) => string;
|
|
136
|
+
declare const withEnchantment: (enchantment: Enchantment) => (ingredient: string) => string;
|
|
135
137
|
declare const withEnchantments: (enchantments: Enchantment[]) => (ingredient: string) => string;
|
|
136
138
|
|
|
137
139
|
declare const addLaser: (item: Item) => string;
|
|
@@ -150,33 +152,33 @@ declare type RecipeCrucible = {
|
|
|
150
152
|
declare type RecipeFurnace$1 = {
|
|
151
153
|
rf: number;
|
|
152
154
|
in: string;
|
|
153
|
-
out:
|
|
155
|
+
out: Item;
|
|
154
156
|
};
|
|
155
157
|
declare type RecipeInsolator = {
|
|
156
158
|
rf: number;
|
|
157
|
-
left:
|
|
158
|
-
right:
|
|
159
|
-
out:
|
|
160
|
-
bonus?:
|
|
159
|
+
left: Item;
|
|
160
|
+
right: Item;
|
|
161
|
+
out: Item;
|
|
162
|
+
bonus?: Bonus;
|
|
161
163
|
};
|
|
162
164
|
declare type RecipePulverizer = {
|
|
163
165
|
rf: number;
|
|
164
166
|
in: string;
|
|
165
|
-
out:
|
|
166
|
-
bonus?:
|
|
167
|
+
out: Item;
|
|
168
|
+
bonus?: Bonus;
|
|
167
169
|
};
|
|
168
170
|
declare type RecipeSawmill = {
|
|
169
171
|
rf: number;
|
|
170
172
|
in: string;
|
|
171
|
-
out:
|
|
172
|
-
bonus?:
|
|
173
|
+
out: Item;
|
|
174
|
+
bonus?: Bonus;
|
|
173
175
|
};
|
|
174
176
|
declare type RecipeSmelter = {
|
|
175
177
|
rf: number;
|
|
176
|
-
left:
|
|
177
|
-
right:
|
|
178
|
-
out:
|
|
179
|
-
bonus?:
|
|
178
|
+
left: Item;
|
|
179
|
+
right: Item;
|
|
180
|
+
out: Item;
|
|
181
|
+
bonus?: Bonus;
|
|
180
182
|
};
|
|
181
183
|
declare type RecipeTransposerFill = {
|
|
182
184
|
rf: number;
|
|
@@ -188,7 +190,7 @@ declare type RecipeTransposerExtract = {
|
|
|
188
190
|
rf: number;
|
|
189
191
|
in: string;
|
|
190
192
|
liquid: Ingredients;
|
|
191
|
-
bonus?:
|
|
193
|
+
bonus?: Bonus;
|
|
192
194
|
};
|
|
193
195
|
/**
|
|
194
196
|
* Common values:
|
|
@@ -260,11 +262,26 @@ declare type RecipeFurnace = {
|
|
|
260
262
|
};
|
|
261
263
|
declare const add: (item: Item, recipe: Recipe) => string;
|
|
262
264
|
declare const remove: (ingredient: string) => string;
|
|
263
|
-
declare const removeShaped: (ingredient: string
|
|
264
|
-
|
|
265
|
+
declare const removeShaped: (ingredient: string, recipe?: Partial<{
|
|
266
|
+
1: string;
|
|
267
|
+
2: string;
|
|
268
|
+
3: string;
|
|
269
|
+
4: string;
|
|
270
|
+
5: string;
|
|
271
|
+
6: string;
|
|
272
|
+
7: string;
|
|
273
|
+
8: string;
|
|
274
|
+
9: string;
|
|
275
|
+
corner: string;
|
|
276
|
+
edge: string;
|
|
277
|
+
ring: string;
|
|
278
|
+
square: string;
|
|
279
|
+
center: string;
|
|
280
|
+
}> | undefined) => string;
|
|
281
|
+
declare const removeShapeless: (ingredient: string, recipe?: RecipeShapeless | undefined) => string;
|
|
265
282
|
declare const addFurnace: (recipe: RecipeFurnace) => string;
|
|
266
283
|
declare const removeFurnace: (ingredient: string) => string;
|
|
267
284
|
declare const replace: (item: Item, recipe: Recipe) => string;
|
|
268
285
|
declare const replaceAll: (item: Item, recipes: Recipe[]) => string;
|
|
269
286
|
|
|
270
|
-
export { add, addComposter, addCompressor, addCrucible$1 as addCrucibleNihilo, addCrucibleSource, addCrucible as addCrucibleThermal, addExtreme, addFurnace, addFurnace$1 as addFurnaceThermal, addHammer, addInsolator, addLaser, addLaserPreferred, addNEI, addPulverizer, addQED, addSawmill, addSieve, addSmelter, addTransposerExtract, addTransposerFill, hide, remove, removeComposter, removeCompressor, removeCrucible$1 as removeCrucibleNihilo, removeCrucibleSource, removeCrucible as removeCrucibleThermal, removeExtreme, removeFurnace, removeFurnace$1 as removeFurnaceThermal, removeHammer, removeInsolator, removeLaser, removeLaserPreferred, removePulverizer, removeQED, removeSawmill, removeShaped, removeShapeless, removeSieve, removeSmelter, removeTransposerExtract, removeTransposerFill, replace, replaceAll, withEnchantments, withName, withTag, withTooltip, withTooltipShift };
|
|
287
|
+
export { add, addComposter, addCompressor, addCrucible$1 as addCrucibleNihilo, addCrucibleSource, addCrucible as addCrucibleThermal, addExtreme, addFurnace, addFurnace$1 as addFurnaceThermal, addHammer, addInsolator, addLaser, addLaserPreferred, addNEI, addPulverizer, addQED, addSawmill, addSieve, addSmelter, addTransposerExtract, addTransposerFill, hide, remove, removeComposter, removeCompressor, removeCrucible$1 as removeCrucibleNihilo, removeCrucibleSource, removeCrucible as removeCrucibleThermal, removeExtreme, removeFurnace, removeFurnace$1 as removeFurnaceThermal, removeHammer, removeInsolator, removeLaser, removeLaserPreferred, removePulverizer, removeQED, removeSawmill, removeShaped, removeShapeless, removeSieve, removeSmelter, removeTransposerExtract, removeTransposerFill, replace, replaceAll, withEnchantment, withEnchantments, withName, withTag, withTooltip, withTooltipShift };
|
package/dist/zenflow.mjs
CHANGED
|
@@ -205,6 +205,7 @@ const withName = (ingredient, name) => `${ingredient}.displayName = ${formatName
|
|
|
205
205
|
const withTooltip = (ingredient, tooltip) => `${ingredient}.addTooltip(${formatTooltip(tooltip)});`;
|
|
206
206
|
const withTooltipShift = (ingredient, tooltip) => `${ingredient}.addShiftTooltip(${formatTooltip(tooltip)});`;
|
|
207
207
|
const withTag = (tag) => (ingredient) => `${ingredient}.withTag(${tag});`;
|
|
208
|
+
const withEnchantment = (enchantment) => withTag(`{ ench: ${formatList([formatEnchantment(enchantment)])} }`);
|
|
208
209
|
const withEnchantments = (enchantments) => withTag(`{ ench: ${formatList(enchantments.map(formatEnchantment))} }`);
|
|
209
210
|
|
|
210
211
|
const addLaser = (item) => `MiningLaser.addOre(${formatArgs(item)});`;
|
|
@@ -226,22 +227,22 @@ const addFurnace$1 = (recipe) => {
|
|
|
226
227
|
};
|
|
227
228
|
const removeFurnace$1 = (ingredient) => `mods.thermalexpansion.Furnace.removeRecipe(${ingredient});`;
|
|
228
229
|
const addInsolator = (recipe) => {
|
|
229
|
-
const out = formatArgs(recipe.rf, recipe.left, recipe.right, recipe.out, recipe.bonus);
|
|
230
|
+
const out = formatArgs(recipe.rf, recipe.left, recipe.right, recipe.out, recipe.bonus && recipe.bonus[0], recipe.bonus && recipe.bonus[1]);
|
|
230
231
|
return `mods.thermalexpansion.Insolator.addRecipe(${out});`;
|
|
231
232
|
};
|
|
232
233
|
const removeInsolator = (left, right) => `mods.thermalexpansion.Insolator.removeRecipe(${formatArgs(left, right)});`;
|
|
233
234
|
const addPulverizer = (recipe) => {
|
|
234
|
-
const out = formatArgs(recipe.rf, recipe.in, recipe.out, recipe.bonus);
|
|
235
|
+
const out = formatArgs(recipe.rf, recipe.in, recipe.out, recipe.bonus && recipe.bonus[0], recipe.bonus && recipe.bonus[1]);
|
|
235
236
|
return `mods.thermalexpansion.Pulverizer.addRecipe(${out});`;
|
|
236
237
|
};
|
|
237
238
|
const removePulverizer = (ingredient) => `mods.thermalexpansion.Pulverizer.removeRecipe(${ingredient});`;
|
|
238
239
|
const addSawmill = (recipe) => {
|
|
239
|
-
const out = formatArgs(recipe.rf, recipe.in, recipe.out, recipe.bonus);
|
|
240
|
+
const out = formatArgs(recipe.rf, recipe.in, recipe.out, recipe.bonus && recipe.bonus[0], recipe.bonus && recipe.bonus[1]);
|
|
240
241
|
return `mods.thermalexpansion.Sawmill.addRecipe(${out});`;
|
|
241
242
|
};
|
|
242
243
|
const removeSawmill = (ingredient) => `mods.thermalexpansion.Sawmill.removeRecipe(${ingredient});`;
|
|
243
244
|
const addSmelter = (recipe) => {
|
|
244
|
-
const out = formatArgs(recipe.rf, recipe.right, recipe.left, recipe.out, recipe.bonus);
|
|
245
|
+
const out = formatArgs(recipe.rf, recipe.right, recipe.left, recipe.out, recipe.bonus && recipe.bonus[0], recipe.bonus && recipe.bonus[1]);
|
|
245
246
|
return `mods.thermalexpansion.Smelter.addRecipe(${out});`;
|
|
246
247
|
};
|
|
247
248
|
const removeSmelter = (left, right) => `mods.thermalexpansion.Smelter.removeRecipe(${formatArgs(left, right)});`;
|
|
@@ -251,7 +252,7 @@ const addTransposerFill = (recipe) => {
|
|
|
251
252
|
};
|
|
252
253
|
const removeTransposerFill = (ingredient, liquid) => `mods.thermalexpansion.Transposer.removeFillRecipe(${formatArgs(ingredient, liquid)});`;
|
|
253
254
|
const addTransposerExtract = (recipe) => {
|
|
254
|
-
const out = formatArgs(recipe.rf, recipe.in, recipe.liquid, recipe.bonus);
|
|
255
|
+
const out = formatArgs(recipe.rf, recipe.in, recipe.liquid, recipe.bonus && recipe.bonus[0], recipe.bonus && recipe.bonus[1]);
|
|
255
256
|
return `mods.thermalexpansion.Transposer.addExtractRecipe(${out});`;
|
|
256
257
|
};
|
|
257
258
|
const removeTransposerExtract = (ingredient) => `mods.thermalexpansion.Transposer.removeExtractRecipe(${ingredient});`;
|
|
@@ -261,8 +262,8 @@ const add = (item, recipe) => {
|
|
|
261
262
|
return `recipes.add${type}(${formatArgs(item, recipe)});`;
|
|
262
263
|
};
|
|
263
264
|
const remove = (ingredient) => `recipes.remove(${ingredient});`;
|
|
264
|
-
const removeShaped = (ingredient) => `recipes.removeShaped(${ingredient});`;
|
|
265
|
-
const removeShapeless = (ingredient) => `recipes.removeShapeless(${ingredient});`;
|
|
265
|
+
const removeShaped = (ingredient, recipe) => `recipes.removeShaped(${formatArgs(ingredient, recipe)});`;
|
|
266
|
+
const removeShapeless = (ingredient, recipe) => `recipes.removeShapeless(${formatArgs(ingredient, recipe)});`;
|
|
266
267
|
const addFurnace = (recipe) => `furnace.addRecipe(${formatArgs(recipe.out, recipe.in)});`;
|
|
267
268
|
const removeFurnace = (ingredient) => `furnace.remove(${ingredient});`;
|
|
268
269
|
const replace = (item, recipe) => {
|
|
@@ -277,4 +278,4 @@ const replaceAll = (item, recipes) => [
|
|
|
277
278
|
recipes.map((recipe) => add(item, recipe))
|
|
278
279
|
].join("\n");
|
|
279
280
|
|
|
280
|
-
export { add, addComposter, addCompressor, addCrucible$1 as addCrucibleNihilo, addCrucibleSource, addCrucible as addCrucibleThermal, addExtreme, addFurnace, addFurnace$1 as addFurnaceThermal, addHammer, addInsolator, addLaser, addLaserPreferred, addNEI, addPulverizer, addQED, addSawmill, addSieve, addSmelter, addTransposerExtract, addTransposerFill, hide, remove, removeComposter, removeCompressor, removeCrucible$1 as removeCrucibleNihilo, removeCrucibleSource, removeCrucible as removeCrucibleThermal, removeExtreme, removeFurnace, removeFurnace$1 as removeFurnaceThermal, removeHammer, removeInsolator, removeLaser, removeLaserPreferred, removePulverizer, removeQED, removeSawmill, removeShaped, removeShapeless, removeSieve, removeSmelter, removeTransposerExtract, removeTransposerFill, replace, replaceAll, withEnchantments, withName, withTag, withTooltip, withTooltipShift };
|
|
281
|
+
export { add, addComposter, addCompressor, addCrucible$1 as addCrucibleNihilo, addCrucibleSource, addCrucible as addCrucibleThermal, addExtreme, addFurnace, addFurnace$1 as addFurnaceThermal, addHammer, addInsolator, addLaser, addLaserPreferred, addNEI, addPulverizer, addQED, addSawmill, addSieve, addSmelter, addTransposerExtract, addTransposerFill, hide, remove, removeComposter, removeCompressor, removeCrucible$1 as removeCrucibleNihilo, removeCrucibleSource, removeCrucible as removeCrucibleThermal, removeExtreme, removeFurnace, removeFurnace$1 as removeFurnaceThermal, removeHammer, removeInsolator, removeLaser, removeLaserPreferred, removePulverizer, removeQED, removeSawmill, removeShaped, removeShapeless, removeSieve, removeSmelter, removeTransposerExtract, removeTransposerFill, replace, replaceAll, withEnchantment, withEnchantments, withName, withTag, withTooltip, withTooltipShift };
|