farming-weight 0.3.0 → 0.3.2

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.
Files changed (65) hide show
  1. package/dist/classes/farmingaccessory.js +12 -8
  2. package/dist/classes/farmingaccessory.js.map +1 -1
  3. package/dist/classes/farmingarmor.js +32 -27
  4. package/dist/classes/farmingarmor.js.map +1 -1
  5. package/dist/classes/farmingpet.js +23 -17
  6. package/dist/classes/farmingpet.js.map +1 -1
  7. package/dist/classes/farmingtool.js +27 -23
  8. package/dist/classes/farmingtool.js.map +1 -1
  9. package/dist/classes/item.js +2 -1
  10. package/dist/classes/lotusgear.js +17 -13
  11. package/dist/classes/lotusgear.js.map +1 -1
  12. package/dist/classes/player.js +37 -32
  13. package/dist/classes/player.js.map +1 -1
  14. package/dist/classes/weightcalc.js +31 -27
  15. package/dist/classes/weightcalc.js.map +1 -1
  16. package/dist/constants/accessories.js +14 -11
  17. package/dist/constants/accessories.js.map +1 -1
  18. package/dist/constants/armor.js +128 -125
  19. package/dist/constants/armor.js.map +1 -1
  20. package/dist/constants/crops.js +10 -7
  21. package/dist/constants/crops.js.map +1 -1
  22. package/dist/constants/enchants.js +70 -67
  23. package/dist/constants/enchants.js.map +1 -1
  24. package/dist/constants/lotus.js +29 -26
  25. package/dist/constants/lotus.js.map +1 -1
  26. package/dist/constants/personalbests.js +21 -17
  27. package/dist/constants/personalbests.js.map +1 -1
  28. package/dist/constants/pests.js +11 -6
  29. package/dist/constants/pests.js.map +1 -1
  30. package/dist/constants/pets.js +25 -22
  31. package/dist/constants/pets.js.map +1 -1
  32. package/dist/constants/reforges.js +11 -8
  33. package/dist/constants/reforges.js.map +1 -1
  34. package/dist/constants/skills.js +5 -2
  35. package/dist/constants/skills.js.map +1 -1
  36. package/dist/constants/specialcrops.js +19 -16
  37. package/dist/constants/specialcrops.js.map +1 -1
  38. package/dist/constants/specific.js +8 -5
  39. package/dist/constants/specific.js.map +1 -1
  40. package/dist/constants/tools.js +108 -105
  41. package/dist/constants/tools.js.map +1 -1
  42. package/dist/constants/weight.js +18 -15
  43. package/dist/constants/weight.js.map +1 -1
  44. package/dist/crops/melon.js +5 -1
  45. package/dist/crops/melon.js.map +1 -1
  46. package/dist/crops/pumpkin.js +5 -1
  47. package/dist/crops/pumpkin.js.map +1 -1
  48. package/dist/crops/special.js +10 -6
  49. package/dist/crops/special.js.map +1 -1
  50. package/dist/index.js +41 -25
  51. package/dist/index.js.map +1 -1
  52. package/dist/util/itemstats.js +51 -45
  53. package/dist/util/itemstats.js.map +1 -1
  54. package/dist/util/jacob.d.ts +1 -1
  55. package/dist/util/jacob.js +14 -5
  56. package/dist/util/jacob.js.map +1 -1
  57. package/dist/util/lore.js +5 -1
  58. package/dist/util/lore.js.map +1 -1
  59. package/dist/util/names.js +85 -77
  60. package/dist/util/names.js.map +1 -1
  61. package/dist/util/ratecalc.js +69 -59
  62. package/dist/util/ratecalc.js.map +1 -1
  63. package/dist/util/skyblocktime.js +5 -1
  64. package/dist/util/skyblocktime.js.map +1 -1
  65. package/package.json +1 -1
@@ -1,19 +1,22 @@
1
- import { Crop } from './crops';
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BONUS_WEIGHT = exports.TIER_12_MINIONS = exports.CROP_WEIGHT = void 0;
4
+ const crops_1 = require("./crops");
2
5
  // https://api.elitebot.dev/weights
3
- export const CROP_WEIGHT = {
4
- [Crop.Cactus]: 177_254.45,
5
- [Crop.Carrot]: 302_061.86,
6
- [Crop.CocoaBeans]: 267_174.04,
7
- [Crop.Melon]: 485_308.47,
8
- [Crop.Mushroom]: 90_178.06,
9
- [Crop.NetherWart]: 250_000,
10
- [Crop.Potato]: 300_000,
11
- [Crop.Pumpkin]: 98_284.71,
12
- [Crop.SugarCane]: 200_000,
13
- [Crop.Wheat]: 100_000,
14
- [Crop.Seeds]: 0, // Byproduct of wheat farming, not counted
6
+ exports.CROP_WEIGHT = {
7
+ [crops_1.Crop.Cactus]: 177_254.45,
8
+ [crops_1.Crop.Carrot]: 302_061.86,
9
+ [crops_1.Crop.CocoaBeans]: 267_174.04,
10
+ [crops_1.Crop.Melon]: 485_308.47,
11
+ [crops_1.Crop.Mushroom]: 90_178.06,
12
+ [crops_1.Crop.NetherWart]: 250_000,
13
+ [crops_1.Crop.Potato]: 300_000,
14
+ [crops_1.Crop.Pumpkin]: 98_284.71,
15
+ [crops_1.Crop.SugarCane]: 200_000,
16
+ [crops_1.Crop.Wheat]: 100_000,
17
+ [crops_1.Crop.Seeds]: 0, // Byproduct of wheat farming, not counted
15
18
  };
16
- export const TIER_12_MINIONS = [
19
+ exports.TIER_12_MINIONS = [
17
20
  'WHEAT_12',
18
21
  'CARROT_12',
19
22
  'POTATO_12',
@@ -25,7 +28,7 @@ export const TIER_12_MINIONS = [
25
28
  'SUGAR_CANE_12',
26
29
  'NETHER_WARTS_12',
27
30
  ];
28
- export const BONUS_WEIGHT = {
31
+ exports.BONUS_WEIGHT = {
29
32
  Farming60Bonus: 250,
30
33
  Farming50Bonus: 100,
31
34
  AnitaBuffBonusMultiplier: 2,
@@ -1 +1 @@
1
- {"version":3,"file":"weight.js","sourceRoot":"","sources":["../../src/constants/weight.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAE/B,mCAAmC;AACnC,MAAM,CAAC,MAAM,WAAW,GAAyB;IAChD,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,UAAU;IACzB,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,UAAU;IACzB,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,UAAU;IAC7B,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,UAAU;IACxB,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,SAAS;IAC1B,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,OAAO;IAC1B,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,OAAO;IACtB,CAAC,IAAI,C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AO;IACrB,CAAC,YAAI,CAAC,KAAK,CAAC,EAAE,CAAC,EAAE,0CAA0C;CAC3D,CAAC;AAEW,QAAA,eAAe,GAAsB;IACjD,UAAU;IACV,WAAW;IACX,WAAW;IACX,YAAY;IACZ,UAAU;IACV,aAAa;IACb,UAAU;IACV,WAAW;IACX,eAAe;IACf,iBAAiB;CACR,CAAC;AAEE,QAAA,YAAY,GAAG;IAC3B,cAAc,EAAE,GAAG;IACnB,cAAc,EAAE,GAAG;IACnB,wBAAwB,EAAE,CAAC;IAC3B,gBAAgB,EAAE,IAAI;IACtB,uBAAuB,EAAE,EAAE;IAC3B,kBAAkB,EAAE,GAAG;IACvB,gBAAgB,EAAE,EAAE;IACpB,kBAAkB,EAAE,CAAC;CACZ,CAAC"}
@@ -1,3 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.calculateMelonPerkBonus = void 0;
1
4
  const melonDicerRollem = {
2
5
  3: [
3
6
  {
@@ -18,11 +21,12 @@ const melonDicerRollem = {
18
21
  },
19
22
  ],
20
23
  };
21
- export function calculateMelonPerkBonus(blocksBroken, level = 3) {
24
+ function calculateMelonPerkBonus(blocksBroken, level = 3) {
22
25
  let total = 0;
23
26
  for (const { drops, chance } of melonDicerRollem[level]) {
24
27
  total += drops * chance * blocksBroken;
25
28
  }
26
29
  return total;
27
30
  }
31
+ exports.calculateMelonPerkBonus = calculateMelonPerkBonus;
28
32
  //# sourceMappingURL=melon.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"melon.js","sourceRoot":"","sources":["../../src/crops/melon.ts"],"names":[],"mappings":"AAAA,MAAM,gBAAgB,GAAG;IACxB,CAAC,EAAE;QACF;YACC,KAAK,EAAE,GAAG;YACV,MAAM,EAAE,GAAG,GAAG,MAAM;SACpB;QACD;YACC,KAAK,EAAE,IAAI;YACX,MAAM,EAAE,EAAE,GAAG,MAAM;SACnB;QACD;YACC,KAAK,EAAE,KAAK;YACZ,MAAM,EAAE,CAAC,GAAG,MAAM;SAClB;QACD;YACC,KAAK,EAAE,MAAM;YACb,MAAM,EAAE,CAAC,GAAG,MAAM;SAClB;KACD;CACD,CAAC;AAEF,MAAM,UAAU,uBAAuB,CAAC,YAAoB,EAAE,QAAW,CAAC;IACzE,IAAI,KAAK,GAAG,CAAC,CAAC;IAEd,KAAK,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,gBAAgB,CAAC,KAAK,CAAC,EAAE;QACxD,KAAK,IAAI,KAAK,GAAG,MAAM,GAAG,YAAY,CAAC;KACvC;IAED,OAAO,KAAK,CAAC;AACd,CAAC"}
1
+ {"version":3,"file":"melon.js","sourceRoot":"","sources":["../../src/crops/melon.ts"],"names":[],"mappings":";;;AAAA,MAAM,gBAAgB,GAAG;IACxB,CAAC,EAAE;QACF;YACC,KAAK,EAAE,GAAG;YACV,MAAM,EAAE,GAAG,GAAG,MAAM;SACpB;QACD;YACC,KAAK,EAAE,IAAI;YACX,MAAM,EAAE,EAAE,GAAG,MAAM;SACnB;QACD;YACC,KAAK,EAAE,KAAK;YACZ,MAAM,EAAE,CAAC,GAAG,MAAM;SAClB;QACD;YACC,KAAK,EAAE,MAAM;YACb,MAAM,EAAE,CAAC,GAAG,MAAM;SAClB;KACD;CACD,CAAC;AAEF,SAAgB,uBAAuB,CAAC,YAAoB,EAAE,QAAW,CAAC;IACzE,IAAI,KAAK,GAAG,CAAC,CAAC;IAEd,KAAK,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,gBAAgB,CAAC,KAAK,CAAC,EAAE;QACxD,KAAK,IAAI,KAAK,GAAG,MAAM,GAAG,YAAY,CAAC;KACvC;IAED,OAAO,KAAK,CAAC;AACd,CAAC;AARD,0DAQC"}
@@ -1,3 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.calculatePumpkinPerkBonus = void 0;
1
4
  const pumkinDicerRollem = {
2
5
  3: [
3
6
  {
@@ -18,11 +21,12 @@ const pumkinDicerRollem = {
18
21
  },
19
22
  ],
20
23
  };
21
- export function calculatePumpkinPerkBonus(blocksBroken, level = 3) {
24
+ function calculatePumpkinPerkBonus(blocksBroken, level = 3) {
22
25
  let total = 0;
23
26
  for (const { drops, chance } of pumkinDicerRollem[level]) {
24
27
  total += drops * chance * blocksBroken;
25
28
  }
26
29
  return total;
27
30
  }
31
+ exports.calculatePumpkinPerkBonus = calculatePumpkinPerkBonus;
28
32
  //# sourceMappingURL=pumpkin.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"pumpkin.js","sourceRoot":"","sources":["../../src/crops/pumpkin.ts"],"names":[],"mappings":"AAAA,MAAM,iBAAiB,GAAG;IACzB,CAAC,EAAE;QACF;YACC,KAAK,EAAE,GAAG;YACV,MAAM,EAAE,EAAE,GAAG,MAAM;SACnB;QACD;YACC,KAAK,EAAE,GAAG;YACV,MAAM,EAAE,EAAE,GAAG,MAAM;SACnB;QACD;YACC,KAAK,EAAE,IAAI;YACX,MAAM,EAAE,CAAC,GAAG,MAAM;SAClB;QACD;YACC,KAAK,EAAE,KAAK;YACZ,MAAM,EAAE,CAAC,GAAG,MAAM;SAClB;KACD;CACD,CAAC;AAEF,MAAM,UAAU,yBAAyB,CAAC,YAAoB,EAAE,QAAW,CAAC;IAC3E,IAAI,KAAK,GAAG,CAAC,CAAC;IAEd,KAAK,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,iBAAiB,CAAC,KAAK,CAAC,EAAE;QACzD,KAAK,IAAI,KAAK,GAAG,MAAM,GAAG,YAAY,CAAC;KACvC;IAED,OAAO,KAAK,CAAC;AACd,CAAC"}
1
+ {"version":3,"file":"pumpkin.js","sourceRoot":"","sources":["../../src/crops/pumpkin.ts"],"names":[],"mappings":";;;AAAA,MAAM,iBAAiB,GAAG;IACzB,CAAC,EAAE;QACF;YACC,KAAK,EAAE,GAAG;YACV,MAAM,EAAE,EAAE,GAAG,MAAM;SACnB;QACD;YACC,KAAK,EAAE,GAAG;YACV,MAAM,EAAE,EAAE,GAAG,MAAM;SACnB;QACD;YACC,KAAK,EAAE,IAAI;YACX,MAAM,EAAE,CAAC,GAAG,MAAM;SAClB;QACD;YACC,KAAK,EAAE,KAAK;YACZ,MAAM,EAAE,CAAC,GAAG,MAAM;SAClB;KACD;CACD,CAAC;AAEF,SAAgB,yBAAyB,CAAC,YAAoB,EAAE,QAAW,CAAC;IAC3E,IAAI,KAAK,GAAG,CAAC,CAAC;IAEd,KAAK,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,iBAAiB,CAAC,KAAK,CAAC,EAAE;QACzD,KAAK,IAAI,KAAK,GAAG,MAAM,GAAG,YAAY,CAAC;KACvC;IAED,OAAO,KAAK,CAAC;AACd,CAAC;AARD,8DAQC"}
@@ -1,14 +1,18 @@
1
- import { CROP_INFO } from '../constants/crops';
2
- import { MATCHING_SPECIAL_CROP, SPECIAL_CROP_INFO } from '../constants/specialcrops';
3
- export function calculateAverageSpecialCrops(blocksBroken, crop, armor) {
4
- const type = MATCHING_SPECIAL_CROP[crop];
5
- const { rates, npc } = SPECIAL_CROP_INFO[type];
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.calculateAverageSpecialCrops = void 0;
4
+ const crops_1 = require("../constants/crops");
5
+ const specialcrops_1 = require("../constants/specialcrops");
6
+ function calculateAverageSpecialCrops(blocksBroken, crop, armor) {
7
+ const type = specialcrops_1.MATCHING_SPECIAL_CROP[crop];
8
+ const { rates, npc } = specialcrops_1.SPECIAL_CROP_INFO[type];
6
9
  const chance = rates[armor - 1] ?? 0;
7
- const amount = blocksBroken * chance * (CROP_INFO[crop]?.breaks ?? 1);
10
+ const amount = blocksBroken * chance * (crops_1.CROP_INFO[crop]?.breaks ?? 1);
8
11
  return {
9
12
  type,
10
13
  amount: amount,
11
14
  npc: npc * amount,
12
15
  };
13
16
  }
17
+ exports.calculateAverageSpecialCrops = calculateAverageSpecialCrops;
14
18
  //# sourceMappingURL=special.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"special.js","sourceRoot":"","sources":["../../src/crops/special.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAQ,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAErF,MAAM,UAAU,4BAA4B,CAAC,YAAoB,EAAE,IAAU,EAAE,KAAoB;IAClG,MAAM,IAAI,GAAG,qBAAqB,CAAC,IAAI,CAAC,CAAC;IAEzC,MAAM,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,iBAAiB,CAAC,IAAI,CAAC,CAAC;IAC/C,MAAM,MAAM,GAAG,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC;IACrC,MAAM,MAAM,GAAG,YAAY,GAAG,MAAM,GAAG,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,MAAM,IAAI,CAAC,CAAC,CAAC;IAEtE,OAAO;QACN,IAAI;QACJ,MAAM,EAAE,MAAM;QACd,GAAG,EAAE,GAAG,GAAG,MAAM;KACjB,CAAC;AACH,CAAC"}
1
+ {"version":3,"file":"special.js","sourceRoot":"","sources":["../../src/crops/special.ts"],"names":[],"mappings":";;;AAAA,8CAAqD;AACrD,4DAAqF;AAErF,SAAgB,4BAA4B,CAAC,YAAoB,EAAE,IAAU,EAAE,KAAoB;IAClG,MAAM,IAAI,GAAG,oCAAqB,CAAC,IAAI,CAAC,CAAC;IAEzC,MAAM,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,gCAAiB,CAAC,IAAI,CAAC,CAAC;IAC/C,MAAM,MAAM,GAAG,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC;IACrC,MAAM,MAAM,GAAG,YAAY,GAAG,MAAM,GAAG,CAAC,iBAAS,CAAC,IAAI,CAAC,EAAE,MAAM,IAAI,CAAC,CAAC,CAAC;IAEtE,OAAO;QACN,IAAI;QACJ,MAAM,EAAE,MAAM;QACd,GAAG,EAAE,GAAG,GAAG,MAAM;KACjB,CAAC;AACH,CAAC;AAZD,oEAYC"}
package/dist/index.js CHANGED
@@ -1,26 +1,42 @@
1
- export * from './classes/farmingarmor.js';
2
- export * from './classes/farmingtool.js';
3
- export * from './classes/farmingpet.js';
4
- export * from './classes/farmingaccessory.js';
5
- export * from './classes/item.js';
6
- export * from './classes/player.js';
7
- export * from './classes/weightcalc.js';
8
- export * from './classes/lotusgear.js';
9
- export * from './constants/armor.js';
10
- export * from './constants/crops.js';
11
- export * from './constants/reforges.js';
12
- export * from './constants/skills.js';
13
- export * from './constants/specialcrops.js';
14
- export * from './constants/tools.js';
15
- export * from './constants/weight.js';
16
- export * from './constants/pests.js';
17
- export * from './constants/personalbests.js';
18
- export * from './util/itemstats.js';
19
- export * from './util/jacob.js';
20
- export * from './util/names.js';
21
- export * from './util/skyblocktime.js';
22
- export * from './util/ratecalc.js';
23
- export * from './crops/special.js';
24
- export * from './crops/pumpkin.js';
25
- export * from './crops/melon.js';
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./classes/farmingarmor.js"), exports);
18
+ __exportStar(require("./classes/farmingtool.js"), exports);
19
+ __exportStar(require("./classes/farmingpet.js"), exports);
20
+ __exportStar(require("./classes/farmingaccessory.js"), exports);
21
+ __exportStar(require("./classes/item.js"), exports);
22
+ __exportStar(require("./classes/player.js"), exports);
23
+ __exportStar(require("./classes/weightcalc.js"), exports);
24
+ __exportStar(require("./classes/lotusgear.js"), exports);
25
+ __exportStar(require("./constants/armor.js"), exports);
26
+ __exportStar(require("./constants/crops.js"), exports);
27
+ __exportStar(require("./constants/reforges.js"), exports);
28
+ __exportStar(require("./constants/skills.js"), exports);
29
+ __exportStar(require("./constants/specialcrops.js"), exports);
30
+ __exportStar(require("./constants/tools.js"), exports);
31
+ __exportStar(require("./constants/weight.js"), exports);
32
+ __exportStar(require("./constants/pests.js"), exports);
33
+ __exportStar(require("./constants/personalbests.js"), exports);
34
+ __exportStar(require("./util/itemstats.js"), exports);
35
+ __exportStar(require("./util/jacob.js"), exports);
36
+ __exportStar(require("./util/names.js"), exports);
37
+ __exportStar(require("./util/skyblocktime.js"), exports);
38
+ __exportStar(require("./util/ratecalc.js"), exports);
39
+ __exportStar(require("./crops/special.js"), exports);
40
+ __exportStar(require("./crops/pumpkin.js"), exports);
41
+ __exportStar(require("./crops/melon.js"), exports);
26
42
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AAEvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,8BAA8B,CAAC;AAE7C,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC;AACvC,cAAc,oBAAoB,CAAC;AAEnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4DAA0C;AAC1C,2DAAyC;AACzC,0DAAwC;AACxC,gEAA8C;AAC9C,oDAAkC;AAClC,sDAAoC;AACpC,0DAAwC;AACxC,yDAAuC;AAEvC,uDAAqC;AACrC,uDAAqC;AACrC,0DAAwC;AACxC,wDAAsC;AACtC,8DAA4C;AAC5C,uDAAqC;AACrC,wDAAsC;AACtC,uDAAqC;AACrC,+DAA6C;AAE7C,sDAAoC;AACpC,kDAAgC;AAChC,kDAAgC;AAChC,yDAAuC;AACvC,qDAAmC;AAEnC,qDAAmC;AACnC,qDAAmC;AACnC,mDAAiC"}
@@ -1,68 +1,74 @@
1
- import { Rarity } from '../constants/reforges';
2
- export function getRarityFromLore(lore) {
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.previousRarity = exports.nextRarity = exports.getRarityFromLore = void 0;
4
+ const reforges_1 = require("../constants/reforges");
5
+ function getRarityFromLore(lore) {
3
6
  const line = lore.at(-1);
4
7
  return getRarity(line ?? '');
5
8
  }
9
+ exports.getRarityFromLore = getRarityFromLore;
6
10
  function getRarity(line) {
7
11
  switch (true) {
8
12
  case line.includes('COMMON'):
9
- return Rarity.Common;
13
+ return reforges_1.Rarity.Common;
10
14
  case line.includes('UNCOMMON'):
11
- return Rarity.Uncommon;
15
+ return reforges_1.Rarity.Uncommon;
12
16
  case line.includes('RARE'):
13
- return Rarity.Rare;
17
+ return reforges_1.Rarity.Rare;
14
18
  case line.includes('EPIC'):
15
- return Rarity.Epic;
19
+ return reforges_1.Rarity.Epic;
16
20
  case line.includes('LEGENDARY'):
17
- return Rarity.Legendary;
21
+ return reforges_1.Rarity.Legendary;
18
22
  case line.includes('MYTHIC'):
19
- return Rarity.Mythic;
23
+ return reforges_1.Rarity.Mythic;
20
24
  case line.includes('SPECIAL'):
21
- return Rarity.Special;
25
+ return reforges_1.Rarity.Special;
22
26
  case line.includes('DIVINE'):
23
- return Rarity.Divine;
27
+ return reforges_1.Rarity.Divine;
24
28
  default:
25
- return Rarity.Common;
29
+ return reforges_1.Rarity.Common;
26
30
  }
27
31
  }
28
- export function nextRarity(rarity) {
32
+ function nextRarity(rarity) {
29
33
  switch (rarity) {
30
- case Rarity.Common:
31
- return Rarity.Uncommon;
32
- case Rarity.Uncommon:
33
- return Rarity.Rare;
34
- case Rarity.Rare:
35
- return Rarity.Epic;
36
- case Rarity.Epic:
37
- return Rarity.Legendary;
38
- case Rarity.Legendary:
39
- return Rarity.Mythic;
40
- case Rarity.Mythic:
41
- return Rarity.Special;
42
- case Rarity.Special:
43
- return Rarity.Divine;
44
- case Rarity.Divine:
45
- return Rarity.Divine;
34
+ case reforges_1.Rarity.Common:
35
+ return reforges_1.Rarity.Uncommon;
36
+ case reforges_1.Rarity.Uncommon:
37
+ return reforges_1.Rarity.Rare;
38
+ case reforges_1.Rarity.Rare:
39
+ return reforges_1.Rarity.Epic;
40
+ case reforges_1.Rarity.Epic:
41
+ return reforges_1.Rarity.Legendary;
42
+ case reforges_1.Rarity.Legendary:
43
+ return reforges_1.Rarity.Mythic;
44
+ case reforges_1.Rarity.Mythic:
45
+ return reforges_1.Rarity.Special;
46
+ case reforges_1.Rarity.Special:
47
+ return reforges_1.Rarity.Divine;
48
+ case reforges_1.Rarity.Divine:
49
+ return reforges_1.Rarity.Divine;
46
50
  }
47
51
  }
48
- export function previousRarity(rarity) {
52
+ exports.nextRarity = nextRarity;
53
+ function previousRarity(rarity) {
49
54
  switch (rarity) {
50
- case Rarity.Common:
51
- return Rarity.Common;
52
- case Rarity.Uncommon:
53
- return Rarity.Common;
54
- case Rarity.Rare:
55
- return Rarity.Uncommon;
56
- case Rarity.Epic:
57
- return Rarity.Rare;
58
- case Rarity.Legendary:
59
- return Rarity.Epic;
60
- case Rarity.Mythic:
61
- return Rarity.Legendary;
62
- case Rarity.Special:
63
- return Rarity.Mythic;
64
- case Rarity.Divine:
65
- return Rarity.Special;
55
+ case reforges_1.Rarity.Common:
56
+ return reforges_1.Rarity.Common;
57
+ case reforges_1.Rarity.Uncommon:
58
+ return reforges_1.Rarity.Common;
59
+ case reforges_1.Rarity.Rare:
60
+ return reforges_1.Rarity.Uncommon;
61
+ case reforges_1.Rarity.Epic:
62
+ return reforges_1.Rarity.Rare;
63
+ case reforges_1.Rarity.Legendary:
64
+ return reforges_1.Rarity.Epic;
65
+ case reforges_1.Rarity.Mythic:
66
+ return reforges_1.Rarity.Legendary;
67
+ case reforges_1.Rarity.Special:
68
+ return reforges_1.Rarity.Mythic;
69
+ case reforges_1.Rarity.Divine:
70
+ return reforges_1.Rarity.Special;
66
71
  }
67
72
  }
73
+ exports.previousRarity = previousRarity;
68
74
  //# sourceMappingURL=itemstats.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"itemstats.js","sourceRoot":"","sources":["../../src/util/itemstats.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAE/C,MAAM,UAAU,iBAAiB,CAAC,IAAc;IAC/C,MAAM,IAAI,GAAG,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;IACzB,OAAO,SAAS,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC;AAC9B,CAAC;AAED,SAAS,SAAS,CAAC,IAAY;IAC9B,QAAQ,IAAI,EAAE;QACb,KAAK,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC;YAC3B,OAAO,MAAM,CAAC,MAAM,CAAC;QACtB,KAAK,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,iBAAM,CAAC,MAAM,CAAC;QACtB,KAAK,iBAAM,CAAC,QAAQ;YACnB,OAAO,iBAAM,CAAC,MAAM,CAAC;QACtB,KAAK,iBAAM,CAAC,IAAI;YACf,OAAO,iBAAM,CAAC,QAAQ,CAAC;QACxB,KAAK,iBAAM,CAAC,IAAI;YACf,OAAO,iBAAM,CAAC,IAAI,CAAC;QACpB,KAAK,iBAAM,CAAC,SAAS;YACpB,OAAO,iBAAM,CAAC,IAAI,CAAC;QACpB,KAAK,iBAAM,CAAC,MAAM;YACjB,OAAO,iBAAM,CAAC,SAAS,CAAC;QACzB,KAAK,iBAAM,CAAC,OAAO;YAClB,OAAO,iBAAM,CAAC,MAAM,CAAC;QACtB,KAAK,iBAAM,CAAC,MAAM;YACjB,OAAO,iBAAM,CAAC,OAAO,CAAC;KACvB;AACF,CAAC;AAnBD,wCAmBC"}
@@ -1,4 +1,4 @@
1
- export type JacobContestMedal = 'bronze' | 'silver' | 'gold';
1
+ export type JacobContestMedal = 'bronze' | 'silver' | 'gold' | 'platinum' | 'diamond';
2
2
  export interface RawJacobContest {
3
3
  collected: number;
4
4
  claimed_rewards?: boolean;
@@ -1,4 +1,7 @@
1
- export function formatJacobContests(contests) {
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.calculateJacobContestMedal = exports.formatJacobContests = void 0;
4
+ function formatJacobContests(contests) {
2
5
  return contests.map((contest) => {
3
6
  return {
4
7
  collected: contest.collected,
@@ -8,7 +11,8 @@ export function formatJacobContests(contests) {
8
11
  };
9
12
  });
10
13
  }
11
- export function calculateJacobContestMedal(contest) {
14
+ exports.formatJacobContests = formatJacobContests;
15
+ function calculateJacobContestMedal(contest) {
12
16
  if (contest.claimed_medal) {
13
17
  return contest.claimed_medal;
14
18
  }
@@ -16,12 +20,17 @@ export function calculateJacobContestMedal(contest) {
16
20
  if (position === undefined || participants === undefined) {
17
21
  return undefined;
18
22
  }
19
- if (position <= participants * 0.05 + 1)
23
+ if (position <= Math.floor(participants * 0.02))
24
+ return 'diamond';
25
+ if (position <= Math.floor(participants * 0.05))
26
+ return 'platinum';
27
+ if (position <= Math.floor(participants * 0.10))
20
28
  return 'gold';
21
- if (position <= participants * 0.25 + 1)
29
+ if (position <= Math.floor(participants * 0.30))
22
30
  return 'silver';
23
- if (position <= participants * 0.6 + 1)
31
+ if (position <= Math.floor(participants * 0.60))
24
32
  return 'bronze';
25
33
  return undefined;
26
34
  }
35
+ exports.calculateJacobContestMedal = calculateJacobContestMedal;
27
36
  //# sourceMappingURL=jacob.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"jacob.js","sourceRoot":"","sources":["../../src/util/jacob.ts"],"names":[],"mappings":"AAiBA,MAAM,UAAU,mBAAmB,CAAC,QAA2B;IAC9D,OAAO,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE;QAC/B,OAAO;YACN,SAAS,EAAE,OAAO,CAAC,SAAS;YAC5B,QAAQ,EAAE,OAAO,CAAC,gBAAgB;YAClC,YAAY,EAAE,OAAO,CAAC,oBAAoB;YAC1C,KAAK,EAAE,0BAA0B,CAAC,OAAO,CAAC;SAC1C,CAAC;IACH,CAAC,CAAC,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,0BAA0B,CAAC,OAAwB;IAClE,IAAI,OAAO,CAAC,aAAa,EAAE;QAC1B,OAAO,OAAO,CAAC,aAAa,CAAC;KAC7B;IAED,MAAM,EAAE,gBAAgB,EAAE,QAAQ,EAAE,oBAAoB,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC;IAEnF,IAAI,QAAQ,KAAK,SAAS,IAAI,YAAY,KAAK,SAAS,EAAE;QACzD,OAAO,SAAS,CAAC;KACjB;IAED,IAAI,QAAQ,IAAI,YAAY,GAAG,IAAI,GAAG,CAAC;QAAE,OAAO,MAAM,CAAC;IACvD,IAAI,QAAQ,IAAI,YAAY,GAAG,IAAI,GAAG,CAAC;QAAE,OAAO,QAAQ,CAAC;IACzD,IAAI,QA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KAAK,CAAC,YAAY,GAAG,IAAI,CAAC;QAAE,OAAO,QAAQ,CAAC;IAEjE,OAAO,SAAS,CAAC;AAClB,CAAC;AAlBD,gEAkBC"}
package/dist/util/lore.js CHANGED
@@ -1,4 +1,7 @@
1
- export function extractNumberFromLine(line, regex) {
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.extractNumberFromLine = void 0;
4
+ function extractNumberFromLine(line, regex) {
2
5
  const match = regex.exec(line);
3
6
  if (!match?.length || !match[1])
4
7
  return;
@@ -7,4 +10,5 @@ export function extractNumberFromLine(line, regex) {
7
10
  return;
8
11
  return found;
9
12
  }
13
+ exports.extractNumberFromLine = extractNumberFromLine;
10
14
  //# sourceMappingURL=lore.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"lore.js","sourceRoot":"","sources":["../../src/util/lore.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,qBAAqB,CAAC,IAAY,EAAE,KAAa;IAChE,MAAM,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC/B,IAAI,CAAC,KAAK,EAAE,MAAM,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;QAAE,OAAO;IAExC,MAAM,KAAK,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IACxB,IAAI,KAAK,CAAC,KAAK,CAAC;QAAE,OAAO;IAEzB,OAAO,KAAK,CAAC;AACd,CAAC"}
1
+ {"version":3,"file":"lore.js","sourceRoot":"","sources":["../../src/util/lore.ts"],"names":[],"mappings":";;;AAAA,SAAgB,qBAAqB,CAAC,IAAY,EAAE,KAAa;IAChE,MAAM,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC/B,IAAI,CAAC,KAAK,EAAE,MAAM,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;QAAE,OAAO;IAExC,MAAM,KAAK,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IACxB,IAAI,KAAK,CAAC,KAAK,CAAC;QAAE,OAAO;IAEzB,OAAO,KAAK,CAAC;AACd,CAAC;AARD,sDAQC"}
@@ -1,8 +1,12 @@
1
- import { Crop } from '../constants/crops';
2
- export function getCropDisplayName(crop) {
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getItemIdFromCrop = exports.getCropFromContestKey = exports.getCropFromItemId = exports.getCropFromName = exports.getCropDisplayName = void 0;
4
+ const crops_1 = require("../constants/crops");
5
+ function getCropDisplayName(crop) {
3
6
  return cropDisplayNames[crop] ?? 'Unknown Crop';
4
7
  }
5
- export function getCropFromName(name) {
8
+ exports.getCropDisplayName = getCropDisplayName;
9
+ function getCropFromName(name) {
6
10
  const fromDisplay = displayNamesToCrop[name];
7
11
  if (fromDisplay)
8
12
  return fromDisplay;
@@ -14,10 +18,12 @@ export function getCropFromName(name) {
14
18
  return fromFull;
15
19
  return getCropFromItemId(name);
16
20
  }
17
- export function getCropFromItemId(itemId) {
21
+ exports.getCropFromName = getCropFromName;
22
+ function getCropFromItemId(itemId) {
18
23
  return cropItemIds[itemId];
19
24
  }
20
- export function getCropFromContestKey(contestKey) {
25
+ exports.getCropFromItemId = getCropFromItemId;
26
+ function getCropFromContestKey(contestKey) {
21
27
  const split = contestKey.split(':');
22
28
  if (!split.length)
23
29
  return undefined;
@@ -25,92 +31,94 @@ export function getCropFromContestKey(contestKey) {
25
31
  if (!crop)
26
32
  return undefined;
27
33
  if (crop === '3')
28
- return Crop.CocoaBeans;
34
+ return crops_1.Crop.CocoaBeans;
29
35
  return cropItemIds[crop];
30
36
  }
31
- export function getItemIdFromCrop(crop) {
37
+ exports.getCropFromContestKey = getCropFromContestKey;
38
+ function getItemIdFromCrop(crop) {
32
39
  return itemIdsToCrop[crop];
33
40
  }
41
+ exports.getItemIdFromCrop = getItemIdFromCrop;
34
42
  const cropDisplayNames = {
35
- [Crop.Cactus]: 'Cactus',
36
- [Crop.Carrot]: 'Carrot',
37
- [Crop.CocoaBeans]: 'Cocoa Beans',
38
- [Crop.Melon]: 'Melon',
39
- [Crop.Mushroom]: 'Mushroom',
40
- [Crop.NetherWart]: 'Nether Wart',
41
- [Crop.Potato]: 'Potato',
42
- [Crop.Pumpkin]: 'Pumpkin',
43
- [Crop.SugarCane]: 'Sugar Cane',
44
- [Crop.Wheat]: 'Wheat',
45
- [Crop.Seeds]: 'Seeds',
43
+ [crops_1.Crop.Cactus]: 'Cactus',
44
+ [crops_1.Crop.Carrot]: 'Carrot',
45
+ [crops_1.Crop.CocoaBeans]: 'Cocoa Beans',
46
+ [crops_1.Crop.Melon]: 'Melon',
47
+ [crops_1.Crop.Mushroom]: 'Mushroom',
48
+ [crops_1.Crop.NetherWart]: 'Nether Wart',
49
+ [crops_1.Crop.Potato]: 'Potato',
50
+ [crops_1.Crop.Pumpkin]: 'Pumpkin',
51
+ [crops_1.Crop.SugarCane]: 'Sugar Cane',
52
+ [crops_1.Crop.Wheat]: 'Wheat',
53
+ [crops_1.Crop.Seeds]: 'Seeds',
46
54
  };
47
55
  const displayNamesToCrop = {
48
- Cactus: Crop.Cactus,
49
- Carrot: Crop.Carrot,
50
- 'Cocoa Beans': Crop.CocoaBeans,
51
- Melon: Crop.Melon,
52
- Mushroom: Crop.Mushroom,
53
- 'Nether Wart': Crop.NetherWart,
54
- Potato: Crop.Potato,
55
- Pumpkin: Crop.Pumpkin,
56
- 'Sugar Cane': Crop.SugarCane,
57
- Wheat: Crop.Wheat,
58
- Seeds: Crop.Seeds,
56
+ Cactus: crops_1.Crop.Cactus,
57
+ Carrot: crops_1.Crop.Carrot,
58
+ 'Cocoa Beans': crops_1.Crop.CocoaBeans,
59
+ Melon: crops_1.Crop.Melon,
60
+ Mushroom: crops_1.Crop.Mushroom,
61
+ 'Nether Wart': crops_1.Crop.NetherWart,
62
+ Potato: crops_1.Crop.Potato,
63
+ Pumpkin: crops_1.Crop.Pumpkin,
64
+ 'Sugar Cane': crops_1.Crop.SugarCane,
65
+ Wheat: crops_1.Crop.Wheat,
66
+ Seeds: crops_1.Crop.Seeds,
59
67
  };
60
68
  const shortNamesToCrop = {
61
- cactus: Crop.Cactus,
62
- carrot: Crop.Carrot,
63
- cocoa: Crop.CocoaBeans,
64
- melon: Crop.Melon,
65
- mushroom: Crop.Mushroom,
66
- wart: Crop.NetherWart,
67
- potato: Crop.Potato,
68
- pumpkin: Crop.Pumpkin,
69
- cane: Crop.SugarCane,
70
- wheat: Crop.Wheat,
71
- seeds: Crop.Seeds,
69
+ cactus: crops_1.Crop.Cactus,
70
+ carrot: crops_1.Crop.Carrot,
71
+ cocoa: crops_1.Crop.CocoaBeans,
72
+ melon: crops_1.Crop.Melon,
73
+ mushroom: crops_1.Crop.Mushroom,
74
+ wart: crops_1.Crop.NetherWart,
75
+ potato: crops_1.Crop.Potato,
76
+ pumpkin: crops_1.Crop.Pumpkin,
77
+ cane: crops_1.Crop.SugarCane,
78
+ wheat: crops_1.Crop.Wheat,
79
+ seeds: crops_1.Crop.Seeds,
72
80
  };
73
81
  const fullNamesToCrop = {
74
- cactus: Crop.Cactus,
75
- carrot: Crop.Carrot,
76
- cocoabeans: Crop.CocoaBeans,
77
- cocoabean: Crop.CocoaBeans,
78
- melon: Crop.Melon,
79
- mushroom: Crop.Mushroom,
80
- netherwart: Crop.NetherWart,
81
- netherwarts: Crop.NetherWart,
82
- potato: Crop.Potato,
83
- pumpkin: Crop.Pumpkin,
84
- sugarcane: Crop.SugarCane,
85
- wheat: Crop.Wheat,
86
- seeds: Crop.Seeds,
82
+ cactus: crops_1.Crop.Cactus,
83
+ carrot: crops_1.Crop.Carrot,
84
+ cocoabeans: crops_1.Crop.CocoaBeans,
85
+ cocoabean: crops_1.Crop.CocoaBeans,
86
+ melon: crops_1.Crop.Melon,
87
+ mushroom: crops_1.Crop.Mushroom,
88
+ netherwart: crops_1.Crop.NetherWart,
89
+ netherwarts: crops_1.Crop.NetherWart,
90
+ potato: crops_1.Crop.Potato,
91
+ pumpkin: crops_1.Crop.Pumpkin,
92
+ sugarcane: crops_1.Crop.SugarCane,
93
+ wheat: crops_1.Crop.Wheat,
94
+ seeds: crops_1.Crop.Seeds,
87
95
  };
88
96
  const cropItemIds = {
89
- CACTUS: Crop.Cactus,
90
- CARROT_ITEM: Crop.Carrot,
91
- 'INK_SACK:3': Crop.CocoaBeans,
92
- MELON: Crop.Melon,
93
- BROWN_MUSHROOM: Crop.Mushroom,
94
- RED_MUSHROOM: Crop.Mushroom,
95
- MUSHROOM_COLLECTION: Crop.Mushroom,
96
- NETHER_STALK: Crop.NetherWart,
97
- POTATO_ITEM: Crop.Potato,
98
- PUMPKIN: Crop.Pumpkin,
99
- SUGAR_CANE: Crop.SugarCane,
100
- WHEAT: Crop.Wheat,
101
- SEEDS: Crop.Seeds,
97
+ CACTUS: crops_1.Crop.Cactus,
98
+ CARROT_ITEM: crops_1.Crop.Carrot,
99
+ 'INK_SACK:3': crops_1.Crop.CocoaBeans,
100
+ MELON: crops_1.Crop.Melon,
101
+ BROWN_MUSHROOM: crops_1.Crop.Mushroom,
102
+ RED_MUSHROOM: crops_1.Crop.Mushroom,
103
+ MUSHROOM_COLLECTION: crops_1.Crop.Mushroom,
104
+ NETHER_STALK: crops_1.Crop.NetherWart,
105
+ POTATO_ITEM: crops_1.Crop.Potato,
106
+ PUMPKIN: crops_1.Crop.Pumpkin,
107
+ SUGAR_CANE: crops_1.Crop.SugarCane,
108
+ WHEAT: crops_1.Crop.Wheat,
109
+ SEEDS: crops_1.Crop.Seeds,
102
110
  };
103
111
  const itemIdsToCrop = {
104
- [Crop.Cactus]: 'CACTUS',
105
- [Crop.Carrot]: 'CARROT_ITEM',
106
- [Crop.CocoaBeans]: 'INK_SACK:3',
107
- [Crop.Melon]: 'MELON',
108
- [Crop.Mushroom]: 'BROWN_MUSHROOM',
109
- [Crop.NetherWart]: 'NETHER_STALK',
110
- [Crop.Potato]: 'POTATO_ITEM',
111
- [Crop.Pumpkin]: 'PUMPKIN',
112
- [Crop.SugarCane]: 'SUGAR_CANE',
113
- [Crop.Wheat]: 'WHEAT',
114
- [Crop.Seeds]: 'SEEDS',
112
+ [crops_1.Crop.Cactus]: 'CACTUS',
113
+ [crops_1.Crop.Carrot]: 'CARROT_ITEM',
114
+ [crops_1.Crop.CocoaBeans]: 'INK_SACK:3',
115
+ [crops_1.Crop.Melon]: 'MELON',
116
+ [crops_1.Crop.Mushroom]: 'BROWN_MUSHROOM',
117
+ [crops_1.Crop.NetherWart]: 'NETHER_STALK',
118
+ [crops_1.Crop.Potato]: 'POTATO_ITEM',
119
+ [crops_1.Crop.Pumpkin]: 'PUMPKIN',
120
+ [crops_1.Crop.SugarCane]: 'SUGAR_CANE',
121
+ [crops_1.Crop.Wheat]: 'WHEAT',
122
+ [crops_1.Crop.Seeds]: 'SEEDS',
115
123
  };
116
124
  //# sourceMappingURL=names.js.map