zen-flow 1.7.0 → 1.7.3
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 -0
- package/dist/zenflow.cjs +3 -3
- package/dist/zenflow.mjs +3 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -163,7 +163,9 @@ Shaped crafting recipes support the following shorthand patterns, in order:
|
|
|
163
163
|
|
|
164
164
|
- `withName` - Change item name
|
|
165
165
|
- `withTooltip` - Add item tooltip*
|
|
166
|
+
- [Colours / formats](https://minecraft.fandom.com/wiki/Formatting_codes)
|
|
166
167
|
- `withTooltipShift` - Add shift item tooltip*
|
|
168
|
+
- [Colours / formats](https://minecraft.fandom.com/wiki/Formatting_codes)
|
|
167
169
|
- `withTag` - Add item NBT tag data
|
|
168
170
|
- [Display properties](https://minecraft.fandom.com/wiki/Player.dat_format#Display_Properties)
|
|
169
171
|
- `withEnchantment` - Add item enchantment
|
package/dist/zenflow.cjs
CHANGED
|
@@ -119,7 +119,7 @@ const formatName = (texts) => {
|
|
|
119
119
|
const formatTooltip = (texts) => {
|
|
120
120
|
const format = (text, options) => TOOLTIP_COLOUR[options?.colour ?? "gray"](options?.format ? TOOLTIP_FORMAT[options.format](`"${text}"`) : `"${text}"`);
|
|
121
121
|
if (!Array.isArray(texts))
|
|
122
|
-
return
|
|
122
|
+
return format(texts);
|
|
123
123
|
if (isTextFormat(texts))
|
|
124
124
|
return format(...texts);
|
|
125
125
|
return texts.map(formatTooltip).join(" + ");
|
|
@@ -159,7 +159,7 @@ const formatArgs = (...args) => {
|
|
|
159
159
|
` : list.join(", ");
|
|
160
160
|
};
|
|
161
161
|
|
|
162
|
-
const addCompressor = (recipe) => `mods.avaritia.Compressor.add(${formatArgs(recipe.out, recipe.in[
|
|
162
|
+
const addCompressor = (recipe) => `mods.avaritia.Compressor.add(${formatArgs(recipe.out, recipe.in[1], recipe.in[0])});`;
|
|
163
163
|
const removeCompressor = (ingredient) => `mods.avaritia.Compressor.remove(${ingredient});`;
|
|
164
164
|
const addExtreme = (item, recipe) => {
|
|
165
165
|
const out = formatArgs(item, recipe.map((row) => formatArgs(row.map(formatIngredient))));
|
|
@@ -208,7 +208,7 @@ const removeQED = (ingredient) => `mods.extraUtils.QED.removeRecipe(${ingredient
|
|
|
208
208
|
const withName = (ingredient, name) => `${ingredient}.displayName = ${formatName(name)};`;
|
|
209
209
|
const withTooltip = (ingredient, tooltip) => `${ingredient}.addTooltip(${formatTooltip(tooltip)});`;
|
|
210
210
|
const withTooltipShift = (ingredient, tooltip) => `${ingredient}.addShiftTooltip(${formatTooltip(tooltip)});`;
|
|
211
|
-
const withTag = (tag) => (ingredient) => `${ingredient}.withTag(${tag})
|
|
211
|
+
const withTag = (tag) => (ingredient) => `${ingredient}.withTag(${tag})`;
|
|
212
212
|
const withEnchantment = (enchantment) => withTag(`{ ench: ${formatList([formatEnchantment(enchantment)])} }`);
|
|
213
213
|
const withEnchantments = (enchantments) => withTag(`{ ench: ${formatList(enchantments.map(formatEnchantment))} }`);
|
|
214
214
|
|
package/dist/zenflow.mjs
CHANGED
|
@@ -115,7 +115,7 @@ const formatName = (texts) => {
|
|
|
115
115
|
const formatTooltip = (texts) => {
|
|
116
116
|
const format = (text, options) => TOOLTIP_COLOUR[options?.colour ?? "gray"](options?.format ? TOOLTIP_FORMAT[options.format](`"${text}"`) : `"${text}"`);
|
|
117
117
|
if (!Array.isArray(texts))
|
|
118
|
-
return
|
|
118
|
+
return format(texts);
|
|
119
119
|
if (isTextFormat(texts))
|
|
120
120
|
return format(...texts);
|
|
121
121
|
return texts.map(formatTooltip).join(" + ");
|
|
@@ -155,7 +155,7 @@ const formatArgs = (...args) => {
|
|
|
155
155
|
` : list.join(", ");
|
|
156
156
|
};
|
|
157
157
|
|
|
158
|
-
const addCompressor = (recipe) => `mods.avaritia.Compressor.add(${formatArgs(recipe.out, recipe.in[
|
|
158
|
+
const addCompressor = (recipe) => `mods.avaritia.Compressor.add(${formatArgs(recipe.out, recipe.in[1], recipe.in[0])});`;
|
|
159
159
|
const removeCompressor = (ingredient) => `mods.avaritia.Compressor.remove(${ingredient});`;
|
|
160
160
|
const addExtreme = (item, recipe) => {
|
|
161
161
|
const out = formatArgs(item, recipe.map((row) => formatArgs(row.map(formatIngredient))));
|
|
@@ -204,7 +204,7 @@ const removeQED = (ingredient) => `mods.extraUtils.QED.removeRecipe(${ingredient
|
|
|
204
204
|
const withName = (ingredient, name) => `${ingredient}.displayName = ${formatName(name)};`;
|
|
205
205
|
const withTooltip = (ingredient, tooltip) => `${ingredient}.addTooltip(${formatTooltip(tooltip)});`;
|
|
206
206
|
const withTooltipShift = (ingredient, tooltip) => `${ingredient}.addShiftTooltip(${formatTooltip(tooltip)});`;
|
|
207
|
-
const withTag = (tag) => (ingredient) => `${ingredient}.withTag(${tag})
|
|
207
|
+
const withTag = (tag) => (ingredient) => `${ingredient}.withTag(${tag})`;
|
|
208
208
|
const withEnchantment = (enchantment) => withTag(`{ ench: ${formatList([formatEnchantment(enchantment)])} }`);
|
|
209
209
|
const withEnchantments = (enchantments) => withTag(`{ ench: ${formatList(enchantments.map(formatEnchantment))} }`);
|
|
210
210
|
|