aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/me
diff options
context:
space:
mode:
authorbowser0000 <bowser0000@gmail.com>2021-04-19 11:10:14 -0400
committerbowser0000 <bowser0000@gmail.com>2021-04-19 11:10:14 -0400
commitbe0594f3ce39b560d5d30fd9e463bd42304c440e (patch)
treeb66d9d9bef70ea5c49cd61dbfea458e51b7f7a38 /src/main/java/me
parent6c870810d6798bd9e445f2586455311d1a817976 (diff)
downloadSkyblockMod-be0594f3ce39b560d5d30fd9e463bd42304c440e.tar.gz
SkyblockMod-be0594f3ce39b560d5d30fd9e463bd42304c440e.tar.bz2
SkyblockMod-be0594f3ce39b560d5d30fd9e463bd42304c440e.zip
Add display for teammates in 30 block radius
Diffstat (limited to 'src/main/java/me')
-rw-r--r--src/main/java/me/Danker/DankersSkyblockMod.java1
-rw-r--r--src/main/java/me/Danker/commands/DankerGuiCommand.java1
-rw-r--r--src/main/java/me/Danker/commands/MoveCommand.java13
-rw-r--r--src/main/java/me/Danker/commands/ScaleCommand.java11
-rw-r--r--src/main/java/me/Danker/commands/ToggleCommand.java22
-rw-r--r--src/main/java/me/Danker/features/TetherDisplay.java60
-rw-r--r--src/main/java/me/Danker/gui/DankerGui.java7
-rw-r--r--src/main/java/me/Danker/gui/EditLocationsGui.java22
-rw-r--r--src/main/java/me/Danker/handlers/ConfigHandler.java4
-rw-r--r--src/main/java/me/Danker/utils/Utils.java4
10 files changed, 134 insertions, 11 deletions
diff --git a/src/main/java/me/Danker/DankersSkyblockMod.java b/src/main/java/me/Danker/DankersSkyblockMod.java
index cf5caee..3ffa0f1 100644
--- a/src/main/java/me/Danker/DankersSkyblockMod.java
+++ b/src/main/java/me/Danker/DankersSkyblockMod.java
@@ -126,6 +126,7 @@ public class DankersSkyblockMod {
MinecraftForge.EVENT_BUS.register(new StartsWithSolver());
MinecraftForge.EVENT_BUS.register(new StopSalvagingStarredItems());
MinecraftForge.EVENT_BUS.register(new SuperpairsSolver());
+ MinecraftForge.EVENT_BUS.register(new TetherDisplay());
MinecraftForge.EVENT_BUS.register(new ThreeManSolver());
MinecraftForge.EVENT_BUS.register(new TicTacToeSolver());
MinecraftForge.EVENT_BUS.register(new TriviaSolver());
diff --git a/src/main/java/me/Danker/commands/DankerGuiCommand.java b/src/main/java/me/Danker/commands/DankerGuiCommand.java
index 923fcbe..6fede04 100644
--- a/src/main/java/me/Danker/commands/DankerGuiCommand.java
+++ b/src/main/java/me/Danker/commands/DankerGuiCommand.java
@@ -92,6 +92,7 @@ public class DankerGuiCommand extends CommandBase {
debug.append("[highlightslayers][").append(ToggleCommand.highlightSlayers).append("]\n");
debug.append("[highlightarachne][").append(ToggleCommand.highlightArachne).append("]\n");
debug.append("[highlightskeletonmasters][").append(ToggleCommand.highlightSkeletonMasters).append("]\n");
+ debug.append("[teammatesinradius][").append(ToggleCommand.teammatesInRadius).append("]\n");
debug.append("[dungeonbossmusic][").append(ToggleCommand.dungeonBossMusic).append("]\n");
debug.append("[bloodroommusic][").append(ToggleCommand.bloodRoomMusic).append("]\n");
debug.append("[dungeonmusic][").append(ToggleCommand.dungeonMusic).append("]\n");
diff --git a/src/main/java/me/Danker/commands/MoveCommand.java b/src/main/java/me/Danker/commands/MoveCommand.java
index 6fe2939..33d1f78 100644
--- a/src/main/java/me/Danker/commands/MoveCommand.java
+++ b/src/main/java/me/Danker/commands/MoveCommand.java
@@ -23,6 +23,7 @@ public class MoveCommand extends CommandBase {
public static int[] waterAnswerXY = {0, 0};
public static int[] bonzoTimerXY = {0, 0};
public static int[] golemTimerXY = {0 ,0};
+ public static int[] teammatesInRadiusXY = {0, 0};
@Override
public String getCommandName() {
@@ -31,7 +32,7 @@ public class MoveCommand extends CommandBase {
@Override
public String getCommandUsage(ICommandSender arg0) {
- return "/" + getCommandName() + " <coords/display/dungeontimer/skill50/lividhp/caketimer/skilltracker/wateranswer/bonzotimer/golemtimer> <x> <y>";
+ return "/" + getCommandName() + " <coords/display/dungeontimer/skill50/lividhp/caketimer/skilltracker/wateranswer/bonzotimer/golemtimer/teammatesinradius> <x> <y>";
}
public static String usage(ICommandSender arg0) {
@@ -46,7 +47,8 @@ public class MoveCommand extends CommandBase {
@Override
public List<String> addTabCompletionOptions(ICommandSender sender, String[] args, BlockPos pos) {
if (args.length == 1) {
- return getListOfStringsMatchingLastWord(args, "coords", "display", "dungeontimer", "skill50", "lividhp", "caketimer", "skilltracker", "wateranswer", "bonzotimer", "golemtimer");
+ return getListOfStringsMatchingLastWord(args, "coords", "display", "dungeontimer", "skill50", "lividhp", "caketimer",
+ "skilltracker", "wateranswer", "bonzotimer", "golemtimer", "teammatesinradius");
}
return null;
}
@@ -131,6 +133,13 @@ public class MoveCommand extends CommandBase {
ConfigHandler.writeIntConfig("locations", "golemTimerY", golemTimerXY[1]);
player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Golem timer has been moved to " + DankersSkyblockMod.SECONDARY_COLOUR + arg1[1] + ", " + arg1[2]));
break;
+ case "teammatesinradius":
+ teammatesInRadiusXY[0] = Integer.parseInt(arg1[1]);
+ teammatesInRadiusXY[1] = Integer.parseInt(arg1[2]);
+ ConfigHandler.writeIntConfig("locations", "teammatesInRadiusX", teammatesInRadiusXY[0]);
+ ConfigHandler.writeIntConfig("locations", "teammatesInRadiusY", teammatesInRadiusXY[1]);
+ player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Teammates in radius has been moved to " + DankersSkyblockMod.SECONDARY_COLOUR + arg1[1] + ", " + arg1[2]));
+ break;
default:
player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "Usage: " + getCommandUsage(arg0)));
}
diff --git a/src/main/java/me/Danker/commands/ScaleCommand.java b/src/main/java/me/Danker/commands/ScaleCommand.java
index b27ac50..a95f1b1 100644
--- a/src/main/java/me/Danker/commands/ScaleCommand.java
+++ b/src/main/java/me/Danker/commands/ScaleCommand.java
@@ -23,6 +23,7 @@ public class ScaleCommand extends CommandBase {
public static double waterAnswerScale;
public static double bonzoTimerScale;
public static double golemTimerScale;
+ public static double teammatesInRadiusScale;
@Override
public String getCommandName() {
@@ -31,7 +32,7 @@ public class ScaleCommand extends CommandBase {
@Override
public String getCommandUsage(ICommandSender arg0) {
- return "/" + getCommandName() + " <coords/display/dungeontimer/skill50/lividhp/caketimer/skilltracker/wateranswer/bonzotimer/golemtimer> <size (0.1 - 10)>";
+ return "/" + getCommandName() + " <coords/display/dungeontimer/skill50/lividhp/caketimer/skilltracker/wateranswer/bonzotimer/golemtimer/teammatesinradius> <size (0.1 - 10)>";
}
public static String usage(ICommandSender arg0) {
@@ -46,7 +47,8 @@ public class ScaleCommand extends CommandBase {
@Override
public List<String> addTabCompletionOptions(ICommandSender sender, String[] args, BlockPos pos) {
if (args.length == 1) {
- return getListOfStringsMatchingLastWord(args, "coords", "display", "dungeontimer", "skill50", "lividhp", "caketimer", "skilltracker", "wateranswer", "bonzotimer", "golemtimer");
+ return getListOfStringsMatchingLastWord(args, "coords", "display", "dungeontimer", "skill50", "lividhp", "caketimer",
+ "skilltracker", "wateranswer", "bonzotimer", "golemtimer", "teammatesinradius");
}
return null;
}
@@ -117,6 +119,11 @@ public class ScaleCommand extends CommandBase {
ConfigHandler.writeDoubleConfig("scales", "golemTimerScale", golemTimerScale);
player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Golem timer has been scaled to " + DankersSkyblockMod.SECONDARY_COLOUR + golemTimerScale + "x"));
break;
+ case "teammatesinradius":
+ teammatesInRadiusScale = scaleAmount;
+ ConfigHandler.writeDoubleConfig("scales", "teammatesInRadiusScale", teammatesInRadiusScale);
+ player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Teammates in radius has been scaled to " + DankersSkyblockMod.SECONDARY_COLOUR + teammatesInRadiusScale + "x"));
+ break;
default:
player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "Usage: " + getCommandUsage(arg0)));
}
diff --git a/src/main/java/me/Danker/commands/ToggleCommand.java b/src/main/java/me/Danker/commands/ToggleCommand.java
index 528f376..0eb52fd 100644
--- a/src/main/java/me/Danker/commands/ToggleCommand.java
+++ b/src/main/java/me/Danker/commands/ToggleCommand.java
@@ -34,6 +34,7 @@ public class ToggleCommand extends CommandBase implements ICommand {
public static boolean highlightSlayers;
public static boolean highlightArachne;
public static boolean highlightSkeletonMasters;
+ public static boolean teammatesInRadius;
// Chat Messages
public static boolean sceptreMessages;
public static boolean midasStaffMessages;
@@ -93,8 +94,8 @@ public class ToggleCommand extends CommandBase implements ICommand {
"creeperpuzzle/waterpuzzle/tictactoepuzzle/boulderpuzzle/silverfishpuzzle/icewalkpuzzle/watchermessage/" +
"startswithterminal/selectallterminal/clickinorderterminal/" +
"ultrasequencer/chronomatron/superpairs/hidetooltipsinaddons/pickblock/" +
- "melodytooltips/highlightslayers/highlightarachne/highlightskeletonmasters/dungeonbossmusic/bloodroommusic/" +
- "dungeonmusic/list>";
+ "melodytooltips/highlightslayers/highlightarachne/highlightskeletonmasters/teammatesinradius/" +
+ "dungeonbossmusic/bloodroommusic/dungeonmusic/list>";
}
public static String usage(ICommandSender arg0) {
@@ -122,7 +123,8 @@ public class ToggleCommand extends CommandBase implements ICommand {
"selectallterminal", "clickinorderterminal",
"ultrasequencer", "chronomatron", "superpairs",
"hidetooltipsinaddons", "pickblock", "melodytooltips", "highlightslayers",
- "highlightskeletonmasters", "dungeonbossmusic", "bloodroommusic", "dungeonmusic", "list");
+ "highlightskeletonmasters", "dungeonbossmusic", "bloodroommusic", "dungeonmusic",
+ "teammatesinradius", "list");
}
return null;
}
@@ -386,22 +388,27 @@ public class ToggleCommand extends CommandBase implements ICommand {
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 + "."));
+ player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Hide tooltips in Melody's Harp has been set to " + DankersSkyblockMod.SECONDARY_COLOUR + melodyTooltips + DankersSkyblockMod.MAIN_COLOUR + "."));
break;
case "highlightslayers":
highlightSlayers = !highlightSlayers;
ConfigHandler.writeBooleanConfig("toggles", "HighlightSlayers", highlightSlayers);
- player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Highlight Slayer Bosses " + DankersSkyblockMod.SECONDARY_COLOUR + highlightSlayers + DankersSkyblockMod.MAIN_COLOUR + "."));
+ player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Highlight Slayer Bosses has been set to " + DankersSkyblockMod.SECONDARY_COLOUR + highlightSlayers + DankersSkyblockMod.MAIN_COLOUR + "."));
break;
case "highlightarachne":
highlightArachne = !highlightArachne;
ConfigHandler.writeBooleanConfig("toggles", "HighlightArachne", highlightArachne);
- player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Highlight Arachne " + DankersSkyblockMod.SECONDARY_COLOUR + highlightArachne + DankersSkyblockMod.MAIN_COLOUR + "."));
+ player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Highlight Arachne has been set to " + DankersSkyblockMod.SECONDARY_COLOUR + highlightArachne + DankersSkyblockMod.MAIN_COLOUR + "."));
break;
case "highlightskeletonmasters":
highlightSkeletonMasters = !highlightSkeletonMasters;
ConfigHandler.writeBooleanConfig("toggles", "HighlightSkeletonMasters", highlightSkeletonMasters);
- player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Highlight Skeleton Masters " + DankersSkyblockMod.SECONDARY_COLOUR + highlightSkeletonMasters + DankersSkyblockMod.MAIN_COLOUR + "."));
+ player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Highlight Skeleton Masters has been set to " + DankersSkyblockMod.SECONDARY_COLOUR + highlightSkeletonMasters + DankersSkyblockMod.MAIN_COLOUR + "."));
+ break;
+ case "teammatesinradius":
+ teammatesInRadius = !teammatesInRadius;
+ ConfigHandler.writeBooleanConfig("toggles", "TeammatesInRadius", teammatesInRadius);
+ player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Teammates in radius has been set to " + DankersSkyblockMod.SECONDARY_COLOUR + teammatesInRadius + DankersSkyblockMod.MAIN_COLOUR + "."));
break;
case "dungeonbossmusic":
dungeonBossMusic = !dungeonBossMusic;
@@ -467,6 +474,7 @@ public class ToggleCommand extends CommandBase implements ICommand {
DankersSkyblockMod.TYPE_COLOUR + " Highlight Slayer Bosses: " + DankersSkyblockMod.VALUE_COLOUR + highlightSlayers + "\n" +
DankersSkyblockMod.TYPE_COLOUR + " Highlight Arachne Boss: " + DankersSkyblockMod.VALUE_COLOUR + highlightArachne + "\n" +
DankersSkyblockMod.TYPE_COLOUR + " Highlight Skeleton Masters: " + DankersSkyblockMod.VALUE_COLOUR + highlightSkeletonMasters + "\n" +
+ DankersSkyblockMod.TYPE_COLOUR + " Teammates in radius: " + DankersSkyblockMod.VALUE_COLOUR + teammatesInRadius + "\n" +
DankersSkyblockMod.TYPE_COLOUR + " Custom dungeon boss music: " + DankersSkyblockMod.VALUE_COLOUR + dungeonBossMusic + "\n" +
DankersSkyblockMod.TYPE_COLOUR + " Custom blood room music: " + DankersSkyblockMod.VALUE_COLOUR + bloodRoomMusic + "\n" +
DankersSkyblockMod.TYPE_COLOUR + " Custom dungeon music: " + DankersSkyblockMod.VALUE_COLOUR + dungeonMusic
diff --git a/src/main/java/me/Danker/features/TetherDisplay.java b/src/main/java/me/Danker/features/TetherDisplay.java
new file mode 100644
index 0000000..363b90f
--- /dev/null
+++ b/src/main/java/me/Danker/features/TetherDisplay.java
@@ -0,0 +1,60 @@
+package me.Danker.features;
+
+import me.Danker.DankersSkyblockMod;
+import me.Danker.commands.MoveCommand;
+import me.Danker.commands.ScaleCommand;
+import me.Danker.commands.ToggleCommand;
+import me.Danker.events.RenderOverlay;
+import me.Danker.handlers.TextRenderer;
+import me.Danker.utils.Utils;
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.entity.EntityOtherPlayerMP;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.util.AxisAlignedBB;
+import net.minecraft.util.EnumChatFormatting;
+import net.minecraft.world.World;
+import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
+import net.minecraftforge.fml.common.gameevent.TickEvent;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class TetherDisplay {
+
+ static List<String> playersInRadius = new ArrayList<>();
+
+ @SubscribeEvent
+ public void onTick(TickEvent.ClientTickEvent event) {
+ if (event.phase != TickEvent.Phase.START) return;
+
+ Minecraft mc = Minecraft.getMinecraft();
+ EntityPlayer player = mc.thePlayer;
+ World world = mc.theWorld;
+ if (DankersSkyblockMod.tickAmount % 10 == 0) {
+ if (ToggleCommand.teammatesInRadius && Utils.inDungeons && player != null && world != null) {
+ playersInRadius.clear();
+ List<EntityPlayer> teammates = world.getEntitiesWithinAABB(EntityOtherPlayerMP.class, new AxisAlignedBB(player.posX - 30, player.posY - 30, player.posZ - 30, player.posX + 30, player.posY + 30, player.posZ + 30));
+
+ for (EntityPlayer teammate : teammates) {
+ if (Utils.isRealPlayer(teammate) && !teammate.isInvisible() && player.getDistanceToEntity(teammate) <= 30F) {
+ playersInRadius.add(teammate.getDisplayName().getSiblings().get(0).getFormattedText());
+ }
+ }
+ }
+ }
+ }
+
+ @SubscribeEvent
+ public void renderPlayerInfo(RenderOverlay event) {
+ if (ToggleCommand.teammatesInRadius && Utils.inDungeons) {
+ String teammates;
+ if (playersInRadius.size() > 0) {
+ teammates = String.join("\n", playersInRadius);
+ } else {
+ teammates = EnumChatFormatting.RED + "NONE";
+ }
+ new TextRenderer(Minecraft.getMinecraft(), EnumChatFormatting.AQUA + "Teammates In Radius:\n" + teammates, MoveCommand.teammatesInRadiusXY[0], MoveCommand.teammatesInRadiusXY[1], ScaleCommand.teammatesInRadiusScale);
+ }
+ }
+
+}
diff --git a/src/main/java/me/Danker/gui/DankerGui.java b/src/main/java/me/Danker/gui/DankerGui.java
index 68d1017..4797343 100644
--- a/src/main/java/me/Danker/gui/DankerGui.java
+++ b/src/main/java/me/Danker/gui/DankerGui.java
@@ -63,6 +63,7 @@ public class DankerGui extends GuiScreen {
private GuiButton highlightArachne;
private GuiButton highlightSlayer;
private GuiButton highlightSkeletonMasters;
+ private GuiButton teammatesInRadius;
// Chat Messages
private GuiButton sceptreMessages;
private GuiButton midasStaffMessages;
@@ -147,6 +148,7 @@ public class DankerGui extends GuiScreen {
highlightArachne = new FeatureButton("Highlight Arachne: " + Utils.getColouredBoolean(ToggleCommand.highlightArachne), "Highlights Arachne bosses.");
highlightSlayer = new FeatureButton("Highlight Slayer: " + Utils.getColouredBoolean(ToggleCommand.highlightSlayers), "Highlights Slayer bosses.");
highlightSkeletonMasters = new FeatureButton("Highlight Skeleton Masters: " + Utils.getColouredBoolean(ToggleCommand.highlightSkeletonMasters), "Highlights Skeleton Masters.");
+ teammatesInRadius = new FeatureButton("Display Players in 30 Block Radius: " + Utils.getColouredBoolean(ToggleCommand.teammatesInRadius), "Displays dungeon teammates in 30 block radius for tether and diversion.");
allButtons.clear();
allButtons.add(changeDisplay);
@@ -189,6 +191,7 @@ public class DankerGui extends GuiScreen {
allButtons.add(highlightArachne);
allButtons.add(highlightSlayer);
allButtons.add(highlightSkeletonMasters);
+ allButtons.add(teammatesInRadius);
search.setText(initSearchText);
search.setVisible(true);
@@ -419,6 +422,10 @@ public class DankerGui extends GuiScreen {
ToggleCommand.highlightSkeletonMasters = !ToggleCommand.highlightSkeletonMasters;
ConfigHandler.writeBooleanConfig("toggles", "HighlightSkeletonMasters", ToggleCommand.highlightSkeletonMasters);
highlightSkeletonMasters.displayString = "Highlight Skeleton Masters: " + Utils.getColouredBoolean(ToggleCommand.highlightSkeletonMasters);
+ } else if (button == teammatesInRadius) {
+ ToggleCommand.teammatesInRadius = !ToggleCommand.teammatesInRadius;
+ ConfigHandler.writeBooleanConfig("toggles", "TeammatesInRadius", ToggleCommand.teammatesInRadius);
+ teammatesInRadius.displayString = "Display Players in 30 Block Radius: " + Utils.getColouredBoolean(ToggleCommand.teammatesInRadius);
}
}
diff --git a/src/main/java/me/Danker/gui/EditLocationsGui.java b/src/main/java/me/Danker/gui/EditLocationsGui.java
index 3a7c94b..c263d5a 100644
--- a/src/main/java/me/Danker/gui/EditLocationsGui.java
+++ b/src/main/java/me/Danker/gui/EditLocationsGui.java
@@ -13,6 +13,8 @@ import net.minecraft.client.gui.GuiScreen;
import net.minecraft.util.EnumChatFormatting;
import org.lwjgl.opengl.GL11;
+import javax.xml.stream.Location;
+
public class EditLocationsGui extends GuiScreen {
private String moving = null;
@@ -29,6 +31,7 @@ public class EditLocationsGui extends GuiScreen {
private LocationButton waterAnswer;
private LocationButton bonzoTimer;
private LocationButton golemTimer;
+ private LocationButton teammatesInRadius;
@Override
public boolean doesGuiPauseGame() {
@@ -86,6 +89,13 @@ public class EditLocationsGui extends GuiScreen {
EnumChatFormatting.GREEN + "Green: " + EnumChatFormatting.YELLOW + "Gold, " + EnumChatFormatting.GREEN + "Emerald\n" +
EnumChatFormatting.RED + "Red: " + EnumChatFormatting.YELLOW + "Gold, " + EnumChatFormatting.AQUA + "Diamond, " + EnumChatFormatting.GREEN + "Emerald, " + EnumChatFormatting.RED + "Clay";
+ String teammatesInRadiusText = EnumChatFormatting.AQUA + "Teammates In Radius:\n" +
+ EnumChatFormatting.GREEN + "NoticeMehSenpai\n" +
+ EnumChatFormatting.GREEN + "DeathStreeks\n" +
+ EnumChatFormatting.GREEN + "Not_A_Neko\n" +
+ EnumChatFormatting.GREEN + "Minikloon";
+
+ // ive lost my marbles
display = new LocationButton(0, MoveCommand.displayXY[0], MoveCommand.displayXY[1], 145 * ScaleCommand.displayScale, 102 * ScaleCommand.displayScale, ScaleCommand.displayScale, displayText, displayNums, 110);
dungeonTimer = new LocationButton(0, MoveCommand.dungeonTimerXY[0], MoveCommand.dungeonTimerXY[1], 113 * ScaleCommand.dungeonTimerScale, 57 * ScaleCommand.dungeonTimerScale, ScaleCommand.dungeonTimerScale, dungeonTimerText, dungeonTimerNums, 80);
coords = new LocationButton(0, MoveCommand.coordsXY[0], MoveCommand.coordsXY[1], 141 * ScaleCommand.coordsScale, 12 * ScaleCommand.coordsScale, ScaleCommand.coordsScale, NoF3Coords.COORDS_COLOUR + "74 / 14 / -26 (141.1 / 6.7)", null, null);
@@ -96,6 +106,7 @@ public class EditLocationsGui extends GuiScreen {
waterAnswer = new LocationButton(0, MoveCommand.waterAnswerXY[0], MoveCommand.waterAnswerXY[1], 190 * ScaleCommand.waterAnswerScale, 54 * ScaleCommand.waterAnswerScale, ScaleCommand.waterAnswerScale, waterAnswerText, null, null);
bonzoTimer = new LocationButton(0, MoveCommand.bonzoTimerXY[0], MoveCommand.bonzoTimerXY[1] + 5, 53 * ScaleCommand.bonzoTimerScale, 18 * ScaleCommand.bonzoTimerScale, ScaleCommand.bonzoTimerScale, BonzoMaskTimer.BONZO_COLOR + " 3m30s", null, null);
golemTimer = new LocationButton(0, MoveCommand.golemTimerXY[0], MoveCommand.golemTimerXY[1] + 5, 42 * ScaleCommand.golemTimerScale, 18 * ScaleCommand.golemTimerScale, ScaleCommand.golemTimerScale, GolemSpawningAlert.GOLEM_COLOUR + " 20s", null, null);
+ teammatesInRadius = new LocationButton(0, MoveCommand.teammatesInRadiusXY[0], MoveCommand.teammatesInRadiusXY[1], 107 * ScaleCommand.teammatesInRadiusScale, 45 * ScaleCommand.teammatesInRadiusScale, ScaleCommand.teammatesInRadiusScale, teammatesInRadiusText, null, null);
this.buttonList.add(coords);
this.buttonList.add(dungeonTimer);
@@ -107,6 +118,7 @@ public class EditLocationsGui extends GuiScreen {
this.buttonList.add(display);
this.buttonList.add(skill50);
this.buttonList.add(golemTimer);
+ this.buttonList.add(teammatesInRadius);
}
@Override
@@ -204,6 +216,12 @@ public class EditLocationsGui extends GuiScreen {
golemTimer.xPosition = MoveCommand.golemTimerXY[0];
golemTimer.yPosition = MoveCommand.golemTimerXY[1];
break;
+ case "teammatesInRadius":
+ MoveCommand.teammatesInRadiusXY[0] += xMoved;
+ MoveCommand.teammatesInRadiusXY[1] += yMoved;
+ teammatesInRadius.xPosition = MoveCommand.teammatesInRadiusXY[0];
+ teammatesInRadius.yPosition = MoveCommand.teammatesInRadiusXY[1];
+ break;
}
this.buttonList.clear();
initGui();
@@ -236,6 +254,8 @@ public class EditLocationsGui extends GuiScreen {
moving = "bonzoTimer";
} else if (button == golemTimer) {
moving = "golemTimer";
+ } else if (button == teammatesInRadius) {
+ moving = "teammatesInRadius";
}
}
}
@@ -264,6 +284,8 @@ public class EditLocationsGui extends GuiScreen {
ConfigHandler.writeIntConfig("locations", "bonzoTimerY", MoveCommand.bonzoTimerXY[1]);
ConfigHandler.writeIntConfig("locations", "golemTimerX", MoveCommand.golemTimerXY[0]);
ConfigHandler.writeIntConfig("locations", "golemTimerY", MoveCommand.golemTimerXY[1]);
+ ConfigHandler.writeIntConfig("locations", "teammatesInRadiusX", MoveCommand.teammatesInRadiusXY[0]);
+ ConfigHandler.writeIntConfig("locations", "teammatesInRadiusY", MoveCommand.teammatesInRadiusXY[1]);
}
}
diff --git a/src/main/java/me/Danker/handlers/ConfigHandler.java b/src/main/java/me/Danker/handlers/ConfigHandler.java
index 5668953..dcb2368 100644
--- a/src/main/java/me/Danker/handlers/ConfigHandler.java
+++ b/src/main/java/me/Danker/handlers/ConfigHandler.java
@@ -229,6 +229,7 @@ public class ConfigHandler {
ToggleCommand.highlightSlayers = initBoolean("toggles", "HighlightSlayers", false);
ToggleCommand.highlightArachne = initBoolean("toggles", "HighlightArachne", false);
ToggleCommand.highlightSkeletonMasters = initBoolean("toggles", "HighlightSkeletonMasters", false);
+ ToggleCommand.teammatesInRadius = initBoolean("toggles", "TeammatesInRadius", false);
// Chat Messages
ToggleCommand.sceptreMessages = initBoolean("toggles", "SceptreMessages", true);
ToggleCommand.midasStaffMessages = initBoolean("toggles", "MidasStaffMessages", true);
@@ -478,6 +479,8 @@ public class ConfigHandler {
MoveCommand.bonzoTimerXY[1] = initInt("locations", "bonzoTimerY", 80);
MoveCommand.golemTimerXY[0] = initInt("locations", "golemTimerX", 100);
MoveCommand.golemTimerXY[1] = initInt("locations", "golemTimerY", 30);
+ MoveCommand.teammatesInRadiusXY[0] = initInt("locations", "teammatesInRadiusX", 80);
+ MoveCommand.teammatesInRadiusXY[1] = initInt("locations", "teammatesInRadiusY", 100);
// Scales
ScaleCommand.coordsScale = initDouble("scales", "coordsScale", 1);
@@ -490,6 +493,7 @@ public class ConfigHandler {
ScaleCommand.waterAnswerScale = initDouble("scales", "waterAnswerScale", 1);
ScaleCommand.bonzoTimerScale = initDouble("scales", "bonzoTimerScale", 1);
ScaleCommand.golemTimerScale = initDouble("scales", "golemTimerScale", 1);
+ ScaleCommand.teammatesInRadiusScale = initDouble("scales", "teammatesInRadiusScale", 1);
// Colours
DankersSkyblockMod.MAIN_COLOUR = initString("colors", "main", EnumChatFormatting.GREEN.toString());
diff --git a/src/main/java/me/Danker/utils/Utils.java b/src/main/java/me/Danker/utils/Utils.java
index 160fc0a..b7927c3 100644
--- a/src/main/java/me/Danker/utils/Utils.java
+++ b/src/main/java/me/Danker/utils/Utils.java
@@ -538,5 +538,9 @@ public class Utils {
return null;
}
}
+
+ public static boolean isRealPlayer(EntityPlayer player) {
+ return player.getUniqueID().version() == 4 && !player.isPlayerSleeping();
+ }
}