aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md4
-rw-r--r--src/main/java/me/Danker/DankersSkyblockMod.java2
-rw-r--r--src/main/java/me/Danker/commands/DHelpCommand.java1
-rw-r--r--src/main/java/me/Danker/commands/DankerGuiCommand.java3
-rw-r--r--src/main/java/me/Danker/commands/LobbyBankCommand.java139
-rw-r--r--src/main/java/me/Danker/commands/ToggleCommand.java34
-rw-r--r--src/main/java/me/Danker/features/BlockAbilities.java12
-rw-r--r--src/main/java/me/Danker/features/HideTooltipsInExperiments.java3
-rw-r--r--src/main/java/me/Danker/features/SlayerESP.java113
-rw-r--r--src/main/java/me/Danker/gui/DankerGui.java22
-rw-r--r--src/main/java/me/Danker/handlers/ConfigHandler.java3
11 files changed, 329 insertions, 7 deletions
diff --git a/README.md b/README.md
index 026d08d..5005273 100644
--- a/README.md
+++ b/README.md
@@ -16,6 +16,8 @@ Discord Server: https://discord.gg/QsEkNQS
- Golden T10/T6/T4 enchant display
- Block AOTD ability
- Block Livid Dagger ability
+- Block Shadow Fury ability
+- Block right click with special hoes
- Block placing Flower of Truth/Spirit Sceptre
- Disable Spirit Sceptre messages
- Disable Midas Staff messages
@@ -40,6 +42,7 @@ Discord Server: https://discord.gg/QsEkNQS
- Find correct Livid (with graphic display of HP)
- Experimentation solvers (Ultrasequencer, Chronomatron, Superpairs)
- Hide tooltips in experiment addons
+- Hide tooltips in Melody's Harp
- Pet background colors based on level
- Golem spawning alerts
- Skill xp/hour tracker
@@ -75,6 +78,7 @@ Discord Server: https://discord.gg/QsEkNQS
- /onlyslayer <zombie/spider/wolf> <1/2/3/4> - Stops you from starting a slayer quest other than the one specified.
- /skilltracker <start/stop/reset> - Text display for skill xp/hour.
- /reparty - Disbands and reparties all members in the party
+- /fairysouls - Check the fairysouls of a player
## Keybinds
- Open Maddox menu - M by default.
diff --git a/src/main/java/me/Danker/DankersSkyblockMod.java b/src/main/java/me/Danker/DankersSkyblockMod.java
index dbb79dc..46c1547 100644
--- a/src/main/java/me/Danker/DankersSkyblockMod.java
+++ b/src/main/java/me/Danker/DankersSkyblockMod.java
@@ -129,6 +129,7 @@ public class DankersSkyblockMod {
MinecraftForge.EVENT_BUS.register(new UpdateChecker());
MinecraftForge.EVENT_BUS.register(new WatcherReadyAlert());
MinecraftForge.EVENT_BUS.register(new WaterSolver());
+ MinecraftForge.EVENT_BUS.register(new SlayerESP());
ConfigHandler.reloadConfig();
GoldenEnchants.init();
@@ -169,6 +170,7 @@ public class DankersSkyblockMod {
ClientCommandHandler.instance.registerCommand(new DankerGuiCommand());
ClientCommandHandler.instance.registerCommand(new SkillTrackerCommand());
ClientCommandHandler.instance.registerCommand(new FairySoulsCommand());
+ ClientCommandHandler.instance.registerCommand(new LobbyBankCommand());
}
@EventHandler
diff --git a/src/main/java/me/Danker/commands/DHelpCommand.java b/src/main/java/me/Danker/commands/DHelpCommand.java
index c1ae5af..844bb91 100644
--- a/src/main/java/me/Danker/commands/DHelpCommand.java
+++ b/src/main/java/me/Danker/commands/DHelpCommand.java
@@ -55,6 +55,7 @@ public class DHelpCommand extends CommandBase {
EnumChatFormatting.GOLD + " /onlyslayer <zombie/spider/wolf> <1/2/3/4>" + EnumChatFormatting.AQUA + " - Stops you from starting a slayer quest other than the one specified.\n" +
EnumChatFormatting.GOLD + " /skilltracker <start/stop/reset>" + EnumChatFormatting.AQUA + " - Text display for skill xp/hour.\n" +
EnumChatFormatting.GOLD + " /reparty " + EnumChatFormatting.AQUA + " - Disbands and reparties all members in the party.\n" +
+ EnumChatFormatting.GOLD + " /lobbybank " + EnumChatFormatting.AQUA + " - Uses API to find the average bank total of the lobby, as well the three players with the highest total money in the bank(and purse).\n" +
EnumChatFormatting.GREEN + " Open Maddox Menu" + EnumChatFormatting.AQUA + " - M by default.\n" +
EnumChatFormatting.GREEN + " Start/Stop Skill Tracker" + EnumChatFormatting.AQUA + " - Numpad 5 by default.\n"));
}
diff --git a/src/main/java/me/Danker/commands/DankerGuiCommand.java b/src/main/java/me/Danker/commands/DankerGuiCommand.java
index fff1ce7..fdd8196 100644
--- a/src/main/java/me/Danker/commands/DankerGuiCommand.java
+++ b/src/main/java/me/Danker/commands/DankerGuiCommand.java
@@ -88,6 +88,9 @@ public class DankerGuiCommand extends CommandBase {
debug.append("[superpairs][").append(ToggleCommand.superpairsToggled).append("]\n");
debug.append("[hidetooltipsinaddons][").append(ToggleCommand.hideTooltipsInExperimentAddonsToggled).append("]\n");
debug.append("[pickblock][").append(ToggleCommand.swapToPickBlockToggled).append("]\n");
+ debug.append("[shadowFuryAbility][").append(ToggleCommand.shadowFuryToggled).append("]\n");
+ debug.append("[specialhoe][").append(ToggleCommand.specialHoeRightClick).append("]\n");
+ debug.append("[melodyTooltips][").append(ToggleCommand.melodyTooltips).append("]\n");
debug.append("# Locations\n");
debug.append("[coords][").append(MoveCommand.coordsXY[0]).append(", ").append(MoveCommand.coordsXY[1]).append("]\n");
debug.append("[display][").append(MoveCommand.displayXY[0]).append(", ").append(MoveCommand.displayXY[1]).append("]\n");
diff --git a/src/main/java/me/Danker/commands/LobbyBankCommand.java b/src/main/java/me/Danker/commands/LobbyBankCommand.java
new file mode 100644
index 0000000..5c1a63b
--- /dev/null
+++ b/src/main/java/me/Danker/commands/LobbyBankCommand.java
@@ -0,0 +1,139 @@
+package me.Danker.commands;
+
+import com.google.gson.JsonArray;
+import com.google.gson.JsonObject;
+import me.Danker.DankersSkyblockMod;
+import me.Danker.handlers.APIHandler;
+import me.Danker.handlers.ConfigHandler;
+import me.Danker.utils.Utils;
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.network.NetworkPlayerInfo;
+import net.minecraft.command.CommandBase;
+import net.minecraft.command.CommandException;
+import net.minecraft.command.ICommandSender;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.util.ChatComponentText;
+import net.minecraft.util.EnumChatFormatting;
+
+import java.util.*;
+import java.util.stream.Collectors;
+
+public class LobbyBankCommand extends CommandBase {
+
+ @Override
+ public String getCommandName() {
+ return "lobbybank";
+ }
+
+ @Override
+ public String getCommandUsage(ICommandSender sender) {
+ return "/" + getCommandName();
+ }
+
+ @Override
+ public int getRequiredPermissionLevel() {
+ return 0;
+ }
+
+ @Override
+ public void processCommand(ICommandSender sender, String[] args) throws CommandException {
+ EntityPlayer playerSP = (EntityPlayer) sender;
+ Map<String, Double> unsortedBankList = new HashMap<>();
+ ArrayList<Double> lobbyBanks = new ArrayList<>();
+ // Check key
+ String key = ConfigHandler.getString("api", "APIKey");
+ if (key.equals("")) {
+ playerSP.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "API key not set. Use /setkey."));
+ return;
+ }
+
+ new Thread(() -> {
+ try {
+ // Create deep copy of players to prevent passing reference and ConcurrentModificationException
+ Collection<NetworkPlayerInfo> players = new ArrayList<>(Minecraft.getMinecraft().getNetHandler().getPlayerInfoMap());
+ playerSP.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Checking skill average of lobby. Estimated time: " + (int) (players.size() * 1.2 + 1) + " seconds."));
+ // Send request every .6 seconds, leaving room for another 20 requests per minute
+
+ for (final NetworkPlayerInfo player : players) {
+ if (player.getGameProfile().getName().startsWith("!")) continue;
+ // Manually get latest profile to use reduced requests on extra achievement API
+ String UUID = player.getGameProfile().getId().toString().replaceAll("-", "");
+ long biggestLastSave = 0;
+ int profileIndex = -1;
+ Thread.sleep(600);
+ JsonObject profileResponse = APIHandler.getResponse("https://api.hypixel.net/skyblock/profiles?uuid=" + UUID + "&key=" + key);
+ if (!profileResponse.get("success").getAsBoolean()) {
+ String reason = profileResponse.get("cause").getAsString();
+ System.out.println("User " + player.getGameProfile().getName() + " failed with reason: " + reason);
+ continue;
+ }
+ if (profileResponse.get("profiles").isJsonNull()) continue;
+
+ JsonArray profiles = profileResponse.get("profiles").getAsJsonArray();
+ for (int i = 0; i < profiles.size(); i++) {
+ JsonObject profile = profiles.get(i).getAsJsonObject();
+ if (!profile.get("members").getAsJsonObject().get(UUID).getAsJsonObject().has("last_save"))
+ continue;
+ if (profile.get("members").getAsJsonObject().get(UUID).getAsJsonObject().get("last_save").getAsLong() > biggestLastSave) {
+ biggestLastSave = profile.get("members").getAsJsonObject().get(UUID).getAsJsonObject().get("last_save").getAsLong();
+ profileIndex = i;
+ }
+ }
+ if (profileIndex == -1 || biggestLastSave == 0) continue;
+
+ JsonObject latestProfile = profiles.get(profileIndex).getAsJsonObject().get("members").getAsJsonObject().get(UUID).getAsJsonObject();
+ boolean hasBanking = profiles.get(profileIndex).getAsJsonObject().has("banking");
+
+ // Get SA
+ double coin_purse;
+ // Add bank to lobby banks
+ // Put bank in HashMap
+
+ if (latestProfile.has("coin_purse")) {
+ coin_purse = latestProfile.get("coin_purse").getAsDouble();
+ if (hasBanking == true) {
+ coin_purse += profiles.get(profileIndex).getAsJsonObject().get("banking").getAsJsonObject().get("balance").getAsDouble();
+
+ }
+
+ unsortedBankList.put(player.getGameProfile().getName(), coin_purse); // Put bank in HashMap
+ lobbyBanks.add(coin_purse); // Add bank to lobby banks
+
+ }
+ }
+
+ // I have no idea how this works, or even what :: does but this sorts the skill averages
+ Map<String, Double> sortedBankList = unsortedBankList.entrySet().stream()
+ .sorted(Map.Entry.<String, Double>comparingByValue().reversed())
+ .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue,
+ (e1, e2) -> e1, LinkedHashMap::new));
+
+ String[] sortedBankListKeys = sortedBankList.keySet().toArray(new String[0]);
+ String top3 = "";
+ for (int i = 0; i < 3 && i < sortedBankListKeys.length; i++) {
+ top3 += "\n " + EnumChatFormatting.AQUA + sortedBankListKeys[i] + ": " + DankersSkyblockMod.SKILL_AVERAGE_COLOUR + EnumChatFormatting.BOLD + Math.round(sortedBankList.get(sortedBankListKeys[i]));
+ }
+
+ // Get lobby sa
+ double lobbyBank = 0;
+ for (Double playerSkills : lobbyBanks) {
+ lobbyBank += playerSkills;
+ }
+ lobbyBank = (double) Math.round((lobbyBank / lobbyBanks.size()) * 100) / 100;
+
+ // Finally say skill lobby avg and highest SA users
+ playerSP.addChatMessage(new ChatComponentText(DankersSkyblockMod.DELIMITER_COLOUR + "" + EnumChatFormatting.BOLD + "-------------------\n" +
+ DankersSkyblockMod.TYPE_COLOUR + " Lobby Bank Average: " + DankersSkyblockMod.SKILL_AVERAGE_COLOUR + EnumChatFormatting.BOLD + Math.round(lobbyBank) + "\n" +
+ DankersSkyblockMod.TYPE_COLOUR + " Highest Bank Averages:" + top3 + "\n" +
+ DankersSkyblockMod.DELIMITER_COLOUR + "" + EnumChatFormatting.BOLD + " -------------------"));
+
+
+ } catch (InterruptedException ex) {
+ System.out.println("Current bank average list: " + unsortedBankList.toString());
+ Thread.currentThread().interrupt();
+ System.out.println("Interrupted /lobbyskills thread.");
+ }
+
+ }).start();
+ }
+} \ No newline at end of file
diff --git a/src/main/java/me/Danker/commands/ToggleCommand.java b/src/main/java/me/Danker/commands/ToggleCommand.java
index 2a4f588..ebe957a 100644
--- a/src/main/java/me/Danker/commands/ToggleCommand.java
+++ b/src/main/java/me/Danker/commands/ToggleCommand.java
@@ -24,6 +24,7 @@ public class ToggleCommand extends CommandBase implements ICommand {
public static boolean spiritBearAlerts;
public static boolean aotdToggled;
public static boolean lividDaggerToggled;
+ public static boolean shadowFuryToggled;
public static boolean petColoursToggled;
public static boolean dungeonTimerToggled;
public static boolean ghostTimerToggled;
@@ -71,7 +72,9 @@ public class ToggleCommand extends CommandBase implements ICommand {
public static boolean chronomatronToggled;
public static boolean superpairsToggled;
public static boolean hideTooltipsInExperimentAddonsToggled;
-
+ public static boolean specialHoeRightClick;
+ public static boolean melodyTooltips;
+
@Override
public String getCommandName() {
return "toggle";
@@ -80,8 +83,8 @@ public class ToggleCommand extends CommandBase implements ICommand {
@Override
public String getCommandUsage(ICommandSender arg0) {
- return "/" + getCommandName() + " <gparty/coords/golden/slayercount/rngesusalerts/ghostdisplay/splitfishing/chatmaddox/spiritbearalert/" +
- "aotd/lividdagger/flowerweapons/sceptremessages/petcolors/dungeontimer/golemalerts/expertiselore/" + //ghosttimer
+ return "/" + getCommandName() + " <gparty/coords/golden/slayercount/rngesusalerts/splitfishing/ghostdisplay/chatmaddox/spiritbearalert/" +
+ "aotd/lividdagger/shadowfury/flowerweapons/sceptremessages/petcolors/dungeontimer/golemalerts/expertiselore/" + //ghosttimer
"skill50display/outlinetext/midasstaffmessages/implosionmessages/healmessages/cooldownmessages/" +
"manamessages/killcombomessages/caketimer/lowhealthnotify/lividsolver/stopsalvagestarred/" +
"notifyslayerslain/necronnotifications/bonzotimer/threemanpuzzle/oruopuzzle/blazepuzzle/" +
@@ -99,8 +102,8 @@ public class ToggleCommand extends CommandBase implements ICommand {
public List<String> addTabCompletionOptions(ICommandSender sender, String[] args, BlockPos pos) {
if (args.length == 1) {
return getListOfStringsMatchingLastWord(args, "gparty", "coords", "golden", "slayercount", "rngesusalerts", "ghostdisplay",
- "splitfishing", "chatmaddox", "spiritbearalerts", "aotd", "lividdagger",
- "flowerweapons", "sceptremessages", "petcolors", "dungeontimer", /*"ghosttimer",*/ "golemalerts",
+ "splitfishing", "chatmaddox", "spiritbearalerts", "aotd", "lividdagger", "shadowfury",
+ "flowerweapons", "sceptremessages", "petcolors", "dungeontimer", /*"ghosttimer",*/"golemalerts",
"expertiselore", "skill50display", "outlinetext", "midasstaffmessages",
"implosionmessages", "healmessages", "cooldownmessages", "manamessages",
"killcombomessages", "caketimer", "lowhealthnotify", "autoskilltracker", "lividsolver",
@@ -110,7 +113,7 @@ public class ToggleCommand extends CommandBase implements ICommand {
"silverfishpuzzle", "watchermessage", "startswithterminal",
"selectallterminal", "clickinorderterminal", "blockwrongterminalclicks",
"itemframeonsealanterns", "ultrasequencer", "chronomatron", "superpairs",
- "hidetooltipsinaddons", "pickblock", "list");
+ "hidetooltipsinaddons", "pickblock", "specialhoe", "melodytooltips", "list");
}
return null;
}
@@ -178,6 +181,11 @@ public class ToggleCommand extends CommandBase implements ICommand {
case "lividdagger":
lividDaggerToggled = !lividDaggerToggled;
ConfigHandler.writeBooleanConfig("toggles", "LividDagger", lividDaggerToggled);
+ player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Block Shadow Fury ability been set to " + DankersSkyblockMod.SECONDARY_COLOUR + shadowFuryToggled + DankersSkyblockMod.MAIN_COLOUR + "."));
+ break;
+ case "shadowfury":
+ shadowFuryToggled = !shadowFuryToggled;
+ ConfigHandler.writeBooleanConfig("toggles", "ShadowFury", shadowFuryToggled);
player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Block Livid Dagger ability been set to " + DankersSkyblockMod.SECONDARY_COLOUR + lividDaggerToggled + DankersSkyblockMod.MAIN_COLOUR + "."));
break;
case "flowerweapons":
@@ -391,6 +399,16 @@ public class ToggleCommand extends CommandBase implements ICommand {
ConfigHandler.writeBooleanConfig("toggles", "PickBlock", swapToPickBlockToggled);
player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Auto-swap to pick block has been set to " + DankersSkyblockMod.SECONDARY_COLOUR + swapToPickBlockToggled + DankersSkyblockMod.MAIN_COLOUR + "."));
break;
+ case "specialhoe":
+ specialHoeRightClick = !specialHoeRightClick;
+ ConfigHandler.writeBooleanConfig("toggles", "SpecialHoe", specialHoeRightClick);
+ player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Block right click ability of special hoes " + DankersSkyblockMod.SECONDARY_COLOUR + specialHoeRightClick + DankersSkyblockMod.MAIN_COLOUR + "."));
+ break;
+ case "melodytooltips":
+ melodyTooltips = !melodyTooltips;
+ ConfigHandler.writeBooleanConfig("toggles", "MelodyTooltips", melodyTooltips);
+ player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Hide tooltips in Melody's Harp " + DankersSkyblockMod.SECONDARY_COLOUR + melodyTooltips + DankersSkyblockMod.MAIN_COLOUR + "."));
+ break;
case "list":
player.addChatMessage(new ChatComponentText(DankersSkyblockMod.TYPE_COLOUR + "Guild party notifications: " + DankersSkyblockMod.VALUE_COLOUR + gpartyToggled + "\n" +
DankersSkyblockMod.TYPE_COLOUR + " Coord/Angle display: " + DankersSkyblockMod.VALUE_COLOUR + coordsToggled + "\n" +
@@ -436,7 +454,9 @@ public class ToggleCommand extends CommandBase implements ICommand {
DankersSkyblockMod.TYPE_COLOUR + " Chronomatron solver: " + DankersSkyblockMod.VALUE_COLOUR + chronomatronToggled + "\n" +
DankersSkyblockMod.TYPE_COLOUR + " Superpairs solver: " + DankersSkyblockMod.VALUE_COLOUR + superpairsToggled + "\n" +
DankersSkyblockMod.TYPE_COLOUR + " Hide tooltips in experiment addons: " + DankersSkyblockMod.VALUE_COLOUR + hideTooltipsInExperimentAddonsToggled + "\n" +
- DankersSkyblockMod.TYPE_COLOUR + " Auto-swap to pick block " + DankersSkyblockMod.VALUE_COLOUR + swapToPickBlockToggled
+ DankersSkyblockMod.TYPE_COLOUR + " Auto-swap to pick block " + DankersSkyblockMod.VALUE_COLOUR + swapToPickBlockToggled + "\n" +
+ DankersSkyblockMod.TYPE_COLOUR + " Block Special Hoe right click " + DankersSkyblockMod.VALUE_COLOUR + specialHoeRightClick + "\n" +
+ DankersSkyblockMod.TYPE_COLOUR + " Hide tooltips in Melody's Harp " + DankersSkyblockMod.VALUE_COLOUR + melodyTooltips
));
break;
default:
diff --git a/src/main/java/me/Danker/features/BlockAbilities.java b/src/main/java/me/Danker/features/BlockAbilities.java
index 19a887c..814fd65 100644
--- a/src/main/java/me/Danker/features/BlockAbilities.java
+++ b/src/main/java/me/Danker/features/BlockAbilities.java
@@ -27,6 +27,12 @@ public class BlockAbilities {
if (ToggleCommand.lividDaggerToggled && item.getDisplayName().contains("Livid Dagger")) {
event.setCanceled(true);
}
+ if (ToggleCommand.shadowFuryToggled && item.getDisplayName().contains("Shadow Fury")) {
+ event.setCanceled(true);
+ }
+ if (ToggleCommand.specialHoeRightClick && (item.getDisplayName().contains("Mathematical Hoe") || item.getDisplayName().contains("Potato Hoe") || item.getDisplayName().contains("Wheat Hoe") || item.getDisplayName().contains("Carrot Hoe") || item.getDisplayName().contains("Sugar Cane Hoe") || item.getDisplayName().contains("Nether Warts Hoe"))) {
+ event.setCanceled(true);
+ }
} else if (event.action == PlayerInteractEvent.Action.RIGHT_CLICK_BLOCK) {
Block block = Minecraft.getMinecraft().theWorld.getBlockState(event.pos).getBlock();
@@ -77,6 +83,12 @@ public class BlockAbilities {
if (ToggleCommand.lividDaggerToggled && item.getDisplayName().contains("Livid Dagger")) {
event.setCanceled(true);
}
+ if (ToggleCommand.shadowFuryToggled && item.getDisplayName().contains("Shadow Fury")) {
+ event.setCanceled(true);
+ }
+ }
+ if (ToggleCommand.specialHoeRightClick && (item.getDisplayName().contains("Mathematical Hoe") || item.getDisplayName().contains("Potato Hoe") || item.getDisplayName().contains("Wheat Hoe") || item.getDisplayName().contains("Carrot Hoe") || item.getDisplayName().contains("Sugar Cane Hoe") || item.getDisplayName().contains("Nether Warts Hoe"))) {
+ event.setCanceled(true);
}
}
}
diff --git a/src/main/java/me/Danker/features/HideTooltipsInExperiments.java b/src/main/java/me/Danker/features/HideTooltipsInExperiments.java
index 5866fc8..6e295e1 100644
--- a/src/main/java/me/Danker/features/HideTooltipsInExperiments.java
+++ b/src/main/java/me/Danker/features/HideTooltipsInExperiments.java
@@ -29,6 +29,9 @@ public class HideTooltipsInExperiments {
if (ToggleCommand.hideTooltipsInExperimentAddonsToggled && (chestName.startsWith("Ultrasequencer (") || chestName.startsWith("Chronomatron ("))) {
event.toolTip.clear();
}
+ if (ToggleCommand.melodyTooltips && chestName.startsWith("Harp")) {
+ event.toolTip.clear();
+ }
}
}
diff --git a/src/main/java/me/Danker/features/SlayerESP.java b/src/main/java/me/Danker/features/SlayerESP.java
new file mode 100644
index 0000000..fb17135
--- /dev/null
+++ b/src/main/java/me/Danker/features/SlayerESP.java
@@ -0,0 +1,113 @@
+package me.Danker.features;
+
+import me.Danker.DankersSkyblockMod;
+import me.Danker.commands.ToggleCommand;
+import me.Danker.handlers.ScoreboardHandler;
+import me.Danker.utils.Utils;
+import net.minecraft.client.Minecraft;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.monster.EntitySpider;
+import net.minecraft.entity.monster.EntityZombie;
+import net.minecraft.entity.passive.EntityWolf;
+import net.minecraft.util.AxisAlignedBB;
+import net.minecraft.util.BlockPos;
+import net.minecraft.util.EnumChatFormatting;
+import net.minecraft.util.StringUtils;
+import net.minecraft.world.World;
+import net.minecraftforge.client.event.ClientChatReceivedEvent;
+import net.minecraftforge.client.event.RenderWorldLastEvent;
+import net.minecraftforge.event.entity.player.AttackEntityEvent;
+import net.minecraftforge.event.world.WorldEvent;
+import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
+import net.minecraftforge.fml.common.gameevent.TickEvent;
+
+import java.util.List;
+
+/**
+ * @author CuzImClicks
+ */
+
+public class SlayerESP {
+
+ static Entity zombie = null;
+ static Entity spider = null;
+ static Entity wolf = null;
+ static boolean slayerActive = false;
+ public static final int SLAYER_COLOUR = 0xFF0000;
+
+ @SubscribeEvent
+ public void onWorldChange(WorldEvent.Load event) {
+ zombie = null;
+ spider = null;
+ wolf = null;
+ }
+
+ @SubscribeEvent
+ public void onTick(TickEvent.ClientTickEvent event) {
+ //if (!Utils.inSkyblock) return;
+ if (event.phase != TickEvent.Phase.START) return;
+
+ World world = Minecraft.getMinecraft().theWorld;
+ if (DankersSkyblockMod.tickAmount % 2 == 0) {
+ if (world != null) {
+ List<Entity> entities = world.getLoadedEntityList();
+ for (Entity e : entities) {
+ System.out.println(e.getName());
+ if (e.getName().contains("Revenant Horror")) {
+ zombie = e;
+ } else if (e.getName().contains("Tarantula Broodfather")) {
+ spider = e;
+ } else if (e.getName().contains("Sven Packmaster")) {
+ wolf = e;
+ }
+
+ }
+ }
+ }
+ }
+
+ @SubscribeEvent
+ public void onChat(ClientChatReceivedEvent event) {
+ //if (!Utils.inSkyblock) return;
+ String message = StringUtils.stripControlCodes(event.message.getUnformattedText());
+ if (message.contains("SLAYER QUEST COMPLETE!")) {
+ slayerActive = false;
+ }
+
+ }
+ @SubscribeEvent
+ public void onAttackingEntity(AttackEntityEvent event) {
+ if (event.target instanceof EntityZombie || event.target instanceof EntitySpider || event.target instanceof EntityWolf) {
+ List<String> scoreboard = ScoreboardHandler.getSidebarLines();
+
+ for (String line : scoreboard) {
+ String cleanedLine = ScoreboardHandler.cleanSB(line);
+ if (cleanedLine.contains("Slay the boss!")) {
+ slayerActive = true;
+ break;
+ }
+ }
+ }
+ }
+
+ @SubscribeEvent
+ public void onWorldRender(RenderWorldLastEvent event) {
+ //if (!Utils.inSkyblock) return;
+ if (slayerActive) {
+ if (zombie != null) {
+ AxisAlignedBB aabb = new AxisAlignedBB(zombie.posX - 0.5, zombie.posY - 2, zombie.posZ - 0.5, zombie.posX + 0.5, zombie.posY, zombie.posZ + 0.5);
+ Utils.draw3DBox(aabb, SLAYER_COLOUR, event.partialTicks);
+ }
+ if (spider != null) {
+ AxisAlignedBB aabb = new AxisAlignedBB(spider.posX - 0.5, spider.posY - 1, spider.posZ - 0.5, spider.posX + 0.5, spider.posY, spider.posZ + 0.5);
+ Utils.draw3DBox(aabb, SLAYER_COLOUR, event.partialTicks);
+ }
+ if (wolf != null) {
+ AxisAlignedBB aabb = new AxisAlignedBB(wolf.posX - 0.5, wolf.posY - 1, wolf.posZ - 0.5, wolf.posX + 0.5, wolf.posY, wolf.posZ + 0.5);
+ Utils.draw3DBox(aabb, SLAYER_COLOUR, event.partialTicks);
+
+ }
+ }
+ }
+
+}
diff --git a/src/main/java/me/Danker/gui/DankerGui.java b/src/main/java/me/Danker/gui/DankerGui.java
index a6d2bb1..fff4d9e 100644
--- a/src/main/java/me/Danker/gui/DankerGui.java
+++ b/src/main/java/me/Danker/gui/DankerGui.java
@@ -46,6 +46,9 @@ public class DankerGui extends GuiScreen {
private GuiButton skill50Display;
private GuiButton outlineText;
private GuiButton cakeTimer;
+ private GuiButton shadowFury;
+ private GuiButton specialHoe;
+ private GuiButton melodyTooltips;
// Chat Messages
private GuiButton lividDagger;
private GuiButton sceptreMessages;
@@ -138,6 +141,9 @@ public class DankerGui extends GuiScreen {
necronNotifications = new GuiButton(0, width / 2 - 100, (int) (height * 0.2), "Necron Phase Notifications: " + Utils.getColouredBoolean(ToggleCommand.necronNotificationsToggled));
bonzoTimer = new GuiButton(0, width / 2 - 100, (int) (height * 0.3), "Bonzo's Mask Timer: " + Utils.getColouredBoolean(ToggleCommand.bonzoTimerToggled));
autoSkillTracker = new GuiButton(0, width / 2 - 100, (int) (height * 0.4), "Auto Start/Stop Skill Tracker: " + Utils.getColouredBoolean(ToggleCommand.autoSkillTrackerToggled));
+ shadowFury = new GuiButton(0, width / 2 - 100, (int) (height * 0.5), "Block Shadow Fury ability: " + Utils.getColouredBoolean(ToggleCommand.shadowFuryToggled));
+ specialHoe = new GuiButton(0, width / 2 - 100, (int) (height * 0.6), "Block Special Hoe right click: " + Utils.getColouredBoolean(ToggleCommand.specialHoeRightClick));
+ melodyTooltips = new GuiButton(0, width / 2 - 100, (int) (height * 0.7), "Hide tooltips in Melody's Harp: " + Utils.getColouredBoolean(ToggleCommand.melodyTooltips));
switch (page) {
case 1:
@@ -180,6 +186,7 @@ public class DankerGui extends GuiScreen {
this.buttonList.add(gparty);
this.buttonList.add(golemAlerts);
this.buttonList.add(rngesusAlert);
+ this.buttonList.add(splitFishing);
this.buttonList.add(nextPage);
this.buttonList.add(backPage);
break;
@@ -199,6 +206,9 @@ public class DankerGui extends GuiScreen {
this.buttonList.add(necronNotifications);
this.buttonList.add(bonzoTimer);
this.buttonList.add(autoSkillTracker);
+ this.buttonList.add(shadowFury);
+ this.buttonList.add(specialHoe);
+ this.buttonList.add(melodyTooltips);
this.buttonList.add(backPage);
break;
}
@@ -382,6 +392,18 @@ public class DankerGui extends GuiScreen {
ToggleCommand.autoSkillTrackerToggled = !ToggleCommand.autoSkillTrackerToggled;
ConfigHandler.writeBooleanConfig("toggles", "AutoSkillTracker", ToggleCommand.autoSkillTrackerToggled);
autoSkillTracker.displayString = "Auto Start/Stop Skill Tracker: " + Utils.getColouredBoolean(ToggleCommand.autoSkillTrackerToggled);
+ } else if (button == shadowFury) {
+ ToggleCommand.shadowFuryToggled = !ToggleCommand.shadowFuryToggled;
+ ConfigHandler.writeBooleanConfig("toggles", "ShadowFury", ToggleCommand.shadowFuryToggled);
+ shadowFury.displayString = "Block Shadow Fury ability: " + Utils.getColouredBoolean(ToggleCommand.shadowFuryToggled);
+ } else if (button == specialHoe) {
+ ToggleCommand.specialHoeRightClick = !ToggleCommand.specialHoeRightClick;
+ ConfigHandler.writeBooleanConfig("toggles", "SpecialHoe", ToggleCommand.specialHoeRightClick);
+ specialHoe.displayString = "Block Special Hoe right click: " + Utils.getColouredBoolean(ToggleCommand.specialHoeRightClick);
+ } else if (button == melodyTooltips) {
+ ToggleCommand.melodyTooltips = !ToggleCommand.melodyTooltips;
+ ConfigHandler.writeBooleanConfig("toggles", "MelodyTooltips", ToggleCommand.melodyTooltips);
+ melodyTooltips.displayString = "Hide tooltips in Melody's Harp: " + Utils.getColouredBoolean(ToggleCommand.melodyTooltips);
} else if (button == killComboMessages) {
ToggleCommand.killComboMessages = !ToggleCommand.killComboMessages;
ConfigHandler.writeBooleanConfig("toggles", "KillComboMessages", ToggleCommand.killComboMessages);
diff --git a/src/main/java/me/Danker/handlers/ConfigHandler.java b/src/main/java/me/Danker/handlers/ConfigHandler.java
index 759808d..491ae36 100644
--- a/src/main/java/me/Danker/handlers/ConfigHandler.java
+++ b/src/main/java/me/Danker/handlers/ConfigHandler.java
@@ -221,12 +221,15 @@ public class ConfigHandler {
ToggleCommand.spiritBearAlerts = initBoolean("toggles", "SpiritBearAlerts", false);
ToggleCommand.aotdToggled = initBoolean("toggles", "AOTD", false);
ToggleCommand.lividDaggerToggled = initBoolean("toggles", "LividDagger", false);
+ ToggleCommand.shadowFuryToggled = initBoolean("toggles", "Shadow Fury", false);
ToggleCommand.petColoursToggled = initBoolean("toggles", "PetColors", false);
ToggleCommand.golemAlertToggled = initBoolean("toggles", "GolemAlerts", false);
ToggleCommand.expertiseLoreToggled = initBoolean("toggles", "ExpertiseLore", false);
ToggleCommand.skill50DisplayToggled = initBoolean("toggles", "Skill50Display", false);
ToggleCommand.outlineTextToggled = initBoolean("toggles", "OutlineText", false);
ToggleCommand.cakeTimerToggled = initBoolean("toggles", "CakeTimer", false);
+ ToggleCommand.specialHoeRightClick = initBoolean("toggles", "SpecialHoe", false);
+ ToggleCommand.melodyTooltips = initBoolean("toggles", "MelodyTooltips", false);
// Chat Messages
ToggleCommand.sceptreMessages = initBoolean("toggles", "SceptreMessages", true);
ToggleCommand.midasStaffMessages = initBoolean("toggles", "MidasStaffMessages", true);