farming-weight 0.8.3 → 0.8.5

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 (78) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +101 -101
  3. package/dist/constants/crops.d.ts +11 -0
  4. package/dist/constants/crops.js +132 -0
  5. package/dist/constants/crops.js.map +1 -1
  6. package/dist/util/ratecalc.d.ts +8 -0
  7. package/dist/util/ratecalc.js +27 -0
  8. package/dist/util/ratecalc.js.map +1 -1
  9. package/package.json +2 -2
  10. package/dist/classes/farmingaccessory.d.ts +0 -15
  11. package/dist/classes/farmingaccessory.js +0 -54
  12. package/dist/classes/farmingaccessory.js.map +0 -1
  13. package/dist/classes/farmingarmor.d.ts +0 -53
  14. package/dist/classes/farmingarmor.js +0 -209
  15. package/dist/classes/farmingarmor.js.map +0 -1
  16. package/dist/classes/farmingequipment.d.ts +0 -24
  17. package/dist/classes/farmingequipment.js +0 -112
  18. package/dist/classes/farmingequipment.js.map +0 -1
  19. package/dist/classes/farmingpet.d.ts +0 -22
  20. package/dist/classes/farmingpet.js +0 -101
  21. package/dist/classes/farmingpet.js.map +0 -1
  22. package/dist/classes/farmingtool.d.ts +0 -41
  23. package/dist/classes/farmingtool.js +0 -196
  24. package/dist/classes/farmingtool.js.map +0 -1
  25. package/dist/classes/item.d.ts +0 -22
  26. package/dist/classes/item.js +0 -12
  27. package/dist/classes/item.js.map +0 -1
  28. package/dist/classes/lotusgear.d.ts +0 -23
  29. package/dist/classes/lotusgear.js +0 -107
  30. package/dist/classes/lotusgear.js.map +0 -1
  31. package/dist/classes/player.d.ts +0 -76
  32. package/dist/classes/player.js +0 -222
  33. package/dist/classes/player.js.map +0 -1
  34. package/dist/classes/weightcalc.d.ts +0 -63
  35. package/dist/classes/weightcalc.js +0 -192
  36. package/dist/classes/weightcalc.js.map +0 -1
  37. package/dist/classes/weightcalc.test.d.ts +0 -1
  38. package/dist/classes/weightcalc.test.js +0 -108
  39. package/dist/classes/weightcalc.test.js.map +0 -1
  40. package/dist/constants/accessories.d.ts +0 -13
  41. package/dist/constants/accessories.js +0 -56
  42. package/dist/constants/accessories.js.map +0 -1
  43. package/dist/constants/armor.d.ts +0 -47
  44. package/dist/constants/armor.js +0 -711
  45. package/dist/constants/armor.js.map +0 -1
  46. package/dist/constants/equipment.d.ts +0 -26
  47. package/dist/constants/equipment.js +0 -126
  48. package/dist/constants/equipment.js.map +0 -1
  49. package/dist/constants/items.d.ts +0 -10
  50. package/dist/constants/items.js +0 -15
  51. package/dist/constants/items.js.map +0 -1
  52. package/dist/constants/lotus.d.ts +0 -26
  53. package/dist/constants/lotus.js +0 -113
  54. package/dist/constants/lotus.js.map +0 -1
  55. package/dist/constants/pets.d.ts +0 -58
  56. package/dist/constants/pets.js +0 -266
  57. package/dist/constants/pets.js.map +0 -1
  58. package/dist/constants/tools.d.ts +0 -16
  59. package/dist/constants/tools.js +0 -468
  60. package/dist/constants/tools.js.map +0 -1
  61. package/dist/fortune/upgradable.d.ts +0 -39
  62. package/dist/fortune/upgradable.js +0 -2
  63. package/dist/fortune/upgradable.js.map +0 -1
  64. package/dist/player/index.d.ts +0 -1
  65. package/dist/player/index.js +0 -2
  66. package/dist/player/index.js.map +0 -1
  67. package/dist/player.d.ts +0 -30
  68. package/dist/player.js +0 -30
  69. package/dist/player.js.map +0 -1
  70. package/dist/ratecalc.d.ts +0 -33
  71. package/dist/ratecalc.js +0 -155
  72. package/dist/ratecalc.js.map +0 -1
  73. package/dist/tool.d.ts +0 -1
  74. package/dist/tool.js +0 -18
  75. package/dist/tool.js.map +0 -1
  76. package/dist/util/pests.test.d.ts +0 -1
  77. package/dist/util/pests.test.js +0 -29
  78. package/dist/util/pests.test.js.map +0 -1
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2024 Elite Farmers
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2024 Elite Farmers
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,102 +1,102 @@
1
- # Farming Weight
2
- NPM package for Farming Weight and fortune calculations in Hypixel SkyBlock.
3
-
4
- Created specifically for the [EliteWebsite](https://github.com/EliteFarmers/Website) and [EliteBot](https://github.com/EliteFarmers/Bot) projects, but can be used for any project, as long as some credit is given per the license.
5
-
6
- **This is a new package that's changing rapidly, there aren't any comprehensive docs at this time**
7
-
8
- ## Installation
9
- ```bash
10
- npm install farming-weight
11
- ```
12
-
13
- ## Usage
14
-
15
- This package is made with TypeScript, and has type definitions included. While there is a lack of docs, relevant types and autocomplete should help a lot with understanding the package.
16
-
17
- ### General philosophy
18
-
19
- The goal of this package is to provide an easy way to pass in existing data and get Farming Weight information back. With this in mind, the **input data is not always raw Hypixel API responses, as those are prone to change**. While this may be inconvenient for some projects, it should be easy enough to convert the data to the format expected by this package, and it moves the burden of keeping up with Hypixel API changes out of this package.
20
-
21
- ### Farming Weight Calculator
22
-
23
- The `createFarmingWeightCalculator` function is the main entry point for this package. It takes in a single object with data required for the full farming weight calculation. Data can be skipped, and the weight calculator will skip the related weight that would be calculated from that data.
24
-
25
- ```ts
26
- import { createFarmingWeightCalculator } from 'farming-weight';
27
-
28
- const member = // Get SkyBlock member from elsewhere (https://api.hypixel.net/)
29
-
30
- const calculator = createFarmingWeightCalculator({
31
- collection: member.collection,
32
- farmingXp: member.player_data?.experience?.SKILL_FARMING,
33
- levelCapUpgrade: member.jacobs_contest?.perks?.farming_level_cap,
34
- anitaBonusFarmingFortuneLevel?: member.jacobs_contest?.perks?.double_drops,
35
- minions: member.player_data?.crafted_generators, // You should also include minions crafted from other members on the same profile
36
- contests: Object.values(member.jacob_contests?.contests ?? {}),
37
- pests: member.bestiary.kills
38
- })
39
-
40
- // Can pass in some values instead of calculating them (you can exclude contests above if you do this)
41
- calculator.setEarnedMedals({
42
- diamond: /* Number of diamond medals */,
43
- platinum: /* Number of platinum medals */,
44
- gold: /* Number of gold medals */,
45
- })
46
-
47
- const weight = calculator.getWeightInfo();
48
-
49
- console.log(weight.totalWeight);
50
- // 10000.53 (or whatever the total weight is)
51
-
52
- console.log(weight.bonusSources);
53
- // { "Contest Medals": 123.25, "Farming Level": 250, ... }
54
-
55
- ```
56
-
57
- ### Rates Calculator
58
-
59
- This package also contains a rates calculator, which can be used to calculate farming drops and NPC profit for each crop.
60
-
61
- ```ts
62
- import { calculateDetailedAverageDrops, Crop } from 'farming-weight';
63
-
64
- const drops = calculateDetailedAverageDrops({
65
- farmingFortune: 1500,
66
- bountiful: true,
67
- mooshroom: true,
68
- dicerLevel: 3,
69
- blocksBroken: 24000 // 100% efficiency for 20 minutes
70
- });
71
-
72
- console.log(drops[Crop.Wheat].collection) // 123000 (or whatever the collection is)
73
- ```
74
-
75
- ### FarmingPlayer Calculator
76
-
77
- The `createFarmingPlayer` function is used to create a `FarmingPlayer` object, which can be used to calculate fortune and other player-specific farming values. However, this approach is limited by the data available in Hypixel's API, which won't include every fortune source.
78
-
79
- ```ts
80
- const options = {
81
- tools: farmingTools // Array of FarmingTool objects, or EliteItemFto objects (not raw NBT data)
82
- armor: armorSet // Array of FarmingArmor objects, an ArmorSet object, or EliteItemDto objects
83
- equipment: equipment // Array of FarmingEquipment objects, or EliteItemDto objects
84
- accessories: accessories // Array of FarmingAccessory objects, or EliteItemDto objects
85
- pets: pets // Array of FarmingPet objects, or raw Hypixel API pet data
86
-
87
- // ... other options (check the type definition)
88
- } satisfies PlayerOptions;
89
-
90
- const player = createFarmingPlayer(options);
91
- // Get a player's Wheat fortune
92
- const cropFortune = player.getCropFortune(Crop.Wheat);
93
-
94
- // Create a calculator for a player's Wheat fortune
95
- const calculator = calculateDetailedAverageDrops({
96
- farmingFortune: player.fortune + cropFortune.fortune,
97
- bountiful: player.selectedTool?.reforge?.name === 'Bountiful',
98
- mooshroom: player.selectedPet?.type === FarmingPets.MooshroomCow,
99
- dicerLevel: player.selectedTool?.item.skyblockId?.match(/DICER_(\d+)/)?.[1] ?? 3) as 1 | 2 | 3,
100
- blocksBroken: blocksBroken,
101
- });
1
+ # Farming Weight
2
+ NPM package for Farming Weight and fortune calculations in Hypixel SkyBlock.
3
+
4
+ Created specifically for the [EliteWebsite](https://github.com/EliteFarmers/Website) and [EliteBot](https://github.com/EliteFarmers/Bot) projects, but can be used for any project, as long as some credit is given per the license.
5
+
6
+ **This is a new package that's changing rapidly, there aren't any comprehensive docs at this time**
7
+
8
+ ## Installation
9
+ ```bash
10
+ npm install farming-weight
11
+ ```
12
+
13
+ ## Usage
14
+
15
+ This package is made with TypeScript, and has type definitions included. While there is a lack of docs, relevant types and autocomplete should help a lot with understanding the package.
16
+
17
+ ### General philosophy
18
+
19
+ The goal of this package is to provide an easy way to pass in existing data and get Farming Weight information back. With this in mind, the **input data is not always raw Hypixel API responses, as those are prone to change**. While this may be inconvenient for some projects, it should be easy enough to convert the data to the format expected by this package, and it moves the burden of keeping up with Hypixel API changes out of this package.
20
+
21
+ ### Farming Weight Calculator
22
+
23
+ The `createFarmingWeightCalculator` function is the main entry point for this package. It takes in a single object with data required for the full farming weight calculation. Data can be skipped, and the weight calculator will skip the related weight that would be calculated from that data.
24
+
25
+ ```ts
26
+ import { createFarmingWeightCalculator } from 'farming-weight';
27
+
28
+ const member = // Get SkyBlock member from elsewhere (https://api.hypixel.net/)
29
+
30
+ const calculator = createFarmingWeightCalculator({
31
+ collection: member.collection,
32
+ farmingXp: member.player_data?.experience?.SKILL_FARMING,
33
+ levelCapUpgrade: member.jacobs_contest?.perks?.farming_level_cap,
34
+ anitaBonusFarmingFortuneLevel?: member.jacobs_contest?.perks?.double_drops,
35
+ minions: member.player_data?.crafted_generators, // You should also include minions crafted from other members on the same profile
36
+ contests: Object.values(member.jacob_contests?.contests ?? {}),
37
+ pests: member.bestiary.kills
38
+ })
39
+
40
+ // Can pass in some values instead of calculating them (you can exclude contests above if you do this)
41
+ calculator.setEarnedMedals({
42
+ diamond: /* Number of diamond medals */,
43
+ platinum: /* Number of platinum medals */,
44
+ gold: /* Number of gold medals */,
45
+ })
46
+
47
+ const weight = calculator.getWeightInfo();
48
+
49
+ console.log(weight.totalWeight);
50
+ // 10000.53 (or whatever the total weight is)
51
+
52
+ console.log(weight.bonusSources);
53
+ // { "Contest Medals": 123.25, "Farming Level": 250, ... }
54
+
55
+ ```
56
+
57
+ ### Rates Calculator
58
+
59
+ This package also contains a rates calculator, which can be used to calculate farming drops and NPC profit for each crop.
60
+
61
+ ```ts
62
+ import { calculateDetailedAverageDrops, Crop } from 'farming-weight';
63
+
64
+ const drops = calculateDetailedAverageDrops({
65
+ farmingFortune: 1500,
66
+ bountiful: true,
67
+ mooshroom: true,
68
+ dicerLevel: 3,
69
+ blocksBroken: 24000 // 100% efficiency for 20 minutes
70
+ });
71
+
72
+ console.log(drops[Crop.Wheat].collection) // 123000 (or whatever the collection is)
73
+ ```
74
+
75
+ ### FarmingPlayer Calculator
76
+
77
+ The `createFarmingPlayer` function is used to create a `FarmingPlayer` object, which can be used to calculate fortune and other player-specific farming values. However, this approach is limited by the data available in Hypixel's API, which won't include every fortune source.
78
+
79
+ ```ts
80
+ const options = {
81
+ tools: farmingTools // Array of FarmingTool objects, or EliteItemFto objects (not raw NBT data)
82
+ armor: armorSet // Array of FarmingArmor objects, an ArmorSet object, or EliteItemDto objects
83
+ equipment: equipment // Array of FarmingEquipment objects, or EliteItemDto objects
84
+ accessories: accessories // Array of FarmingAccessory objects, or EliteItemDto objects
85
+ pets: pets // Array of FarmingPet objects, or raw Hypixel API pet data
86
+
87
+ // ... other options (check the type definition)
88
+ } satisfies PlayerOptions;
89
+
90
+ const player = createFarmingPlayer(options);
91
+ // Get a player's Wheat fortune
92
+ const cropFortune = player.getCropFortune(Crop.Wheat);
93
+
94
+ // Create a calculator for a player's Wheat fortune
95
+ const calculator = calculateDetailedAverageDrops({
96
+ farmingFortune: player.fortune + cropFortune.fortune,
97
+ bountiful: player.selectedTool?.reforge?.name === 'Bountiful',
98
+ mooshroom: player.selectedPet?.type === FarmingPets.MooshroomCow,
99
+ dicerLevel: player.selectedTool?.item.skyblockId?.match(/DICER_(\d+)/)?.[1] ?? 3) as 1 | 2 | 3,
100
+ blocksBroken: blocksBroken,
101
+ });
102
102
  ```
@@ -11,6 +11,16 @@ export declare enum Crop {
11
11
  Wheat = "WHEAT",
12
12
  Seeds = "WHEAT_SEEDS"
13
13
  }
14
+ export interface CropCraft {
15
+ item: string;
16
+ amount?: number;
17
+ takes: number;
18
+ and?: {
19
+ item: string;
20
+ amount: number;
21
+ cost?: number;
22
+ }[];
23
+ }
14
24
  export interface CropInfo {
15
25
  name: string;
16
26
  npc: number;
@@ -19,6 +29,7 @@ export interface CropInfo {
19
29
  replenish?: boolean;
20
30
  exportable?: boolean;
21
31
  startingTool: string;
32
+ crafts: CropCraft[];
22
33
  }
23
34
  export declare const CROP_INFO: Record<Crop, CropInfo>;
24
35
  export declare const MAX_CROP_FORTUNE: Record<Crop, number>;
@@ -19,6 +19,16 @@ export const CROP_INFO = {
19
19
  drops: 2,
20
20
  breaks: 2,
21
21
  startingTool: 'CACTUS_KNIFE',
22
+ crafts: [
23
+ {
24
+ item: 'ENCHANTED_CACTUS_GREEN',
25
+ takes: 160,
26
+ },
27
+ {
28
+ item: 'ENCHANTED_CACTUS',
29
+ takes: 160 * 160,
30
+ },
31
+ ],
22
32
  },
23
33
  [Crop.Carrot]: {
24
34
  name: 'Carrot',
@@ -27,6 +37,23 @@ export const CROP_INFO = {
27
37
  replenish: true,
28
38
  exportable: true,
29
39
  startingTool: 'THEORETICAL_HOE_CARROT_1',
40
+ crafts: [
41
+ {
42
+ item: 'ENCHANTED_CARROT',
43
+ takes: 160,
44
+ },
45
+ {
46
+ item: 'ENCHANTED_GOLDEN_CARROT',
47
+ takes: 128 * 160,
48
+ and: [
49
+ {
50
+ item: 'GOLDEN_CARROT',
51
+ amount: 32,
52
+ cost: 15,
53
+ },
54
+ ],
55
+ },
56
+ ],
30
57
  },
31
58
  [Crop.CocoaBeans]: {
32
59
  name: 'Cocoa Beans',
@@ -35,12 +62,39 @@ export const CROP_INFO = {
35
62
  replenish: true,
36
63
  exportable: true,
37
64
  startingTool: 'COCO_CHOPPER',
65
+ crafts: [
66
+ {
67
+ item: 'ENCHANTED_COCOA',
68
+ takes: 160,
69
+ },
70
+ {
71
+ item: 'ENCHANTED_COOKIE',
72
+ takes: 128 * 160,
73
+ and: [
74
+ {
75
+ item: Crop.Wheat,
76
+ cost: 6,
77
+ amount: 32,
78
+ },
79
+ ],
80
+ },
81
+ ],
38
82
  },
39
83
  [Crop.Melon]: {
40
84
  name: 'Melon',
41
85
  npc: 2,
42
86
  drops: 5,
43
87
  startingTool: 'MELON_DICER',
88
+ crafts: [
89
+ {
90
+ item: 'ENCHANTED_MELON',
91
+ takes: 160,
92
+ },
93
+ {
94
+ item: 'ENCHANTED_MELON_BLOCK',
95
+ takes: 160 * 160,
96
+ },
97
+ ],
44
98
  },
45
99
  [Crop.Mushroom]: {
46
100
  name: 'Mushroom',
@@ -48,6 +102,24 @@ export const CROP_INFO = {
48
102
  drops: 1,
49
103
  exportable: true,
50
104
  startingTool: 'FUNGI_CUTTER',
105
+ crafts: [
106
+ {
107
+ item: 'HUGE_MUSHROOM_1',
108
+ takes: 9,
109
+ },
110
+ {
111
+ item: 'ENCHANTED_HUGE_MUSHROOM_1',
112
+ takes: 9 * 32,
113
+ },
114
+ {
115
+ item: 'HUGE_MUSHROOM_2',
116
+ takes: 9,
117
+ },
118
+ {
119
+ item: 'ENCHANTED_HUGE_MUSHROOM_2',
120
+ takes: 9 * 32,
121
+ },
122
+ ],
51
123
  },
52
124
  [Crop.NetherWart]: {
53
125
  name: 'Nether Wart',
@@ -55,6 +127,16 @@ export const CROP_INFO = {
55
127
  drops: 2.5,
56
128
  replenish: true,
57
129
  startingTool: 'THEORETICAL_HOE_WARTS_1',
130
+ crafts: [
131
+ {
132
+ item: 'ENCHANTED_NETHER_STALK',
133
+ takes: 160,
134
+ },
135
+ {
136
+ item: 'MUTANT_NETHER_STALK',
137
+ takes: 160 * 160,
138
+ },
139
+ ],
58
140
  },
59
141
  [Crop.Potato]: {
60
142
  name: 'Potato',
@@ -62,6 +144,16 @@ export const CROP_INFO = {
62
144
  drops: 3,
63
145
  replenish: true,
64
146
  startingTool: 'THEORETICAL_HOE_POTATO_1',
147
+ crafts: [
148
+ {
149
+ item: 'ENCHANTED_POTATO',
150
+ takes: 160,
151
+ },
152
+ {
153
+ item: 'ENCHANTED_BAKED_POTATO',
154
+ takes: 160 * 160,
155
+ },
156
+ ],
65
157
  },
66
158
  [Crop.Pumpkin]: {
67
159
  name: 'Pumpkin',
@@ -69,6 +161,16 @@ export const CROP_INFO = {
69
161
  drops: 1,
70
162
  exportable: true,
71
163
  startingTool: 'PUMPKIN_DICER',
164
+ crafts: [
165
+ {
166
+ item: 'ENCHANTED_PUMPKIN',
167
+ takes: 160,
168
+ },
169
+ {
170
+ item: 'POLISHED_PUMPKIN',
171
+ takes: 160 * 160,
172
+ },
173
+ ],
72
174
  },
73
175
  [Crop.SugarCane]: {
74
176
  name: 'Sugar Cane',
@@ -76,6 +178,16 @@ export const CROP_INFO = {
76
178
  drops: 2,
77
179
  breaks: 2,
78
180
  startingTool: 'THEORETICAL_HOE_CANE_1',
181
+ crafts: [
182
+ {
183
+ item: 'ENCHANTED_SUGAR',
184
+ takes: 160,
185
+ },
186
+ {
187
+ item: 'ENCHANTED_SUGAR_CANE',
188
+ takes: 160 * 160,
189
+ },
190
+ ],
79
191
  },
80
192
  [Crop.Wheat]: {
81
193
  name: 'Wheat',
@@ -83,6 +195,16 @@ export const CROP_INFO = {
83
195
  drops: 1,
84
196
  exportable: true,
85
197
  startingTool: 'THEORETICAL_HOE_WHEAT_1',
198
+ crafts: [
199
+ {
200
+ item: 'ENCHANTED_WHEAT',
201
+ takes: 160,
202
+ },
203
+ {
204
+ item: 'ENCHANTED_HAY_BALE',
205
+ takes: 160 * 160,
206
+ },
207
+ ],
86
208
  },
87
209
  [Crop.Seeds]: {
88
210
  name: 'Seeds',
@@ -90,6 +212,16 @@ export const CROP_INFO = {
90
212
  drops: 1.5,
91
213
  replenish: true,
92
214
  startingTool: 'THEORETICAL_HOE_WHEAT_1',
215
+ crafts: [
216
+ {
217
+ item: 'ENCHANTED_SEEDS',
218
+ takes: 160,
219
+ },
220
+ {
221
+ item: 'BOX_OF_SEEDS',
222
+ takes: 160 * 160,
223
+ },
224
+ ],
93
225
  },
94
226
  };
95
227
  // TODO: Calculate this from a list of sources
@@ -1 +1 @@
1
- {"version":3,"file":"crops.js","sourceRoot":"","sources":["../../src/constants/crops.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,IAYX;AAZD,WAAY,IAAI;IACf,yBAAiB,CAAA;IACjB,8BAAsB,CAAA;IACtB,iCAAyB,CAAA;IACzB,uBAAe,CAAA;IACf,wCAAgC,CAAA;IAChC,mCAA2B,CAAA;IAC3B,8BAAsB,CAAA;IACtB,2BAAmB,CAAA;IACnB,gCAAwB,CAAA;IACxB,uBAAe,CAAA;IACf,6BAAqB,CAAA;AACtB,CAAC,EAZW,IAAI,KAAJ,IAAI,QAYf;AAYD,MAAM,CAAC,MAAM,SAAS,GAA2B;IAChD,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE;QACd,IAAI,EAAE,QAAQ;QACd,GAAG,EAAE,CAAC;QACN,KAAK,EAAE,CAAC;QACR,MAAM,EAAE,CAAC;QACT,YAAY,EAAE,cAAc;KAC5B;IACD,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE;QACd,IAAI,EAAE,QAAQ;QACd,GAAG,EAAE,CAAC;QACN,KAAK,EAAE,CAAC;QACR,SAAS,EAAE,IAAI;QACf,UAAU,EAAE,IAAI;QAChB,YAAY,EAAE,0BAA0B;KACxC;IACD,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE;QAClB,IAAI,EAAE,aAAa;QACnB,GAAG,EAAE,CAAC;QACN,KAAK,EAAE,CAAC;QACR,SAAS,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AAE,IAAI,EAAE,4BAA4B;CAChD,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAgC;IACzD,IAAI,CAAC,MAAM;IACX,IAAI,CAAC,MAAM;IACX,IAAI,CAAC,UAAU;IACf,IAAI,CAAC,KAAK;IACV,IAAI,CAAC,QAAQ;IACb,IAAI,CAAC,UAAU;IACf,IAAI,CAAC,MAAM;IACX,IAAI,CAAC,OAAO;IACZ,IAAI,CAAC,SAAS;IACd,IAAI,CAAC,KAAK;CACV,CAAC;AAEF,MAAM,CAAC,MAAM,wBAAwB,GAAW,CAAC,GAAG,aAAa,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;AAE/E,MAAM,CAAC,MAAM,uBAAuB,GAAG,EAAE,CAAC"}
@@ -37,5 +37,13 @@ export interface FortuneRequiredCalculatorOptions {
37
37
  }
38
38
  export declare function getFortuneRequiredForCollection(options: FortuneRequiredCalculatorOptions): number;
39
39
  export declare function getNPCProfitFromCrops(crop: Crop, amount: number): number;
40
+ interface PossibleProfit {
41
+ items: number;
42
+ fractionalItems: number;
43
+ remainder: number;
44
+ cost: number;
45
+ fractionalCost: number;
46
+ }
47
+ export declare function getPossibleResultsFromCrops(crop: Crop, amount: number): Record<string, PossibleProfit>;
40
48
  export declare function getCropInfo(crop: Crop): CropInfo;
41
49
  export {};
@@ -178,6 +178,33 @@ export function getNPCProfitFromCrops(crop, amount) {
178
178
  return 0;
179
179
  return npc * amount;
180
180
  }
181
+ export function getPossibleResultsFromCrops(crop, amount) {
182
+ const { crafts } = getCropInfo(crop);
183
+ return {
184
+ [crop]: {
185
+ items: amount,
186
+ fractionalItems: amount,
187
+ remainder: 0,
188
+ cost: 0,
189
+ fractionalCost: 0,
190
+ },
191
+ ...crafts.reduce((acc, curr) => {
192
+ const items = Math.floor(amount / curr.takes);
193
+ const remainder = amount % curr.takes;
194
+ const cost = curr.and?.reduce((sum, curr) => sum + (curr.cost ?? 0) * curr.amount * items, 0);
195
+ const fractionalItems = amount / curr.takes;
196
+ const fractionalCost = curr.and?.reduce((sum, curr) => sum + (curr.cost ?? 0) * curr.amount * fractionalItems, 0);
197
+ acc[curr.item] = {
198
+ items,
199
+ remainder,
200
+ cost: cost ?? 0,
201
+ fractionalItems,
202
+ fractionalCost: fractionalCost ?? 0,
203
+ };
204
+ return acc;
205
+ }, {}),
206
+ };
207
+ }
181
208
  export function getCropInfo(crop) {
182
209
  return CROP_INFO[crop] ?? {};
183
210
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ratecalc.js","sourceRoot":"","sources":["../../src/util/ratecalc.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAY,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACpF,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAC7C,OAAO,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAE,4BAA4B,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AASvD,MAAM,KAAK,GAAG;IACb,IAAI,CAAC,MAAM;IACX,IAAI,CAAC,MAAM;IACX,IAAI,CAAC,UAAU;IACf,IAAI,CAAC,KAAK;IACV,IAAI,CAAC,QAAQ;IACb,IAAI,CAAC,UAAU;IACf,IAAI,CAAC,MAAM;IACX,IAAI,CAAC,OAAO;IACZ,IAAI,CAAC,SAAS;IACd,IAAI,CAAC,KAAK;IACV,IAAI,CAAC,KAAK;CACD,CAAC;AAEX,MAAM,UAAU,qBAAqB,CAAC,OAA8B;IACnE,MAAM,MAAM,GAAG,EAA0B,CAAC;IAE1C,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE;QACzB,MAAM,CAAC,IAAI,CAAC,GAAG,sBAAsB,CAAC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AAI,CAAC,CAAC,GAAG,IAAI,CAAC,MAAM,GAAG,KAAK,EAAE,CAAC,CAAC,CAAC;YAE9F,MAAM,eAAe,GAAG,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC;YAC5C,MAAM,cAAc,GAAG,IAAI,CAAC,GAAG,EAAE,MAAM,CACtC,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE,CAAC,GAAG,GAAG,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,MAAM,GAAG,eAAe,EACrE,CAAC,CACD,CAAC;YAEF,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG;gBAChB,KAAK;gBACL,SAAS;gBACT,IAAI,EAAE,IAAI,IAAI,CAAC;gBACf,eAAe;gBACf,cAAc,EAAE,cAAc,IAAI,CAAC;aACnC,CAAC;YAEF,OAAO,GAAG,CAAC;QACZ,CAAC,EAAE,EAAE,CAAC;KACN,CAAC;AACH,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,IAAU;IACrC,OAAO,SAAS,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;AAC9B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "farming-weight",
3
- "version": "0.8.3",
3
+ "version": "0.8.5",
4
4
  "description": "Tools for calculating farming weight and fortune in Hypixel Skyblock",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -9,7 +9,7 @@
9
9
  "scripts": {
10
10
  "build": "tsc",
11
11
  "format": "pnpm biome check --write",
12
- "lint": "pnpm biome lint",
12
+ "lint": "pnpm biome check",
13
13
  "test": "vitest"
14
14
  },
15
15
  "keywords": ["farming", "weight", "farming-weight", "skyblock", "hypixel", "hypixel-skyblock", "fortune"],
@@ -1,15 +0,0 @@
1
- import { FarmingAccessoryInfo } from '../constants/accessories';
2
- import { Rarity } from '../constants/reforges';
3
- import { EliteItemDto } from './item';
4
- export declare class FarmingAccessory {
5
- readonly item: EliteItemDto;
6
- readonly info: FarmingAccessoryInfo;
7
- readonly rarity: Rarity;
8
- readonly recombobulated: boolean;
9
- fortune: number;
10
- fortuneBreakdown: Record<string, number>;
11
- constructor(item: EliteItemDto);
12
- private sumFortune;
13
- static isValid(item: EliteItemDto): boolean;
14
- static fromArray(items: EliteItemDto[]): FarmingAccessory[];
15
- }