zen-flow 3.1.0 → 3.2.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
@@ -538,6 +538,27 @@ var item = /*#__PURE__*/Object.freeze({
538
538
  withTooltipShift: withTooltipShift
539
539
  });
540
540
 
541
+ const addChestLoot = (id, recipe) => {
542
+ const out = formatArgs(
543
+ formatLiteral(recipe.chest),
544
+ id,
545
+ recipe.chance,
546
+ recipe.n
547
+ );
548
+ return `vanilla.loot.addChestLoot(${out});`;
549
+ };
550
+ const removeChestLoot = (id, chest) => `vanilla.loot.removeChestLoot(${formatArgs(formatLiteral(chest), id)});`;
551
+ const addSeed = (id) => `vanilla.seeds.addSeed(${id});`;
552
+ const removeSeed = (id) => `vanilla.seeds.removeSeed(${id});`;
553
+
554
+ var loot = /*#__PURE__*/Object.freeze({
555
+ __proto__: null,
556
+ addChestLoot: addChestLoot,
557
+ addSeed: addSeed,
558
+ removeChestLoot: removeChestLoot,
559
+ removeSeed: removeSeed
560
+ });
561
+
541
562
  const addShaped = (item, recipe) => {
542
563
  const out = formatArgs(
543
564
  formatIngredient(item),
@@ -1083,6 +1104,7 @@ exports.exNihilo = exNihilo;
1083
1104
  exports.extraUtilities = extraUtilities;
1084
1105
  exports.forestry = forestry;
1085
1106
  exports.item = item;
1107
+ exports.loot = loot;
1086
1108
  exports.mineFactoryReloaded = mineFactoryReloaded;
1087
1109
  exports.minecraft = minecraft;
1088
1110
  exports.nei = nei;
package/dist/zenflow.d.ts CHANGED
@@ -614,6 +614,53 @@ declare namespace item {
614
614
  export { item_COLORS as COLORS, item_ENCHANTMENTS as ENCHANTMENTS, type item_Enchantment as Enchantment, item_FORMATS as FORMATS, item_NAME_COLOR as NAME_COLOR, item_NAME_FORMAT as NAME_FORMAT, item_TOOLTIP_COLOR as TOOLTIP_COLOR, item_TOOLTIP_FORMAT as TOOLTIP_FORMAT, type item_Text as Text, type item_TextRich as TextRich, item_withEnchantment as withEnchantment, item_withName as withName, item_withTag as withTag, item_withTooltip as withTooltip, item_withTooltipShift as withTooltipShift };
615
615
  }
616
616
 
617
+ type RecipeChestLoot = {
618
+ chest: string;
619
+ n?: number;
620
+ chance?: number;
621
+ };
622
+ /**
623
+ * Add item to dungeon loot
624
+ *
625
+ * Common values:
626
+ * - `dungeonChest`
627
+ * - `mineshaftChest`
628
+ *
629
+ * A loot table can be generated using `/mt loot`
630
+ *
631
+ * @see https://minetweaker3.aizistral.com/wiki/Tutorial:Loot
632
+ */
633
+ declare const addChestLoot: (id: string, recipe: RecipeChestLoot) => string;
634
+ /**
635
+ * Remove item to dungeon loot
636
+ *
637
+ * @see https://minetweaker3.aizistral.com/wiki/Tutorial:Loot
638
+ */
639
+ declare const removeChestLoot: (id: string, chest: string) => string;
640
+ /**
641
+ * Add item to tall grass
642
+ *
643
+ * A loot table can be generated using `/mt seeds`
644
+ *
645
+ * @see https://minetweaker3.aizistral.com/wiki/Tutorial:Loot
646
+ */
647
+ declare const addSeed: (id: string) => string;
648
+ /**
649
+ * Remove item from tall grass
650
+ *
651
+ * @see https://minetweaker3.aizistral.com/wiki/Tutorial:Loot
652
+ */
653
+ declare const removeSeed: (id: string) => string;
654
+
655
+ type loot_RecipeChestLoot = RecipeChestLoot;
656
+ declare const loot_addChestLoot: typeof addChestLoot;
657
+ declare const loot_addSeed: typeof addSeed;
658
+ declare const loot_removeChestLoot: typeof removeChestLoot;
659
+ declare const loot_removeSeed: typeof removeSeed;
660
+ declare namespace loot {
661
+ export { type loot_RecipeChestLoot as RecipeChestLoot, loot_addChestLoot as addChestLoot, loot_addSeed as addSeed, loot_removeChestLoot as removeChestLoot, loot_removeSeed as removeSeed };
662
+ }
663
+
617
664
  /**
618
665
  * Add shaped crafting recipe
619
666
  *
@@ -1697,4 +1744,4 @@ declare namespace tinkersConstruct {
1697
1744
  export { tinkersConstruct_MATERIALS as MATERIALS, tinkersConstruct_MODIFIERS as MODIFIERS, type tinkersConstruct_RecipeArrowStats as RecipeArrowStats, type tinkersConstruct_RecipeBowMaterialStats as RecipeBowMaterialStats, type tinkersConstruct_RecipeCastingBasin as RecipeCastingBasin, type tinkersConstruct_RecipeCastingTable as RecipeCastingTable, type tinkersConstruct_RecipeDryingRack as RecipeDryingRack, type tinkersConstruct_RecipeRepairMaterial as RecipeRepairMaterial, type tinkersConstruct_RecipeSmelteryFluid as RecipeSmelteryFluid, type tinkersConstruct_RecipeSmelteryFuel as RecipeSmelteryFuel, type tinkersConstruct_RecipeToolStats as RecipeToolStats, tinkersConstruct_addCastingBasin as addCastingBasin, tinkersConstruct_addCastingTable as addCastingTable, tinkersConstruct_addDryingRack as addDryingRack, tinkersConstruct_addRepairMaterial as addRepairMaterial, tinkersConstruct_addSmelteryAlloy as addSmelteryAlloy, tinkersConstruct_addSmelteryFluid as addSmelteryFluid, tinkersConstruct_addSmelteryFuel as addSmelteryFuel, tinkersConstruct_removeCastingBasin as removeCastingBasin, tinkersConstruct_removeCastingTable as removeCastingTable, tinkersConstruct_removeDryingRack as removeDryingRack, tinkersConstruct_removeModifier as removeModifier, tinkersConstruct_removeRepairMaterial as removeRepairMaterial, tinkersConstruct_removeSmelteryAlloy as removeSmelteryAlloy, tinkersConstruct_removeSmelteryFluid as removeSmelteryFluid, tinkersConstruct_removeSmelteryFuel as removeSmelteryFuel, tinkersConstruct_setArrowAccuracy as setArrowAccuracy, tinkersConstruct_setArrowBreakChance as setArrowBreakChance, tinkersConstruct_setArrowMass as setArrowMass, tinkersConstruct_setArrowStats as setArrowStats, tinkersConstruct_setBowMaterialDrawspeed as setBowMaterialDrawspeed, tinkersConstruct_setBowMaterialDurability as setBowMaterialDurability, tinkersConstruct_setBowMaterialFlightSpeed as setBowMaterialFlightSpeed, tinkersConstruct_setBowMaterialStats as setBowMaterialStats, tinkersConstruct_setMaterialAbility as setMaterialAbility, tinkersConstruct_setMaterialDamage as setMaterialDamage, tinkersConstruct_setMaterialDurability as setMaterialDurability, tinkersConstruct_setMaterialHandleModifier as setMaterialHandleModifier, tinkersConstruct_setMaterialLevelStonebound as setMaterialLevelStonebound, tinkersConstruct_setMaterialMiningLevel as setMaterialMiningLevel, tinkersConstruct_setMaterialName as setMaterialName, tinkersConstruct_setMaterialReinforcedLevel as setMaterialReinforcedLevel, tinkersConstruct_setMaterialSpeed as setMaterialSpeed, tinkersConstruct_setMaterialStats as setMaterialStats, tinkersConstruct_setMaterialStyle as setMaterialStyle };
1698
1745
  }
1699
1746
 
1700
- export { type Bonus, type Cast, type Ingredient, type Recipe, type RecipeShaped, type RecipeShapeless, type Stack, appliedEnergistics, avaritia, content, exNihilo, extraUtilities, forestry, item, mineFactoryReloaded, minecraft, nei, thermalExpansion, tinkersConstruct };
1747
+ export { type Bonus, type Cast, type Ingredient, type Recipe, type RecipeShaped, type RecipeShapeless, type Stack, appliedEnergistics, avaritia, content, exNihilo, extraUtilities, forestry, item, loot, mineFactoryReloaded, minecraft, nei, thermalExpansion, tinkersConstruct };
package/dist/zenflow.mjs CHANGED
@@ -536,6 +536,27 @@ var item = /*#__PURE__*/Object.freeze({
536
536
  withTooltipShift: withTooltipShift
537
537
  });
538
538
 
539
+ const addChestLoot = (id, recipe) => {
540
+ const out = formatArgs(
541
+ formatLiteral(recipe.chest),
542
+ id,
543
+ recipe.chance,
544
+ recipe.n
545
+ );
546
+ return `vanilla.loot.addChestLoot(${out});`;
547
+ };
548
+ const removeChestLoot = (id, chest) => `vanilla.loot.removeChestLoot(${formatArgs(formatLiteral(chest), id)});`;
549
+ const addSeed = (id) => `vanilla.seeds.addSeed(${id});`;
550
+ const removeSeed = (id) => `vanilla.seeds.removeSeed(${id});`;
551
+
552
+ var loot = /*#__PURE__*/Object.freeze({
553
+ __proto__: null,
554
+ addChestLoot: addChestLoot,
555
+ addSeed: addSeed,
556
+ removeChestLoot: removeChestLoot,
557
+ removeSeed: removeSeed
558
+ });
559
+
539
560
  const addShaped = (item, recipe) => {
540
561
  const out = formatArgs(
541
562
  formatIngredient(item),
@@ -1074,4 +1095,4 @@ var tinkersConstruct = /*#__PURE__*/Object.freeze({
1074
1095
  setMaterialStyle: setMaterialStyle
1075
1096
  });
1076
1097
 
1077
- export { appliedEnergistics, avaritia, content, exNihilo, extraUtilities, forestry, item, mineFactoryReloaded, minecraft, nei, thermalExpansion, tinkersConstruct };
1098
+ export { appliedEnergistics, avaritia, content, exNihilo, extraUtilities, forestry, item, loot, mineFactoryReloaded, minecraft, nei, thermalExpansion, tinkersConstruct };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zen-flow",
3
- "version": "3.1.0",
3
+ "version": "3.2.0",
4
4
  "description": "MineTweaker ZenScript made easy.",
5
5
  "main": "dist/zenflow.cjs",
6
6
  "module": "dist/zenflow.mjs",
@@ -37,7 +37,9 @@
37
37
  "build": "rollup -c",
38
38
  "build:docs": "typedoc src/index.ts",
39
39
  "test": "node scripts/tape.js && tape build/**/*.spec.js",
40
- "prepublishOnly": "npm run lint && npm run test && npm run build && npm run build:docs"
40
+ "preversion": "npm run lint && npm run test",
41
+ "postversion": "npm run build:docs",
42
+ "prepublishOnly": "npm run build"
41
43
  },
42
44
  "devDependencies": {
43
45
  "@chronocide/eslint-config": "github:chronoDave/eslint-config",