zen-flow 7.2.1 → 8.0.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/dist/zenflow.cjs CHANGED
@@ -254,14 +254,10 @@ const addHammer = (id, recipe$1) => {
254
254
  };
255
255
  const removeHammer = (id) => `mods.exnihilo.Hammer.removeRecipe(${id});`;
256
256
  const addSieve = (id, recipe$1) => {
257
- const items = Object.entries(recipe$1).map((entry) => Array.from({ length: Math.ceil(entry[1]) }).map((_, i) => ({
258
- id: entry[0],
259
- chance: entry[1] - i < 1 ? Math.round(1 / (entry[1] - i)) : 1
260
- }))).flat();
261
257
  const out = recipe(
262
258
  id,
263
- items.map((item) => item.id),
264
- array(9)(items.map((item) => item.chance))
259
+ Object.keys(recipe$1),
260
+ Object.values(recipe$1)
265
261
  );
266
262
  return `mods.exnihilo.Sieve.addRecipe(${out});`;
267
263
  };
@@ -367,7 +367,7 @@ type RecipeSieve = Record<string, number>;
367
367
  /**
368
368
  * Add [Sieve](https://ftb.fandom.com/wiki/Sieve_(Ex_Nihilo)) recipe
369
369
  *
370
- * Chance is calculated as `1 / chance`
370
+ * Chance is calculated as a fraction, e.g. `2` is `50%`
371
371
  *
372
372
  * @see https://minetweaker3.aizistral.com/wiki/ModTweaker:Ex_Nihilo_Support
373
373
  */
@@ -367,7 +367,7 @@ type RecipeSieve = Record<string, number>;
367
367
  /**
368
368
  * Add [Sieve](https://ftb.fandom.com/wiki/Sieve_(Ex_Nihilo)) recipe
369
369
  *
370
- * Chance is calculated as `1 / chance`
370
+ * Chance is calculated as a fraction, e.g. `2` is `50%`
371
371
  *
372
372
  * @see https://minetweaker3.aizistral.com/wiki/ModTweaker:Ex_Nihilo_Support
373
373
  */
package/dist/zenflow.mjs CHANGED
@@ -252,14 +252,10 @@ const addHammer = (id, recipe$1) => {
252
252
  };
253
253
  const removeHammer = (id) => `mods.exnihilo.Hammer.removeRecipe(${id});`;
254
254
  const addSieve = (id, recipe$1) => {
255
- const items = Object.entries(recipe$1).map((entry) => Array.from({ length: Math.ceil(entry[1]) }).map((_, i) => ({
256
- id: entry[0],
257
- chance: entry[1] - i < 1 ? Math.round(1 / (entry[1] - i)) : 1
258
- }))).flat();
259
255
  const out = recipe(
260
256
  id,
261
- items.map((item) => item.id),
262
- array(9)(items.map((item) => item.chance))
257
+ Object.keys(recipe$1),
258
+ Object.values(recipe$1)
263
259
  );
264
260
  return `mods.exnihilo.Sieve.addRecipe(${out});`;
265
261
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zen-flow",
3
- "version": "7.2.1",
3
+ "version": "8.0.0",
4
4
  "description": "MineTweaker ZenScript made easy.",
5
5
  "main": "dist/zenflow.cjs",
6
6
  "module": "dist/zenflow.mjs",