aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
authorbowser0000 <bowser0000@gmail.com>2020-11-10 23:24:17 -0500
committerbowser0000 <bowser0000@gmail.com>2020-11-10 23:24:17 -0500
commit6cf3309708ca632fdeebd99a2a79f3a3471e549d (patch)
treed741cfe060507dcfb35d02837f0663d521742e45 /src/main/java
parent511b95de7dcb83e047dce2adadeff8c18804c1b6 (diff)
downloadSkyblockMod-6cf3309708ca632fdeebd99a2a79f3a3471e549d.tar.gz
SkyblockMod-6cf3309708ca632fdeebd99a2a79f3a3471e549d.tar.bz2
SkyblockMod-6cf3309708ca632fdeebd99a2a79f3a3471e549d.zip
Add display for time until century cakes run out
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/me/Danker/TheMod.java63
-rw-r--r--src/main/java/me/Danker/commands/DHelpCommand.java6
-rw-r--r--src/main/java/me/Danker/commands/MoveCommand.java10
-rw-r--r--src/main/java/me/Danker/commands/ScaleCommand.java9
-rw-r--r--src/main/java/me/Danker/commands/ToggleCommand.java60
-rw-r--r--src/main/java/me/Danker/gui/DankerGui.java52
-rw-r--r--src/main/java/me/Danker/gui/EditLocationsGui.java23
-rw-r--r--src/main/java/me/Danker/handlers/ConfigHandler.java12
8 files changed, 171 insertions, 64 deletions
diff --git a/src/main/java/me/Danker/TheMod.java b/src/main/java/me/Danker/TheMod.java
index 242cc17..06416a1 100644
--- a/src/main/java/me/Danker/TheMod.java
+++ b/src/main/java/me/Danker/TheMod.java
@@ -14,6 +14,7 @@ import java.util.regex.Pattern;
import org.lwjgl.input.Keyboard;
import org.lwjgl.input.Mouse;
+import org.lwjgl.opengl.GL11;
import com.google.gson.JsonObject;
@@ -54,6 +55,7 @@ import me.Danker.utils.Utils;
import net.minecraft.block.Block;
import net.minecraft.client.Minecraft;
import net.minecraft.client.entity.EntityPlayerSP;
+import net.minecraft.client.gui.Gui;
import net.minecraft.client.gui.inventory.GuiChest;
import net.minecraft.client.settings.KeyBinding;
import net.minecraft.entity.Entity;
@@ -73,6 +75,7 @@ import net.minecraft.util.BlockPos;
import net.minecraft.util.ChatComponentText;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.IChatComponent;
+import net.minecraft.util.ResourceLocation;
import net.minecraft.util.StringUtils;
import net.minecraft.util.Vec3;
import net.minecraftforge.client.ClientCommandHandler;
@@ -97,7 +100,6 @@ import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
import net.minecraftforge.fml.common.eventhandler.EventPriority;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import net.minecraftforge.fml.common.gameevent.InputEvent.KeyInputEvent;
-import net.minecraftforge.fml.common.gameevent.PlayerEvent.PlayerChangedDimensionEvent;
import net.minecraftforge.fml.common.gameevent.TickEvent;
import net.minecraftforge.fml.common.network.FMLNetworkEvent.ClientConnectedToServerEvent;
import net.minecraftforge.fml.common.versioning.DefaultArtifactVersion;
@@ -139,6 +141,9 @@ public class TheMod
static List<Vec3[]> creeperLines = new ArrayList<Vec3[]>();
static boolean foundLivid = false;
static Entity livid = null;
+ public static double cakeTime;
+
+ public static final ResourceLocation CAKE_ICON = new ResourceLocation("dsm", "icons/cake.png");
static double dungeonStartTime = 0;
static double bloodOpenTime = 0;
@@ -158,6 +163,7 @@ public class TheMod
public static String ANSWER_COLOUR;
public static String SKILL_50_COLOUR;
public static String COORDS_COLOUR;
+ public static String CAKE_COLOUR;
@EventHandler
public void init(FMLInitializationEvent event) {
@@ -376,8 +382,8 @@ public class TheMod
for (String solution : riddleSolutions) {
if (message.contains(solution)) {
String npcName = message.substring(message.indexOf("]") + 2, message.indexOf(":"));
- Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText(ANSWER_COLOUR + "" + EnumChatFormatting.BOLD + StringUtils.stripControlCodes(npcName) + MAIN_COLOUR + " has the blessing."));
- break;
+ Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText(ANSWER_COLOUR + EnumChatFormatting.BOLD + StringUtils.stripControlCodes(npcName) + MAIN_COLOUR + " has the blessing."));
+ return;
}
}
}
@@ -423,6 +429,11 @@ public class TheMod
}
}
+ if (message.contains("Yum! You gain +") && message.contains(" for 48 hours!")) {
+ cakeTime = System.currentTimeMillis() / 1000 + 172800; // Add 48 hours
+ ConfigHandler.writeDoubleConfig("misc", "cakeTime", cakeTime);
+ }
+
final LootCommand lc = new LootCommand();
final ConfigHandler cf = new ConfigHandler();
boolean wolfRNG = false;
@@ -999,8 +1010,10 @@ public class TheMod
if (Minecraft.getMinecraft().currentScreen instanceof EditLocationsGui) return;
+ Minecraft mc = Minecraft.getMinecraft();
+
if (tc.coordsToggled) {
- EntityPlayer player = Minecraft.getMinecraft().thePlayer;
+ EntityPlayer player = mc.thePlayer;
double xDir = (player.rotationYaw % 360 + 360) % 360;
if (xDir > 180) xDir -= 360;
@@ -1008,7 +1021,7 @@ public class TheMod
double yDir = (double) Math.round(player.rotationPitch * 10d) / 10d;
String coordText = COORDS_COLOUR + (int) player.posX + " / " + (int) player.posY + " / " + (int) player.posZ + " (" + xDir + " / " + yDir + ")";
- new TextRenderer(Minecraft.getMinecraft(), coordText, moc.coordsXY[0], moc.coordsXY[1], ScaleCommand.coordsScale);
+ new TextRenderer(mc, coordText, moc.coordsXY[0], moc.coordsXY[1], ScaleCommand.coordsScale);
}
if (tc.dungeonTimerToggled && Utils.inDungeons) {
@@ -1024,12 +1037,32 @@ public class TheMod
EnumChatFormatting.BLUE + Utils.getTimeBetween(dungeonStartTime, bossClearTime) + "\n" +
EnumChatFormatting.YELLOW + dungeonDeaths + "\n" +
EnumChatFormatting.YELLOW + puzzleFails;
- new TextRenderer(Minecraft.getMinecraft(), dungeonTimerText, moc.dungeonTimerXY[0], moc.dungeonTimerXY[1], ScaleCommand.dungeonTimerScale);
- new TextRenderer(Minecraft.getMinecraft(), dungeonTimers, (int) (moc.dungeonTimerXY[0] + (80 * ScaleCommand.dungeonTimerScale)), moc.dungeonTimerXY[1], ScaleCommand.dungeonTimerScale);
+ new TextRenderer(mc, dungeonTimerText, moc.dungeonTimerXY[0], moc.dungeonTimerXY[1], ScaleCommand.dungeonTimerScale);
+ new TextRenderer(mc, dungeonTimers, (int) (moc.dungeonTimerXY[0] + (80 * ScaleCommand.dungeonTimerScale)), moc.dungeonTimerXY[1], ScaleCommand.dungeonTimerScale);
}
if (tc.lividSolverToggled && foundLivid && livid != null) {
- new TextRenderer(Minecraft.getMinecraft(), livid.getName().replace("" + EnumChatFormatting.BOLD, ""), moc.lividHpXY[0], moc.lividHpXY[1], ScaleCommand.lividHpScale);
+ new TextRenderer(mc, livid.getName().replace("" + EnumChatFormatting.BOLD, ""), moc.lividHpXY[0], moc.lividHpXY[1], ScaleCommand.lividHpScale);
+ }
+
+ if (tc.cakeTimerToggled) {
+ double scale = ScaleCommand.cakeTimerScale;
+ double scaleReset = (double) Math.pow(scale, -1);
+ GL11.glScaled(scale, scale, scale);
+
+ double timeNow = System.currentTimeMillis() / 1000;
+ mc.getTextureManager().bindTexture(CAKE_ICON);
+ Gui.drawModalRectWithCustomSizedTexture(moc.cakeTimerXY[0], moc.cakeTimerXY[1], 0, 0, 16, 16, 16, 16);
+
+ String cakeText;
+ if (cakeTime - timeNow < 0) {
+ cakeText = EnumChatFormatting.RED + "NONE";
+ } else {
+ cakeText = CAKE_COLOUR + Utils.getTimeBetween(timeNow, cakeTime);
+ }
+ new TextRenderer(mc, cakeText, moc.cakeTimerXY[0] + 20, moc.cakeTimerXY[1] + 5, 1);
+
+ GL11.glScaled(scaleReset, scaleReset, scaleReset);
}
if (!ds.display.equals("off")) {
@@ -1335,8 +1368,8 @@ public class TheMod
EnumChatFormatting.AQUA + bossesBetween;
if (tc.splitFishing) {
- new TextRenderer(Minecraft.getMinecraft(), dropsTextTwo, (int) (moc.displayXY[0] + (160 * ScaleCommand.displayScale)), moc.displayXY[1], ScaleCommand.displayScale);
- new TextRenderer(Minecraft.getMinecraft(), countTextTwo, (int) (moc.displayXY[0] + (270 * ScaleCommand.displayScale)), moc.displayXY[1], ScaleCommand.displayScale);
+ new TextRenderer(mc, dropsTextTwo, (int) (moc.displayXY[0] + (160 * ScaleCommand.displayScale)), moc.displayXY[1], ScaleCommand.displayScale);
+ new TextRenderer(mc, countTextTwo, (int) (moc.displayXY[0] + (270 * ScaleCommand.displayScale)), moc.displayXY[1], ScaleCommand.displayScale);
} else {
dropsText += "\n" + dropsTextTwo;
countText += "\n" + countTextTwo;
@@ -1396,8 +1429,8 @@ public class TheMod
EnumChatFormatting.AQUA + bossesBetween;
if (tc.splitFishing) {
- new TextRenderer(Minecraft.getMinecraft(), dropsTextTwo, (int) (moc.displayXY[0] + (160 * ScaleCommand.displayScale)), moc.displayXY[1], ScaleCommand.displayScale);
- new TextRenderer(Minecraft.getMinecraft(), countTextTwo, (int) (moc.displayXY[0] + (270 * ScaleCommand.displayScale)), moc.displayXY[1], ScaleCommand.displayScale);
+ new TextRenderer(mc, dropsTextTwo, (int) (moc.displayXY[0] + (160 * ScaleCommand.displayScale)), moc.displayXY[1], ScaleCommand.displayScale);
+ new TextRenderer(mc, countTextTwo, (int) (moc.displayXY[0] + (270 * ScaleCommand.displayScale)), moc.displayXY[1], ScaleCommand.displayScale);
} else {
dropsText += "\n" + dropsTextTwo;
countText += "\n" + countTextTwo;
@@ -1769,15 +1802,15 @@ public class TheMod
ds.display = "off";
cf.writeStringConfig("misc", "display", "off");
}
- new TextRenderer(Minecraft.getMinecraft(), dropsText, moc.displayXY[0], moc.displayXY[1], ScaleCommand.displayScale);
- new TextRenderer(Minecraft.getMinecraft(), countText, (int) (moc.displayXY[0] + (110 * ScaleCommand.displayScale)), moc.displayXY[1], ScaleCommand.displayScale);
+ new TextRenderer(mc, dropsText, moc.displayXY[0], moc.displayXY[1], ScaleCommand.displayScale);
+ new TextRenderer(mc, countText, (int) (moc.displayXY[0] + (110 * ScaleCommand.displayScale)), moc.displayXY[1], ScaleCommand.displayScale);
}
if (showTitle) {
Utils.drawTitle(titleText);
}
if (showSkill) {
- new TextRenderer(Minecraft.getMinecraft(), skillText, moc.skill50XY[0], moc.skill50XY[1], ScaleCommand.skill50Scale);
+ new TextRenderer(mc, skillText, moc.skill50XY[0], moc.skill50XY[1], ScaleCommand.skill50Scale);
}
}
diff --git a/src/main/java/me/Danker/commands/DHelpCommand.java b/src/main/java/me/Danker/commands/DHelpCommand.java
index c4fd618..90c2be8 100644
--- a/src/main/java/me/Danker/commands/DHelpCommand.java
+++ b/src/main/java/me/Danker/commands/DHelpCommand.java
@@ -34,14 +34,14 @@ public class DHelpCommand extends CommandBase {
EnumChatFormatting.GOLD + " Commands, " + EnumChatFormatting.GREEN + " Keybinds.\n" +
EnumChatFormatting.GOLD + " /dhelp" + EnumChatFormatting.AQUA + " - Returns this message.\n" +
EnumChatFormatting.GOLD + " /dsm" + EnumChatFormatting.AQUA + " - Opens the GUI for Danker's Skyblock Mod.\n" +
- EnumChatFormatting.GOLD + " /toggle <gparty/coords/golden/slayercount/rngesusalerts/splitfishing/chatmaddox/spiritbearalerts/aotd/lividdagger/sceptremessages/petcolors/dungeontimer/golemalerts/expertiselore/skill50display/outlinetext/threemanpuzzle/midasstaffmessages/lividsolver/oruopuzzle/blazepuzzle/creeperpuzzle/list>" + EnumChatFormatting.AQUA + " - Toggles features. /toggle list returns values of every toggle.\n" +
+ EnumChatFormatting.GOLD + " /toggle <gparty/coords/golden/slayercount/rngesusalerts/splitfishing/chatmaddox/spiritbearalerts/aotd/lividdagger/sceptremessages/petcolors/dungeontimer/golemalerts/expertiselore/skill50display/outlinetext/threemanpuzzle/midasstaffmessages/caketimer/lividsolver/oruopuzzle/blazepuzzle/creeperpuzzle/list>" + EnumChatFormatting.AQUA + " - Toggles features. /toggle list returns values of every toggle.\n" +
EnumChatFormatting.GOLD + " /setkey <key>" + EnumChatFormatting.AQUA + " - Sets API key.\n" +
EnumChatFormatting.GOLD + " /getkey" + EnumChatFormatting.AQUA + " - Returns key set with /setkey and copies it to your clipboard.\n" +
EnumChatFormatting.GOLD + " /loot <zombie/spider/wolf/fishing/catacombs> [winter/festival/spooky/f(1-6)/session]" + EnumChatFormatting.AQUA + " - Returns loot received from slayer quests or fishing stats. /loot fishing winter returns winter sea creatures instead.\n" +
EnumChatFormatting.GOLD + " /display <zombie/spider/wolf/fishing/catacombs/auto/off> [winter/festival/spooky/f(1-6)/session]" + EnumChatFormatting.AQUA + " - Text display for trackers. /display fishing winter displays winter sea creatures instead. /display auto automatically displays the loot for the slayer quest you have active.\n" +
EnumChatFormatting.GOLD + " /resetloot <zombie/spider/wolf/fishing/catacombs/confirm/cancel>" + EnumChatFormatting.AQUA + " - Resets loot for trackers. /resetloot confirm confirms the reset.\n" +
- EnumChatFormatting.GOLD + " /move <coords/display/dungeontimer/skill50/lividhp> <x> <y>" + EnumChatFormatting.AQUA + " - Moves text display to specified X and Y coordinates.\n" +
- EnumChatFormatting.GOLD + " /scale <coords/display/dungeontimer/skill50/lividhp> <scale (0.1 - 10)>" + EnumChatFormatting.AQUA + " - Scales text display to a specified multipler between 0.1x and 10x.\n" +
+ EnumChatFormatting.GOLD + " /move <coords/display/dungeontimer/skill50/lividhp/caketimer> <x> <y>" + EnumChatFormatting.AQUA + " - Moves text display to specified X and Y coordinates.\n" +
+ EnumChatFormatting.GOLD + " /scale <coords/display/dungeontimer/skill50/lividhp/caketimer> <scale (0.1 - 10)>" + EnumChatFormatting.AQUA + " - Scales text display to a specified multipler between 0.1x and 10x.\n" +
EnumChatFormatting.GOLD + " /slayer [player]" + EnumChatFormatting.AQUA + " - Uses API to get slayer xp of a person. If no name is provided, it checks yours.\n" +
EnumChatFormatting.GOLD + " /skills [player]" + EnumChatFormatting.AQUA + " - Uses API to get skill levels of a person. If no name is provided, it checks yours.\n" +
EnumChatFormatting.GOLD + " /lobbyskills" + EnumChatFormatting.AQUA + " - Uses API to find the average skills of the lobby, as well the three players with the highest skill average.\n" +
diff --git a/src/main/java/me/Danker/commands/MoveCommand.java b/src/main/java/me/Danker/commands/MoveCommand.java
index 1a68528..a3f5e3b 100644
--- a/src/main/java/me/Danker/commands/MoveCommand.java
+++ b/src/main/java/me/Danker/commands/MoveCommand.java
@@ -19,6 +19,7 @@ public class MoveCommand extends CommandBase {
public static int[] dungeonTimerXY = {0, 0};
public static int[] skill50XY = {0, 0};
public static int[] lividHpXY = {0, 0};
+ public static int[] cakeTimerXY = {0, 0};
@Override
public String getCommandName() {
@@ -27,7 +28,7 @@ public class MoveCommand extends CommandBase {
@Override
public String getCommandUsage(ICommandSender arg0) {
- return "/" + getCommandName() + " <coords/display/dungeontimer/skill50/lividhp> <x> <y>";
+ return "/" + getCommandName() + " <coords/display/dungeontimer/skill50/lividhp/caketimer> <x> <y>";
}
@Override
@@ -38,7 +39,7 @@ 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");
+ return getListOfStringsMatchingLastWord(args, "coords", "display", "dungeontimer", "skill50", "lividhp", "caketimer");
}
return null;
}
@@ -83,6 +84,11 @@ public class MoveCommand extends CommandBase {
cf.writeIntConfig("locations", "lividHpX", lividHpXY[0]);
cf.writeIntConfig("locations", "lividHpY", lividHpXY[1]);
player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Livid HP has been moved to " + TheMod.SECONDARY_COLOUR + arg1[1] + ", " + arg1[2]));
+ } else if (arg1[0].equalsIgnoreCase("caketimer")) {
+ cakeTimerXY[0] = Integer.parseInt(arg1[1]);
+ cakeTimerXY[1] = Integer.parseInt(arg1[2]);
+ cf.writeIntConfig("locations", "cakeTimerX", cakeTimerXY[0]);
+ cf.writeIntConfig("locations", "cakeTimerY", cakeTimerXY[1]);
} else {
player.addChatMessage(new ChatComponentText(TheMod.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 0fdbafd..fa4c51d 100644
--- a/src/main/java/me/Danker/commands/ScaleCommand.java
+++ b/src/main/java/me/Danker/commands/ScaleCommand.java
@@ -19,6 +19,7 @@ public class ScaleCommand extends CommandBase {
public static double dungeonTimerScale;
public static double skill50Scale;
public static double lividHpScale;
+ public static double cakeTimerScale;
@Override
public String getCommandName() {
@@ -27,7 +28,7 @@ public class ScaleCommand extends CommandBase {
@Override
public String getCommandUsage(ICommandSender arg0) {
- return "/" + getCommandName() + " <coords/display/dungeontimer/skill50/lividhp> <size (0.1 - 10)>";
+ return "/" + getCommandName() + " <coords/display/dungeontimer/skill50/lividhp/caketimer> <size (0.1 - 10)>";
}
@Override
@@ -38,7 +39,7 @@ 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");
+ return getListOfStringsMatchingLastWord(args, "coords", "display", "dungeontimer", "skill50", "lividhp", "caketimer");
}
return null;
}
@@ -78,6 +79,10 @@ public class ScaleCommand extends CommandBase {
lividHpScale = scaleAmount;
ConfigHandler.writeDoubleConfig("scales", "lividHpScale", lividHpScale);
player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Livid HP has been scaled to " + TheMod.SECONDARY_COLOUR + lividHpScale + "x"));
+ } else if (arg1[0].equalsIgnoreCase("caketimer")) {
+ cakeTimerScale = scaleAmount;
+ ConfigHandler.writeDoubleConfig("scales", "cakeTimerScale", cakeTimerScale);
+ player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Cake timer has been scaled to " + TheMod.SECONDARY_COLOUR + cakeTimerScale + "x"));
} else {
player.addChatMessage(new ChatComponentText(TheMod.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 27b55f0..473c29a 100644
--- a/src/main/java/me/Danker/commands/ToggleCommand.java
+++ b/src/main/java/me/Danker/commands/ToggleCommand.java
@@ -33,6 +33,7 @@ public class ToggleCommand extends CommandBase implements ICommand {
public static boolean skill50DisplayToggled;
public static boolean outlineTextToggled;
public static boolean midasStaffMessages;
+ public static boolean cakeTimerToggled;
public static boolean lividSolverToggled;
// Puzzle Solvers
public static boolean threeManToggled;
@@ -49,7 +50,7 @@ public class ToggleCommand extends CommandBase implements ICommand {
public String getCommandUsage(ICommandSender arg0) {
return "/" + getCommandName() + " <gparty/coords/golden/slayercount/rngesusalerts/splitfishing/chatmaddox/spiritbearalert/" +
"aotd/lividdagger/sceptremessages/petcolors/dungeontimer/golemalerts/expertiselore/skill50display/" +
- "outlinetext/midasstaffmessages/lividsolver/threemanpuzzle/oruopuzzle/blazepuzzle/creeperpuzzle/list>";
+ "outlinetext/midasstaffmessages/caketimer/lividsolver/threemanpuzzle/oruopuzzle/blazepuzzle/creeperpuzzle/list>";
}
@Override
@@ -64,8 +65,8 @@ public class ToggleCommand extends CommandBase implements ICommand {
"splitfishing", "chatmaddox", "spiritbearalerts", "aotd", "lividdagger",
"sceptremessages", "petcolors", "dungeontimer", "golemalerts",
"expertiselore", "skill50display", "outlinetext", "midasstaffmessages",
- "lividsolver", "threemanpuzzle", "oruopuzzle", "blazepuzzle", "creeperpuzzle",
- "list");
+ "caketimer", "lividsolver", "threemanpuzzle", "oruopuzzle", "blazepuzzle",
+ "creeperpuzzle", "list");
}
return null;
}
@@ -152,7 +153,11 @@ public class ToggleCommand extends CommandBase implements ICommand {
midasStaffMessages = !midasStaffMessages;
cf.writeBooleanConfig("toggles", "MidasStaffMessages", midasStaffMessages);
player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Midas Staff messages have been set to " + TheMod.SECONDARY_COLOUR + midasStaffMessages + TheMod.MAIN_COLOUR + "."));
- } else if (arg1[0].equalsIgnoreCase("lividsolver")) {
+ } else if (arg1[0].equalsIgnoreCase("caketimer")) {
+ cakeTimerToggled = !cakeTimerToggled;
+ cf.writeBooleanConfig("toggles", "CakeTimer", cakeTimerToggled);
+ player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Cake timer has been set to " + TheMod.SECONDARY_COLOUR + cakeTimerToggled + TheMod.MAIN_COLOUR + "."));
+ } else if (arg1[0].equalsIgnoreCase("lividsolver")) {
lividSolverToggled = !lividSolverToggled;
cf.writeBooleanConfig("toggles", "LividSolver", lividSolverToggled);
player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Livid solver has been set to " + TheMod.SECONDARY_COLOUR + lividSolverToggled + TheMod.MAIN_COLOUR + "."));
@@ -173,29 +178,30 @@ public class ToggleCommand extends CommandBase implements ICommand {
cf.writeBooleanConfig("creeperpuzzle", "CreeperPuzzle", creeperToggled);
player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Creeper puzzle solver has been set to " + TheMod.SECONDARY_COLOUR + creeperToggled + TheMod.MAIN_COLOUR + "."));
} else if (arg1[0].equalsIgnoreCase("list")) {
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Guild party notifications: " + EnumChatFormatting.DARK_GREEN + gpartyToggled + "\n" +
- EnumChatFormatting.GREEN + " Coord/Angle display: " + EnumChatFormatting.DARK_GREEN + coordsToggled + "\n" +
- EnumChatFormatting.GREEN + " Golden T6 enchants: " + EnumChatFormatting.DARK_GREEN + goldenToggled + "\n" +
- EnumChatFormatting.GREEN + " Counting total 20% slayer drops: " + EnumChatFormatting.DARK_GREEN + slayerCountTotal + "\n" +
- EnumChatFormatting.GREEN + " Slayer RNGesus alerts: " + EnumChatFormatting.DARK_GREEN + rngesusAlerts + "\n" +
- EnumChatFormatting.GREEN + " Split fishing display: " + EnumChatFormatting.DARK_GREEN + splitFishing + "\n" +
- EnumChatFormatting.GREEN + " Chat Maddox menu: " + EnumChatFormatting.DARK_GREEN + chatMaddoxToggled + "\n" +
- EnumChatFormatting.GREEN + " Spirit Bear alerts: " + EnumChatFormatting.DARK_GREEN + spiritBearAlerts + "\n" +
- EnumChatFormatting.GREEN + " Block AOTD ability: " + EnumChatFormatting.DARK_GREEN + aotdToggled + "\n" +
- EnumChatFormatting.GREEN + " Block Livid Dagger ability: " + EnumChatFormatting.DARK_GREEN + lividDaggerToggled + "\n" +
- EnumChatFormatting.GREEN + " Spirit Sceptre messages: " + EnumChatFormatting.DARK_GREEN + sceptreMessages + "\n" +
- EnumChatFormatting.GREEN + " Pet colours: " + EnumChatFormatting.DARK_GREEN + petColoursToggled + "\n" +
- EnumChatFormatting.GREEN + " Dungeon timer: " + EnumChatFormatting.DARK_GREEN + dungeonTimerToggled + "\n" +
- EnumChatFormatting.GREEN + " Golem spawn alerts: " + EnumChatFormatting.DARK_GREEN + golemAlertToggled + "\n" +
- EnumChatFormatting.GREEN + " Expertise in lore: " + EnumChatFormatting.DARK_GREEN + expertiseLoreToggled + "\n" +
- EnumChatFormatting.GREEN + " Skill 50 display: " + EnumChatFormatting.DARK_GREEN + skill50DisplayToggled + "\n" +
- EnumChatFormatting.GREEN + " Outline displayed text: " + EnumChatFormatting.DARK_GREEN + outlineTextToggled + "\n" +
- EnumChatFormatting.GREEN + " Midas Staff messages: " + EnumChatFormatting.DARK_GREEN + midasStaffMessages + "\n" +
- EnumChatFormatting.GREEN + " Livid solver: " + EnumChatFormatting.DARK_GREEN + lividSolverToggled + "\n" +
- EnumChatFormatting.GREEN + " Three man puzzle solver: " + EnumChatFormatting.DARK_GREEN + threeManToggled + "\n" +
- EnumChatFormatting.GREEN + " Oruo trivia solver: " + EnumChatFormatting.DARK_GREEN + oruoToggled + "\n" +
- EnumChatFormatting.GREEN + " Blaze puzzle solver: " + EnumChatFormatting.DARK_GREEN + blazeToggled + "\n" +
- EnumChatFormatting.GREEN + " Creeper puzzle solver: " + EnumChatFormatting.DARK_GREEN + creeperToggled));
+ player.addChatMessage(new ChatComponentText(TheMod.TYPE_COLOUR + "Guild party notifications: " + TheMod.VALUE_COLOUR + gpartyToggled + "\n" +
+ TheMod.TYPE_COLOUR + " Coord/Angle display: " + TheMod.VALUE_COLOUR + coordsToggled + "\n" +
+ TheMod.TYPE_COLOUR + " Golden T6 enchants: " + TheMod.VALUE_COLOUR + goldenToggled + "\n" +
+ TheMod.TYPE_COLOUR + " Counting total 20% slayer drops: " + TheMod.VALUE_COLOUR + slayerCountTotal + "\n" +
+ TheMod.TYPE_COLOUR + " Slayer RNGesus alerts: " + TheMod.VALUE_COLOUR + rngesusAlerts + "\n" +
+ TheMod.TYPE_COLOUR + " Split fishing display: " + TheMod.VALUE_COLOUR + splitFishing + "\n" +
+ TheMod.TYPE_COLOUR + " Chat Maddox menu: " + TheMod.VALUE_COLOUR + chatMaddoxToggled + "\n" +
+ TheMod.TYPE_COLOUR + " Spirit Bear alerts: " + TheMod.VALUE_COLOUR + spiritBearAlerts + "\n" +
+ TheMod.TYPE_COLOUR + " Block AOTD ability: " + TheMod.VALUE_COLOUR + aotdToggled + "\n" +
+ TheMod.TYPE_COLOUR + " Block Livid Dagger ability: " + TheMod.VALUE_COLOUR + lividDaggerToggled + "\n" +
+ TheMod.TYPE_COLOUR + " Spirit Sceptre messages: " + TheMod.VALUE_COLOUR + sceptreMessages + "\n" +
+ TheMod.TYPE_COLOUR + " Pet colours: " + TheMod.VALUE_COLOUR + petColoursToggled + "\n" +
+ TheMod.TYPE_COLOUR + " Dungeon timer: " + TheMod.VALUE_COLOUR + dungeonTimerToggled + "\n" +
+ TheMod.TYPE_COLOUR + " Golem spawn alerts: " + TheMod.VALUE_COLOUR + golemAlertToggled + "\n" +
+ TheMod.TYPE_COLOUR + " Expertise in lore: " + TheMod.VALUE_COLOUR + expertiseLoreToggled + "\n" +
+ TheMod.TYPE_COLOUR + " Skill 50 display: " + TheMod.VALUE_COLOUR + skill50DisplayToggled + "\n" +
+ TheMod.TYPE_COLOUR + " Outline displayed text: " + TheMod.VALUE_COLOUR + outlineTextToggled + "\n" +
+ TheMod.TYPE_COLOUR + " Midas Staff messages: " + TheMod.VALUE_COLOUR + midasStaffMessages + "\n" +
+ TheMod.TYPE_COLOUR + " Cake timer: " + TheMod.VALUE_COLOUR + cakeTimerToggled + "\n" +
+ TheMod.TYPE_COLOUR + " Livid solver: " + TheMod.VALUE_COLOUR + lividSolverToggled + "\n" +
+ TheMod.TYPE_COLOUR + " Three man puzzle solver: " + TheMod.VALUE_COLOUR + threeManToggled + "\n" +
+ TheMod.TYPE_COLOUR + " Oruo trivia solver: " + TheMod.VALUE_COLOUR + oruoToggled + "\n" +
+ TheMod.TYPE_COLOUR + " Blaze puzzle solver: " + TheMod.VALUE_COLOUR + blazeToggled + "\n" +
+ TheMod.TYPE_COLOUR + " Creeper puzzle solver: " + TheMod.VALUE_COLOUR + creeperToggled));
} else {
player.addChatMessage(new ChatComponentText(TheMod.ERROR_COLOUR + "Usage: " + getCommandUsage(arg0)));
}
diff --git a/src/main/java/me/Danker/gui/DankerGui.java b/src/main/java/me/Danker/gui/DankerGui.java
index 15e0fa5..1bf7911 100644
--- a/src/main/java/me/Danker/gui/DankerGui.java
+++ b/src/main/java/me/Danker/gui/DankerGui.java
@@ -8,6 +8,7 @@ import java.net.URISyntaxException;
import me.Danker.TheMod;
import me.Danker.commands.ToggleCommand;
import me.Danker.handlers.ConfigHandler;
+import me.Danker.handlers.TextRenderer;
import me.Danker.utils.Utils;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiButton;
@@ -46,6 +47,7 @@ public class DankerGui extends GuiScreen {
private GuiButton skill50Display;
private GuiButton outlineText;
private GuiButton midasStaffMessages;
+ private GuiButton cakeTimer;
private GuiButton lividSolver;
public DankerGui(int page) {
@@ -81,21 +83,24 @@ public class DankerGui extends GuiScreen {
dungeonTimer = new GuiButton(0, width / 2 - 100, (int) (height * 0.6), "Display Dungeon Timers: " + Utils.getColouredBoolean(ToggleCommand.dungeonTimerToggled));
coords = new GuiButton(0, width / 2 - 100, (int) (height * 0.7), "Coordinate/Angle Display: " + Utils.getColouredBoolean(ToggleCommand.coordsToggled));
// Page 2
- gparty = new GuiButton(0, width / 2 - 100, (int) (height * 0.1), "Guild Party Notifications: " + Utils.getColouredBoolean(ToggleCommand.gpartyToggled));
- goldenEnch = new GuiButton(0, width / 2 - 100, (int) (height * 0.2), "Golden T10/T6/T4 Enchantments: " + Utils.getColouredBoolean(ToggleCommand.goldenToggled));
- slayerCount = new GuiButton(0, width / 2 - 100, (int) (height * 0.3), "Count Total 20% Drops: " + Utils.getColouredBoolean(ToggleCommand.slayerCountTotal));
- chatMaddox = new GuiButton(0, width / 2 - 100, (int) (height * 0.4), "Click Chat to Open Maddox: " + Utils.getColouredBoolean(ToggleCommand.chatMaddoxToggled));
- spiritBearAlert = new GuiButton(0, width / 2 - 100, (int) (height * 0.5), "Spirit Bear Spawn Alerts: " + Utils.getColouredBoolean(ToggleCommand.spiritBearAlerts));
+ cakeTimer = new GuiButton(0, width / 2 - 100, (int) (height * 0.1), "Cake Timer: " + Utils.getColouredBoolean(ToggleCommand.cakeTimerToggled));
+ skill50Display = new GuiButton(0, width / 2 - 100, (int) (height * 0.2), "Display Progress To Skill Level 50: " + Utils.getColouredBoolean(ToggleCommand.skill50DisplayToggled));
+ gparty = new GuiButton(0, width / 2 - 100, (int) (height * 0.3), "Guild Party Notifications: " + Utils.getColouredBoolean(ToggleCommand.gpartyToggled));
+ slayerCount = new GuiButton(0, width / 2 - 100, (int) (height * 0.4), "Count Total 20% Drops: " + Utils.getColouredBoolean(ToggleCommand.slayerCountTotal));
+ chatMaddox = new GuiButton(0, width / 2 - 100, (int) (height * 0.5), "Click Chat to Open Maddox: " + Utils.getColouredBoolean(ToggleCommand.chatMaddoxToggled));
aotd = new GuiButton(0, width / 2 - 100, (int) (height * 0.6), "Disable AOTD Ability: " + Utils.getColouredBoolean(ToggleCommand.aotdToggled));
lividDagger = new GuiButton(0, width / 2 - 100, (int) (height * 0.7), "Disable Livid Dagger Ability: " + Utils.getColouredBoolean(ToggleCommand.lividDaggerToggled));
// Page 3
- sceptreMessages = new GuiButton(0, width / 2 - 100, (int) (height * 0.1), "Spirit Sceptre Messages: " + Utils.getColouredBoolean(ToggleCommand.sceptreMessages));
- midasStaffMessages = new GuiButton(0, width / 2 - 100, (int) (height * 0.2), "Midas Staff Messages: " + Utils.getColouredBoolean(ToggleCommand.midasStaffMessages));
- petColours = new GuiButton(0, width / 2 - 100, (int) (height * 0.3), "Colour Pet Backgrounds: " + Utils.getColouredBoolean(ToggleCommand.petColoursToggled));
- golemAlerts = new GuiButton(0, width / 2 - 100, (int) (height * 0.4), "Alert When Golem Spawns: " + Utils.getColouredBoolean(ToggleCommand.golemAlertToggled));
- expertiseLore = new GuiButton(0, width / 2 - 100, (int) (height * 0.5), "Expertise Kills In Lore: " + Utils.getColouredBoolean(ToggleCommand.expertiseLoreToggled));
- skill50Display = new GuiButton(0, width / 2 - 100, (int) (height * 0.6), "Display Progress To Skill Level 50: " + Utils.getColouredBoolean(ToggleCommand.skill50DisplayToggled));
+ spiritBearAlert = new GuiButton(0, width / 2 - 100, (int) (height * 0.1), "Spirit Bear Spawn Alerts: " + Utils.getColouredBoolean(ToggleCommand.spiritBearAlerts));
+ sceptreMessages = new GuiButton(0, width / 2 - 100, (int) (height * 0.2), "Spirit Sceptre Messages: " + Utils.getColouredBoolean(ToggleCommand.sceptreMessages));
+ midasStaffMessages = new GuiButton(0, width / 2 - 100, (int) (height * 0.3), "Midas Staff Messages: " + Utils.getColouredBoolean(ToggleCommand.midasStaffMessages));
+ goldenEnch = new GuiButton(0, width / 2 - 100, (int) (height * 0.4), "Golden T10/T6/T4 Enchantments: " + Utils.getColouredBoolean(ToggleCommand.goldenToggled));
+ petColours = new GuiButton(0, width / 2 - 100, (int) (height * 0.5), "Colour Pet Backgrounds: " + Utils.getColouredBoolean(ToggleCommand.petColoursToggled));
+ expertiseLore = new GuiButton(0, width / 2 - 100, (int) (height * 0.6), "Expertise Kills In Lore: " + Utils.getColouredBoolean(ToggleCommand.expertiseLoreToggled));
lividSolver = new GuiButton(0, width / 2 - 100, (int) (height * 0.7), "Find Correct Livid: " + Utils.getColouredBoolean(ToggleCommand.lividSolverToggled));
+ // Page 4
+ golemAlerts = new GuiButton(0, width / 2 - 100, (int) (height * 0.1), "Alert When Golem Spawns: " + Utils.getColouredBoolean(ToggleCommand.golemAlertToggled));
+ rngesusAlert = new GuiButton(0, width / 2 - 100, (int) (height * 0.2), "RNGesus Alerts: " + Utils.getColouredBoolean(ToggleCommand.rngesusAlerts));
if (page == 1) {
this.buttonList.add(changeDisplay);
@@ -107,25 +112,31 @@ public class DankerGui extends GuiScreen {
this.buttonList.add(coords);
this.buttonList.add(nextPage);
} else if (page == 2) {
+ this.buttonList.add(cakeTimer);
+ this.buttonList.add(skill50Display);
this.buttonList.add(gparty);
- this.buttonList.add(goldenEnch);
this.buttonList.add(slayerCount);
this.buttonList.add(chatMaddox);
- this.buttonList.add(spiritBearAlert);
this.buttonList.add(aotd);
this.buttonList.add(lividDagger);
this.buttonList.add(nextPage);
this.buttonList.add(backPage);
} else if (page == 3) {
+ this.buttonList.add(spiritBearAlert);
this.buttonList.add(sceptreMessages);
this.buttonList.add(midasStaffMessages);
+ this.buttonList.add(goldenEnch);
this.buttonList.add(petColours);
- this.buttonList.add(golemAlerts);
this.buttonList.add(expertiseLore);
- this.buttonList.add(skill50Display);
this.buttonList.add(lividSolver);
+ this.buttonList.add(nextPage);
+ this.buttonList.add(backPage);
+ } else if (page == 4) {
+ this.buttonList.add(golemAlerts);
+ this.buttonList.add(rngesusAlert);
this.buttonList.add(backPage);
}
+
this.buttonList.add(githubLink);
this.buttonList.add(discordLink);
this.buttonList.add(closeGUI);
@@ -134,6 +145,9 @@ public class DankerGui extends GuiScreen {
@Override
public void drawScreen(int mouseX, int mouseY, float partialTicks) {
this.drawDefaultBackground();
+ String pageText = "Page: " + page + "/4";
+ int pageWidth = mc.fontRendererObj.getStringWidth(pageText);
+ new TextRenderer(mc, pageText, width / 2 - pageWidth / 2, 10, 1D);
super.drawScreen(mouseX, mouseY, partialTicks);
}
@@ -235,6 +249,14 @@ public class DankerGui extends GuiScreen {
ToggleCommand.lividSolverToggled = !ToggleCommand.lividSolverToggled;
ConfigHandler.writeBooleanConfig("toggles", "LividSolver", ToggleCommand.lividSolverToggled);
lividSolver.displayString = "Find Correct Livid: " + Utils.getColouredBoolean(ToggleCommand.lividSolverToggled);
+ } else if (button == rngesusAlert) {
+ ToggleCommand.rngesusAlerts = !ToggleCommand.rngesusAlerts;
+ ConfigHandler.writeBooleanConfig("toggles", "RNGesusAlerts", ToggleCommand.rngesusAlerts);
+ rngesusAlert.displayString = "RNGesus Alerts: " + Utils.getColouredBoolean(ToggleCommand.rngesusAlerts);
+ } else if (button == cakeTimer) {
+ ToggleCommand.cakeTimerToggled = !ToggleCommand.cakeTimerToggled;
+ ConfigHandler.writeBooleanConfig("toggles", "CakeTimer", ToggleCommand.cakeTimerToggled);
+ cakeTimer.displayString = "Cake Timer: " + Utils.getColouredBoolean(ToggleCommand.cakeTimerToggled);
}
}
diff --git a/src/main/java/me/Danker/gui/EditLocationsGui.java b/src/main/java/me/Danker/gui/EditLocationsGui.java
index c902c6c..d8034e6 100644
--- a/src/main/java/me/Danker/gui/EditLocationsGui.java
+++ b/src/main/java/me/Danker/gui/EditLocationsGui.java
@@ -1,11 +1,14 @@
package me.Danker.gui;
+import org.lwjgl.opengl.GL11;
+
import me.Danker.TheMod;
import me.Danker.commands.MoveCommand;
import me.Danker.commands.ScaleCommand;
import me.Danker.gui.buttons.LocationButton;
import me.Danker.handlers.ConfigHandler;
import me.Danker.utils.Utils;
+import net.minecraft.client.gui.Gui;
import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.util.EnumChatFormatting;
@@ -21,6 +24,7 @@ public class EditLocationsGui extends GuiScreen {
private LocationButton coords;
private LocationButton skill50;
private LocationButton lividHP;
+ private LocationButton cakeTimer;
@Override
public boolean doesGuiPauseGame() {
@@ -75,10 +79,12 @@ public class EditLocationsGui extends GuiScreen {
coords = new LocationButton(0, moc.coordsXY[0], moc.coordsXY[1], 141 * sc.coordsScale, 12 * sc.coordsScale, sc.coordsScale, TheMod.COORDS_COLOUR + "74 / 14 / -26 (141.1 / 6.7)", null, null);
skill50 = new LocationButton(0, moc.skill50XY[0], moc.skill50XY[1], 233 * sc.skill50Scale, 12 * sc.skill50Scale, sc.skill50Scale, TheMod.SKILL_50_COLOUR + "+3.5 Farming (28,882,117.7/55,172,425) 52.34%", null, null);
lividHP = new LocationButton(0, moc.lividHpXY[0], moc.lividHpXY[1], 85 * sc.lividHpScale, 12 * sc.lividHpScale, sc.lividHpScale, EnumChatFormatting.WHITE + "﴾ Livid " + EnumChatFormatting.YELLOW + "6.9M" + EnumChatFormatting.RED + "❤ " + EnumChatFormatting.WHITE + "﴿", null, null);
+ cakeTimer = new LocationButton(0, moc.cakeTimerXY[0], moc.cakeTimerXY[1] + 5, 85 * sc.cakeTimerScale, 18 * sc.cakeTimerScale, sc.cakeTimerScale, TheMod.CAKE_COLOUR + " 11h16m", null, null);
this.buttonList.add(coords);
this.buttonList.add(dungeonTimer);
this.buttonList.add(lividHP);
+ this.buttonList.add(cakeTimer);
this.buttonList.add(display);
this.buttonList.add(skill50);
}
@@ -87,6 +93,14 @@ public class EditLocationsGui extends GuiScreen {
public void drawScreen(int mouseX, int mouseY, float partialTicks) {
this.drawDefaultBackground();
mouseMoved(mouseX, mouseY);
+
+ double scale = ScaleCommand.cakeTimerScale;
+ double scaleReset = (double) Math.pow(scale, -1);
+ GL11.glScaled(scale, scale, scale);
+ mc.getTextureManager().bindTexture(TheMod.CAKE_ICON);
+ Gui.drawModalRectWithCustomSizedTexture(MoveCommand.cakeTimerXY[0], MoveCommand.cakeTimerXY[1], 0, 0, 16, 16, 16, 16);
+ GL11.glScaled(scaleReset, scaleReset, scaleReset);
+
super.drawScreen(mouseX, mouseY, partialTicks);
}
@@ -120,6 +134,11 @@ public class EditLocationsGui extends GuiScreen {
MoveCommand.lividHpXY[1] += yMoved;
lividHP.xPosition = MoveCommand.lividHpXY[0];
lividHP.yPosition = MoveCommand.lividHpXY[1];
+ } else if (moving.equals("cakeTimer")) {
+ MoveCommand.cakeTimerXY[0] += xMoved;
+ MoveCommand.cakeTimerXY[1] += yMoved;
+ cakeTimer.xPosition = MoveCommand.cakeTimerXY[0];
+ cakeTimer.yPosition = MoveCommand.cakeTimerXY[1];
}
this.buttonList.clear();
initGui();
@@ -142,6 +161,8 @@ public class EditLocationsGui extends GuiScreen {
moving = "skill50";
} else if (button == lividHP) {
moving = "lividHP";
+ } else if (button == cakeTimer) {
+ moving = "cakeTimer";
}
}
}
@@ -160,6 +181,8 @@ public class EditLocationsGui extends GuiScreen {
ConfigHandler.writeIntConfig("locations", "skill50Y", MoveCommand.skill50XY[1]);
ConfigHandler.writeIntConfig("locations", "lividHpX", MoveCommand.lividHpXY[0]);
ConfigHandler.writeIntConfig("locations", "lividHpY", MoveCommand.lividHpXY[1]);
+ ConfigHandler.writeIntConfig("locations", "cakeTimerX", MoveCommand.cakeTimerXY[0]);
+ ConfigHandler.writeIntConfig("locations", "cakeTimerY", MoveCommand.cakeTimerXY[1]);
}
}
diff --git a/src/main/java/me/Danker/handlers/ConfigHandler.java b/src/main/java/me/Danker/handlers/ConfigHandler.java
index 98cc35e..7473e43 100644
--- a/src/main/java/me/Danker/handlers/ConfigHandler.java
+++ b/src/main/java/me/Danker/handlers/ConfigHandler.java
@@ -191,6 +191,7 @@ public class ConfigHandler {
if (!hasKey("toggles", "Skill50Display")) writeBooleanConfig("toggles", "Skill50Display", false);
if (!hasKey("toggles", "OutlineText")) writeBooleanConfig("toggles", "OutlineText", false);
if (!hasKey("toggles", "MidasStaffMessages")) writeBooleanConfig("toggles", "MidasStaffMessages", true);
+ if (!hasKey("toggles", "CakeTimer")) writeBooleanConfig("toggles", "CakeTimer", false);
if (!hasKey("toggles", "LividSolver")) writeBooleanConfig("toggles", "LividSolver", false);
// Puzzle Solvers
if (!hasKey("toggles", "ThreeManPuzzle")) writeBooleanConfig("toggles", "ThreeManPuzzle", false);
@@ -336,6 +337,7 @@ public class ConfigHandler {
if (!hasKey("misc", "autoDisplay")) writeBooleanConfig("misc", "autoDisplay", false);
if (!hasKey("misc", "skill50Time")) writeIntConfig("misc", "skill50Time", 3);
if (!hasKey("misc", "trueChatMaddoxEnabled")) writeBooleanConfig("misc", "trueChatMaddoxEnabled", true);
+ if (!hasKey("misc", "cakeTime")) writeDoubleConfig("misc", "cakeTime", 0);
ScaledResolution scaled = new ScaledResolution(Minecraft.getMinecraft());
int height = scaled.getScaledHeight();
@@ -349,11 +351,14 @@ public class ConfigHandler {
if (!hasKey("locations", "skill50Y")) writeIntConfig("locations", "skill50Y", 10);
if (!hasKey("locations", "lividHpX")) writeIntConfig("locations", "lividHpX", 40);
if (!hasKey("locations", "lividHpY")) writeIntConfig("locations", "lividHpY", 20);
+ if (!hasKey("locations", "cakeTimerX")) writeIntConfig("locations", "cakeTimerX", 40);
+ if (!hasKey("locations", "cakeTimerY")) writeIntConfig("locations", "cakeTimerY", 30);
if (!hasKey("scales", "coordsScale")) writeDoubleConfig("scales", "coordsScale", 1);
if (!hasKey("scales", "displayScale")) writeDoubleConfig("scales", "displayScale", 1);
if (!hasKey("scales", "dungeonTimerScale")) writeDoubleConfig("scales", "dungeonTimerScale", 1);
if (!hasKey("scales", "skill50Scale")) writeDoubleConfig("scales", "skill50Scale", 1);
if (!hasKey("scales", "lividHpScale")) writeDoubleConfig("scales", "lividHpScale", 1);
+ if (!hasKey("scales", "cakeTimerScale")) writeDoubleConfig("scales", "cakeTimerScale", 1);
if (!hasKey("colors", "main")) writeStringConfig("colors", "main", "" + EnumChatFormatting.GREEN);
if (!hasKey("colors", "secondary")) writeStringConfig("colors", "secondary", "" + EnumChatFormatting.DARK_GREEN);
@@ -365,6 +370,7 @@ public class ConfigHandler {
if (!hasKey("colors", "answer")) writeStringConfig("colors", "answer", "" + EnumChatFormatting.DARK_GREEN);
if (!hasKey("colors", "skill50Display")) writeStringConfig("colors", "skill50Display", "" + EnumChatFormatting.AQUA);
if (!hasKey("colors", "coordsDisplay")) writeStringConfig("colors", "coordsDisplay", "" + EnumChatFormatting.WHITE);
+ if (!hasKey("colors", "cakeDisplay")) writeStringConfig("colors", "cakeDisplay", "" + EnumChatFormatting.GOLD);
final ToggleCommand tf = new ToggleCommand();
tf.gpartyToggled = getBoolean("toggles", "GParty");
@@ -385,6 +391,7 @@ public class ConfigHandler {
tf.skill50DisplayToggled = getBoolean("toggles", "Skill50Display");
tf.outlineTextToggled = getBoolean("toggles", "OutlineText");
tf.midasStaffMessages = getBoolean("toggles", "MidasStaffMessages");
+ tf.cakeTimerToggled = getBoolean("toggles", "CakeTimer");
tf.lividSolverToggled = getBoolean("toggles", "LividSolver");
// Puzzle Solvers
tf.threeManToggled = getBoolean("toggles", "ThreeManPuzzle");
@@ -537,6 +544,7 @@ public class ConfigHandler {
ds.auto = getBoolean("misc", "autoDisplay");
TheMod.SKILL_TIME = getInt("misc", "skill50Time") * 20;
tf.trueChatMaddoxEnabled = getBoolean("misc", "trueChatMaddoxEnabled");
+ TheMod.cakeTime = getDouble("misc", "cakeTime");
final MoveCommand moc = new MoveCommand();
moc.coordsXY[0] = getInt("locations", "coordsX");
@@ -549,6 +557,8 @@ public class ConfigHandler {
moc.skill50XY[1] = getInt("locations", "skill50Y");
moc.lividHpXY[0] = getInt("locations", "lividHpX");
moc.lividHpXY[1] = getInt("locations", "lividHpY");
+ moc.cakeTimerXY[0] = getInt("locations", "cakeTimerX");
+ moc.cakeTimerXY[1] = getInt("locations", "cakeTimerY");
final ScaleCommand sc = new ScaleCommand();
sc.coordsScale = getDouble("scales", "coordsScale");
@@ -556,6 +566,7 @@ public class ConfigHandler {
sc.dungeonTimerScale = getDouble("scales", "dungeonTimerScale");
sc.skill50Scale = getDouble("scales", "skill50Scale");
sc.lividHpScale = getDouble("scales", "lividHpScale");
+ sc.cakeTimerScale = getDouble("scales", "cakeTimerScale");
TheMod.MAIN_COLOUR = getString("colors", "main");
TheMod.SECONDARY_COLOUR = getString("colors", "secondary");
@@ -567,6 +578,7 @@ public class ConfigHandler {
TheMod.ANSWER_COLOUR = getString("colors", "answer");
TheMod.SKILL_50_COLOUR = getString("colors", "skill50Display");
TheMod.COORDS_COLOUR = getString("colors", "coordsDisplay");
+ TheMod.CAKE_COLOUR = getString("colors", "cakeDisplay");
}
}