zen-flow 4.3.0 → 4.4.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/dist/zenflow.cjs CHANGED
@@ -132,7 +132,7 @@ const capitalize = (x) => `${x[0].toUpperCase()}${x.slice(1)}`;
132
132
  const clamp = (min, max, n) => Math.max(min, Math.min(max, n));
133
133
 
134
134
  const addGrinder = (id, recipe) => {
135
- const formatBonus = (stack) => `${stack.id}, ${clamp(0, 1, stack.n)}`;
135
+ const formatBonus = (bonus) => `${bonus.id}, ${clamp(0, 1, bonus.chance)}`;
136
136
  const out = formatArgs(
137
137
  formatIngredient(recipe.input),
138
138
  formatIngredient(id),
@@ -292,7 +292,7 @@ const addSieve = (id, recipe) => {
292
292
  const out = formatArgs(
293
293
  id,
294
294
  items.map((item) => item.id),
295
- items.map((item) => item.chance)
295
+ formatArray(items.map((item) => item.chance), 9)
296
296
  );
297
297
  return `mods.exnihilo.Sieve.addRecipe(${out});`;
298
298
  };
package/dist/zenflow.d.ts CHANGED
@@ -43,8 +43,8 @@ type RecipeGrinder = {
43
43
  input: string;
44
44
  turns: number;
45
45
  bonus?: {
46
- primary: Stack;
47
- secondary?: Stack;
46
+ primary: Bonus;
47
+ secondary?: Bonus;
48
48
  };
49
49
  };
50
50
  /**
package/dist/zenflow.mjs CHANGED
@@ -130,7 +130,7 @@ const capitalize = (x) => `${x[0].toUpperCase()}${x.slice(1)}`;
130
130
  const clamp = (min, max, n) => Math.max(min, Math.min(max, n));
131
131
 
132
132
  const addGrinder = (id, recipe) => {
133
- const formatBonus = (stack) => `${stack.id}, ${clamp(0, 1, stack.n)}`;
133
+ const formatBonus = (bonus) => `${bonus.id}, ${clamp(0, 1, bonus.chance)}`;
134
134
  const out = formatArgs(
135
135
  formatIngredient(recipe.input),
136
136
  formatIngredient(id),
@@ -290,7 +290,7 @@ const addSieve = (id, recipe) => {
290
290
  const out = formatArgs(
291
291
  id,
292
292
  items.map((item) => item.id),
293
- items.map((item) => item.chance)
293
+ formatArray(items.map((item) => item.chance), 9)
294
294
  );
295
295
  return `mods.exnihilo.Sieve.addRecipe(${out});`;
296
296
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zen-flow",
3
- "version": "4.3.0",
3
+ "version": "4.4.1",
4
4
  "description": "MineTweaker ZenScript made easy.",
5
5
  "main": "dist/zenflow.cjs",
6
6
  "module": "dist/zenflow.mjs",