Skip to content

Commit

Permalink
Merge pull request #165 from osamabeinglagging/master
Browse files Browse the repository at this point in the history
Fixed AutoSprayonator and Added AutoBazaar
  • Loading branch information
onixiya1337 authored Dec 21, 2023
2 parents b95a77b + 703ce4c commit 96a0756
Show file tree
Hide file tree
Showing 7 changed files with 935 additions and 627 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ baseGroup=com.jelly.farmhelperv2
mcVersion=1.8.9
modid=farmhelperv2
modName=FarmHelper
version=2.2.8
version=2.2.9-pre1
shouldRelease=false
96 changes: 47 additions & 49 deletions src/main/java/com/jelly/farmhelperv2/config/FarmHelperConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import com.jelly.farmhelperv2.util.LogUtils;
import com.jelly.farmhelperv2.util.PlayerUtils;
import com.jelly.farmhelperv2.util.helper.AudioManager;
import lombok.Getter;
import net.minecraft.client.Minecraft;
import net.minecraftforge.fml.common.Loader;
import org.lwjgl.input.Keyboard;
Expand Down Expand Up @@ -491,70 +490,64 @@ public class FarmHelperConfig extends Config {
public static boolean sendAnalyticData = true;
//</editor-fold>

//<editor-fold desc="Sprayonator">
//<editor-fold desc="Auto Sprayonator">
@Switch(
name = "Auto Sprayonator", category = MISCELLANEOUS, subcategory = "Sprayonator"
name = "Auto Sprayonator", category = MISCELLANEOUS, subcategory = "AutoSprayonator"
)
public static boolean enableSprayonator;
public static boolean autoSprayonatorEnable = false;

@Dropdown(
name = "Type", category = MISCELLANEOUS, subcategory = "Sprayonator",
description = "Item to spray plot with",
options = {
"Compost (Earthworm & Mosquito)",
"Honey Jar (Moth & Cricket)",
"Dung (Beetle & Fly)",
"Plant Matter (Locust & Slug)",
"Tasty Cheese (Rat & Mite)"
}, size = 5
)
public static int sprayonatorType;

@Getter
public enum SPRAYONATOR_ITEM {
COMPOST("Compost"),
HONEY_JAR("Honey Jar"),
DUNG("Dung"),
PLANT_MATTER("Plant Matter"),
TASTY_CHEESE("Tasty Cheese"),
NONE("NONE");

final String itemName;

SPRAYONATOR_ITEM(final String item_name) {
this.itemName = item_name;
}
}
name = "Type", category = MISCELLANEOUS, subcategory = "AutoSprayonator",
description = "Item to spray plot with",
options = {
"Compost (Earthworm & Mosquito)",
"Honey Jar (Moth & Cricket)",
"Dung (Beetle & Fly)",
"Plant Matter (Locust & Slug)",
"Tasty Cheese (Rat & Mite)"
}, size = 5
)
public static int autoSprayonatorType = 0;

@Switch(
name = "Inventory Only", category = MISCELLANEOUS, subcategory = "Sprayonator"
@Slider(
name = "Sprayonator Slot", category = MISCELLANEOUS, subcategory = "AutoSprayonator",
min = 1, max = 8,
step = 1,
description = "Slot to move sprayonator to"
)
public static boolean sprayonatorItemInventoryOnly;
public static int autoSprayonatorSlot = 1;

@Slider(
name = "Sprayonator Slot", category = MISCELLANEOUS, subcategory = "Sprayonator",
min = 1, max = 8,
step = 1,
description = "Slot to move sprayonator to"
name = "Additional Delay", category = MISCELLANEOUS, subcategory = "AutoSprayonator",
description = "Additional delay between actions (in milliseconds)",
min = 0, max = 5000, step = 1
)
public static int sprayonatorSlot = 1;
public static int autoSprayonatorAdditionalDelay = 500;

@Slider(
name = "Additional Delay", category = MISCELLANEOUS, subcategory = "Sprayonator",
description = "Additional delay between actions (in milliseconds)",
min = 0, max = 5000, step = 1
@Switch(
name = "Auto Buy item from Bazaar", category = MISCELLANEOUS, subcategory = "AutoSprayonator",
description = "Auto buy necessary sprayonator item from bazaar if none is in the inventory"
)
public static int sprayonatorAdditionalDelay = 500;
public static boolean autoSprayonatorAutoBuyItem = false;

@Number(
name = "Buy Amount", category = MISCELLANEOUS, subcategory = "AutoSprayonator",
description = "Amount of item to buy from bazaar",
min = 1, max = 64
)
public static int autoSprayonatorAutoBuyAmount = 1;

@Button(
name = "Reset Plots", category = MISCELLANEOUS, subcategory = "Sprayonator",
text = "Click Here",
description = "Resets the cached data for sprayonator"
name = "Reset Plots", category = MISCELLANEOUS, subcategory = "AutoSprayonator",
text = "Click Here",
description = "Resets the cached data for sprayonator"
)
Runnable resetSprayonatorPlots = () -> {
Runnable _ = () -> {
AutoSprayonator.getInstance().resetPlots();
};

//</editor-fold>

//</editor-fold>

//<editor-fold desc="FAILSAFES">
Expand Down Expand Up @@ -1033,6 +1026,12 @@ public enum SPRAYONATOR_ITEM {
)
public static boolean infoCompactors;

@Slider(
name = "Max Spend Limit (in Thousands Per Purchase)", category = VISITORS_MACRO, subcategory = "Visitors Macro",
min = 10, max = 2000, step = 1
)
public static int visitorsMacroMaxSpendLimit = 700;

@Button(
name = "Start the macro manually", category = VISITORS_MACRO, subcategory = "Visitors Macro",
description = "Triggers the visitors macro",
Expand Down Expand Up @@ -1559,7 +1558,6 @@ public FarmHelperConfig() {
this.addDependency("autoSellSacksPlacement", "enableAutoSell");
this.addDependency("autoSellFunction", "enableAutoSell");


this.addDependency("petSwapperDelay", "enablePetSwapper");
this.addDependency("petSwapperName", "enablePetSwapper");

Expand Down
43 changes: 22 additions & 21 deletions src/main/java/com/jelly/farmhelperv2/feature/FeatureManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,27 +20,28 @@ public static FeatureManager getInstance() {

public List<IFeature> fillFeatures() {
List<IFeature> featuresList = Arrays.asList(
AntiStuck.getInstance(),
AutoCookie.getInstance(),
AutoGodPot.getInstance(),
AutoReconnect.getInstance(),
AutoRepellent.getInstance(),
AutoSell.getInstance(),
BanInfoWS.getInstance(),
DesyncChecker.getInstance(),
Failsafe.getInstance(),
Freelook.getInstance(),
LagDetector.getInstance(),
LeaveTimer.getInstance(),
PerformanceMode.getInstance(),
PestsDestroyer.getInstance(),
AutoSprayonator.getInstance(),
PetSwapper.getInstance(),
PlotCleaningHelper.getInstance(),
ProfitCalculator.getInstance(),
Scheduler.getInstance(),
UngrabMouse.getInstance(),
VisitorsMacro.getInstance()
AutoBazaar.getInstance(),
AntiStuck.getInstance(),
AutoCookie.getInstance(),
AutoGodPot.getInstance(),
AutoReconnect.getInstance(),
AutoRepellent.getInstance(),
AutoSell.getInstance(),
BanInfoWS.getInstance(),
DesyncChecker.getInstance(),
Failsafe.getInstance(),
Freelook.getInstance(),
LagDetector.getInstance(),
LeaveTimer.getInstance(),
PerformanceMode.getInstance(),
PestsDestroyer.getInstance(),
AutoSprayonator.getInstance(),
PetSwapper.getInstance(),
PlotCleaningHelper.getInstance(),
ProfitCalculator.getInstance(),
Scheduler.getInstance(),
UngrabMouse.getInstance(),
VisitorsMacro.getInstance()
);
features.addAll(featuresList);
return features;
Expand Down
Loading

0 comments on commit 96a0756

Please sign in to comment.