Skip to content
This repository was archived by the owner on Feb 25, 2026. It is now read-only.

Commit 308b591

Browse files
authored
Merge pull request #310 from osamabeinglagging/master
Some Minor Fixes and Improvements Regarding Pest Farmer
2 parents ad2609c + a8ff7b1 commit 308b591

File tree

8 files changed

+187
-155
lines changed

8 files changed

+187
-155
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
run/
44
build/
55
.gradle/
6-
6+
*.swp

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ baseGroup=com.jelly.farmhelperv2
44
mcVersion=1.8.9
55
modid=farmhelperv2
66
modName=FarmHelper
7-
version=2.9.6
7+
version=2.9.6-pre1
88
shouldRelease=true

src/main/java/com/jelly/farmhelperv2/command/FarmHelperMainCommand.java

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import com.jelly.farmhelperv2.FarmHelper;
88
import com.jelly.farmhelperv2.config.FarmHelperConfig;
99
import com.jelly.farmhelperv2.feature.impl.AutoWardrobe;
10+
import com.jelly.farmhelperv2.feature.impl.PestFarmer;
1011
import com.jelly.farmhelperv2.handler.GameStateHandler;
1112
import com.jelly.farmhelperv2.pathfinder.FlyPathFinderExecutor;
1213
import com.jelly.farmhelperv2.util.LogUtils;
@@ -87,13 +88,9 @@ public void update() {
8788
FarmHelperConfig.checkForUpdate();
8889
}
8990

90-
@SubCommand(aliases = {"stp"})
91-
public void swapToPest() {
92-
AutoWardrobe.instance.swapTo(FarmHelperConfig.pestFarmingSet0Slot, Arrays.asList(FarmHelperConfig.pestFarmingEq0.split("\\|")));
93-
}
94-
95-
@SubCommand(aliases = {"stf"})
96-
public void swapToFarm() {
97-
AutoWardrobe.instance.swapTo(FarmHelperConfig.pestFarmingSet1Slot, Arrays.asList(FarmHelperConfig.pestFarmingEq1.split("\\|")));
91+
@SubCommand(aliases = {"msc"})
92+
public void markSpawnChanged() {
93+
PestFarmer.instance.wasSpawnChanged = true;
94+
System.out.println("Changed: " + PestFarmer.instance.wasSpawnChanged);
9895
}
9996
}

src/main/java/com/jelly/farmhelperv2/config/FarmHelperConfig.java

Lines changed: 37 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1240,11 +1240,6 @@ public class FarmHelperConfig extends Config {
12401240
)
12411241
public static int pestAdditionalGUIDelay = 0;
12421242

1243-
@Switch(
1244-
name = "Force Enable Pest Destroyer at X Pests", category = PESTS_DESTROYER, subcategory = "Pests Destroyer"
1245-
)
1246-
public static boolean pestForceEnable = false;
1247-
12481243
@Switch(
12491244
name = "Sprint while flying", category = PESTS_DESTROYER, subcategory = "Pests Destroyer",
12501245
description = "Sprints while flying"
@@ -1449,7 +1444,7 @@ public static void triggerManuallyPestsDestroyer() {
14491444

14501445
//<editor-fold desc="PEST FARMER">
14511446
@Header(
1452-
text = "Read the comments below this page before using pest farmer.",
1447+
text = "Read the FarmHelper Guide to understand how to use this properly.",
14531448
category = PEST_FARMER, size = 2
14541449
)
14551450
public static boolean ignored1;
@@ -1460,17 +1455,23 @@ public static void triggerManuallyPestsDestroyer() {
14601455
)
14611456
public static boolean pestFarming = false;
14621457

1458+
@Switch(
1459+
name = "Use Squeaky Mousemat To Set Angle", category = PEST_FARMER,
1460+
description = "Uses Squeaky Mousemat Ability to set Angle (Must be Preset)"
1461+
)
1462+
public static boolean pestFarmingUseMousemat = false;
1463+
14631464
@Slider(
1464-
name = "Farming Armor Slot", category = PEST_FARMER,
1465+
name = "Fermento Armor Slot", category = PEST_FARMER,
14651466
min = 1, max = 18
14661467
)
1467-
public static int pestFarmingSet0Slot = 1;
1468+
public static int pestFarmingFermentoSlot = 1;
14681469

14691470
@Slider(
1470-
name = "Pest Chance Armor Slot", category = PEST_FARMER,
1471+
name = "Biohazard Armor Slot", category = PEST_FARMER,
14711472
min = 1, max = 18
14721473
)
1473-
public static int pestFarmingSet1Slot = 1;
1474+
public static int pestFarmingBiohazardSlot = 1;
14741475

14751476
@Slider(
14761477
name = "Pest Spawn Timer (In seconds)", category = PEST_FARMER,
@@ -1479,26 +1480,32 @@ public static void triggerManuallyPestsDestroyer() {
14791480
)
14801481
public static int pestFarmingWaitTime = 255;
14811482

1483+
@Switch(
1484+
name = "Set Spawn After Armor Swap(Read Desc)", category = PEST_FARMER,
1485+
description = "Sets spawn after swapping armor. Sicne farmhelper does not have anything to farm shards, use this to kill manually while ensuring macro returns back to spawn automacially."
1486+
)
1487+
public static boolean pestFarmingSetSpawn = false;
1488+
14821489
@Switch(
14831490
name = "Swap Equipments", category = PEST_FARMER
14841491
)
14851492
public static boolean pestFarmingSwapEq = false;
14861493

14871494
@Text(
14881495
name = "Farming Fortune Equipments", category = PEST_FARMER, size=2,
1489-
description = "Separate Equipment Names With |", placeholder = "Lotus Necklace|Lotus Cloak|Lotus Belt"
1496+
description = "Separate Equipment Names With |", placeholder = "Ex: Lotus Necklace|Lotus Cloak|Lotus Belt|Lotus Bracelet"
14901497
)
14911498
public static String pestFarmingEq0 = "";
14921499

14931500
@Text(
14941501
name = "Pest Chance Equipments", category = PEST_FARMER, size=2,
1495-
description = "Separate Equipment Names With |", placeholder = "Pesthunter's Necklace|Pesthunter's Cloak|Pesthunter's Belt"
1502+
description = "Separate Equipment Names With |", placeholder = "Ex: Pesthunter's Necklace|Pesthunter's Belt|Pesthunter's Gloves|Pest Vest"
14961503
)
14971504
public static String pestFarmingEq1 = "";
14981505

14991506
@Slider(
15001507
name = "Equipment Click Delay", category = PEST_FARMER,
1501-
min = 50, max = 2000, step = 10
1508+
min = 300, max = 2000, step = 10
15021509
)
15031510
public static int pestFarmerEquipmentClickDelay = 400;
15041511

@@ -1508,7 +1515,7 @@ public static void triggerManuallyPestsDestroyer() {
15081515
public static boolean pestFarmerKillPests = false;
15091516

15101517
@Switch(
1511-
name = "Cast Rod After Warping", category = PEST_FARMER
1518+
name = "Cast Rod After Killing", category = PEST_FARMER
15121519
)
15131520
public static boolean pestFarmerCastRod = false;
15141521

@@ -1518,42 +1525,6 @@ public static void triggerManuallyPestsDestroyer() {
15181525
)
15191526
public static int pestFarmerStartKillAt = 1;
15201527

1521-
@Info(
1522-
text = "It's supposed to swap armor before pest spawns, swap back after pest spawns and kill with Pest Destryoer/the other one.",
1523-
type = InfoType.INFO, category = PEST_FARMER, size = 2
1524-
)
1525-
public static boolean ignored0;
1526-
@Info(
1527-
text = "Use this Auto-Pet Rule:",
1528-
type = InfoType.INFO, category = PEST_FARMER, size = 2
1529-
)
1530-
public static boolean ignored2;
1531-
@Info(
1532-
text = " 1. On Gain Crop Collection -> Farming Pet, Except if slug is Equipped",
1533-
type = InfoType.INFO, category = PEST_FARMER, size = 2
1534-
)
1535-
public static boolean ignored3;
1536-
@Info(
1537-
text = " 2. On Equip Farming Armor -> Farming Pet",
1538-
type = InfoType.INFO, category = PEST_FARMER, size = 2
1539-
)
1540-
public static boolean ignored4;
1541-
@Info(
1542-
text = " 3. On Equip Pest Chance Armor -> Slug Pet",
1543-
type = InfoType.INFO, category = PEST_FARMER, size = 2
1544-
)
1545-
public static boolean ignored5;
1546-
@Info(
1547-
text = " 4. On Enter Combat -> Hedgehog Pet",
1548-
type = InfoType.INFO, category = PEST_FARMER, size = 2
1549-
)
1550-
public static boolean ignored6;
1551-
@Info(
1552-
text = "Use Armor Swapper in Pest Destroyer. Swap to Farming Armor On Start Just in case Pest Farmer doesn't do that itself.",
1553-
type = InfoType.INFO, category = PEST_FARMER, size = 2
1554-
)
1555-
public static boolean ignored7;
1556-
15571528
//</editor-fold>
15581529
//<editor-fold desc="DISCORD INTEGRATION">
15591530
//<editor-fold desc="Webhook Discord">
@@ -2438,6 +2409,11 @@ public static void triggerManuallyAutoComposter() {
24382409
)
24392410
public static boolean debugMode = false;
24402411

2412+
@Switch(
2413+
name = "New Fly", category = DEBUG
2414+
)
2415+
public static boolean debugNewFly = true;
2416+
24412417
//</editor-fold>
24422418

24432419
//<editor-fold desc="Debug Hud">
@@ -2725,7 +2701,17 @@ public FarmHelperConfig() {
27252701
registerKeyBind(tpToInfestedPlot, () -> {
27262702
List<Integer> infestedPlots = GameStateHandler.getInstance().getInfestedPlots();
27272703
if (infestedPlots.isEmpty()) return;
2728-
mc.thePlayer.sendChatMessage("/plottp " + infestedPlots.get(0));
2704+
2705+
while (!infestedPlots.isEmpty()) {
2706+
int curr = infestedPlots.get(0);
2707+
if (curr == GameStateHandler.getInstance().getCurrentPlot()
2708+
&& GameStateHandler.getInstance().getPestsCount() == 0) {
2709+
infestedPlots.remove(0);
2710+
continue;
2711+
}
2712+
mc.thePlayer.sendChatMessage("/plottp " + curr);
2713+
break;
2714+
}
27292715
});
27302716
// registerKeyBind(debugKeybind2, () -> {
27312717
// MovingObjectPosition objectMouseOver = Minecraft.getMinecraft().objectMouseOver;
Binary file not shown.

0 commit comments

Comments
 (0)