diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/me/Danker/TheMod.java | 18 | ||||
-rw-r--r-- | src/main/java/me/Danker/commands/DHelpCommand.java | 2 | ||||
-rw-r--r-- | src/main/java/me/Danker/commands/ToggleCommand.java | 16 | ||||
-rw-r--r-- | src/main/java/me/Danker/handlers/ConfigHandler.java | 2 |
4 files changed, 28 insertions, 10 deletions
diff --git a/src/main/java/me/Danker/TheMod.java b/src/main/java/me/Danker/TheMod.java index 41e92c1..bdc19d3 100644 --- a/src/main/java/me/Danker/TheMod.java +++ b/src/main/java/me/Danker/TheMod.java @@ -958,8 +958,13 @@ public class TheMod EnumChatFormatting.AQUA + timeBetween + "\n" + EnumChatFormatting.AQUA + bossesBetween; - new TextRenderer(Minecraft.getMinecraft(), dropsTextTwo, (int) (moc.displayXY[0] + (145 * ScaleCommand.displayScale)), moc.displayXY[1], ScaleCommand.displayScale); - new TextRenderer(Minecraft.getMinecraft(), countTextTwo, (int) (moc.displayXY[0] + (255 * ScaleCommand.displayScale)), moc.displayXY[1], ScaleCommand.displayScale); + if (tc.splitFishing) { + new TextRenderer(Minecraft.getMinecraft(), dropsTextTwo, (int) (moc.displayXY[0] + (145 * ScaleCommand.displayScale)), moc.displayXY[1], ScaleCommand.displayScale); + new TextRenderer(Minecraft.getMinecraft(), countTextTwo, (int) (moc.displayXY[0] + (255 * ScaleCommand.displayScale)), moc.displayXY[1], ScaleCommand.displayScale); + } else { + dropsText += "\n" + dropsTextTwo; + countText += "\n" + countTextTwo; + } } else if (ds.display.equals("fishing_session")) { if (lc.empTimeSession == -1) { timeBetween = "Never"; @@ -1014,8 +1019,13 @@ public class TheMod EnumChatFormatting.AQUA + timeBetween + "\n" + EnumChatFormatting.AQUA + bossesBetween; - new TextRenderer(Minecraft.getMinecraft(), dropsTextTwo, (int) (moc.displayXY[0] + (145 * ScaleCommand.displayScale)), moc.displayXY[1], ScaleCommand.displayScale); - new TextRenderer(Minecraft.getMinecraft(), countTextTwo, (int) (moc.displayXY[0] + (255 * ScaleCommand.displayScale)), moc.displayXY[1], ScaleCommand.displayScale); + if (tc.splitFishing) { + new TextRenderer(Minecraft.getMinecraft(), dropsTextTwo, (int) (moc.displayXY[0] + (145 * ScaleCommand.displayScale)), moc.displayXY[1], ScaleCommand.displayScale); + new TextRenderer(Minecraft.getMinecraft(), countTextTwo, (int) (moc.displayXY[0] + (255 * ScaleCommand.displayScale)), moc.displayXY[1], ScaleCommand.displayScale); + } else { + dropsText += "\n" + dropsTextTwo; + countText += "\n" + countTextTwo; + } } else if (ds.display.equals("fishing_winter")) { dropsText = EnumChatFormatting.AQUA + "Creatures Caught:\n" + EnumChatFormatting.AQUA + "Fishing Milestone:\n" + diff --git a/src/main/java/me/Danker/commands/DHelpCommand.java b/src/main/java/me/Danker/commands/DHelpCommand.java index 9ca6a6e..fac8202 100644 --- a/src/main/java/me/Danker/commands/DHelpCommand.java +++ b/src/main/java/me/Danker/commands/DHelpCommand.java @@ -32,7 +32,7 @@ public class DHelpCommand extends CommandBase { player.addChatMessage(new ChatComponentText("\n" + EnumChatFormatting.GOLD + " " + TheMod.MODID + " Version " + TheMod.VERSION + "\n" + EnumChatFormatting.AQUA + " <> = Mandatory parameter. [] = Optional parameter.\n" + EnumChatFormatting.GOLD + " /dhelp" + EnumChatFormatting.AQUA + " - Returns this message.\n" + - EnumChatFormatting.GOLD + " /toggle <gparty/coords/golden/slayercount/list>" + EnumChatFormatting.AQUA + " - Toggles features. /toggle list returns values of every toggle.\n" + + EnumChatFormatting.GOLD + " /toggle <gparty/coords/golden/slayercount/rngesusalerts/splitfishing/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.\n" + EnumChatFormatting.GOLD + " /loot <zombie/spider/wolf/fishing> [winter/session]" + EnumChatFormatting.AQUA + " - Returns loot received from slayer quests or fishing stats. /loot fishing winter returns winter sea creatures instead.\n" + diff --git a/src/main/java/me/Danker/commands/ToggleCommand.java b/src/main/java/me/Danker/commands/ToggleCommand.java index 8550a8c..8870e9b 100644 --- a/src/main/java/me/Danker/commands/ToggleCommand.java +++ b/src/main/java/me/Danker/commands/ToggleCommand.java @@ -18,6 +18,7 @@ public class ToggleCommand extends CommandBase implements ICommand { public static boolean goldenToggled; public static boolean slayerCountTotal; public static boolean rngesusAlerts; + public static boolean splitFishing; @Override public String getCommandName() { @@ -26,7 +27,7 @@ public class ToggleCommand extends CommandBase implements ICommand { @Override public String getCommandUsage(ICommandSender arg0) { - return getCommandName() + " <gparty/coords/golden/slayercount/rngesusalerts/list>"; + return getCommandName() + " <gparty/coords/golden/slayercount/rngesusalerts/splitfishing/list>"; } @Override @@ -37,7 +38,7 @@ public class ToggleCommand extends CommandBase implements ICommand { @Override public List<String> addTabCompletionOptions(ICommandSender sender, String[] args, BlockPos pos) { if (args.length == 1) { - return getListOfStringsMatchingLastWord(args, "gparty", "coords", "golden", "slayercount", "rngesusalerts", "list"); + return getListOfStringsMatchingLastWord(args, "gparty", "coords", "golden", "slayercount", "rngesusalerts", "splitfishing", "list"); } return null; } @@ -48,7 +49,7 @@ public class ToggleCommand extends CommandBase implements ICommand { final ConfigHandler cf = new ConfigHandler(); if (arg1.length == 0) { - player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Usage: /toggle <gparty/coords/golden/slayercount/rngesusalerts/list>")); + player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Usage: /toggle <gparty/coords/golden/slayercount/rngesusalerts/splitfishing/list>")); return; } @@ -72,14 +73,19 @@ public class ToggleCommand extends CommandBase implements ICommand { rngesusAlerts = !rngesusAlerts; cf.writeBooleanConfig("toggles", "RNGesusAlerts", rngesusAlerts); player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Slayer RNGesus alerts has been set to " + EnumChatFormatting.DARK_GREEN + rngesusAlerts + EnumChatFormatting.GREEN + ".")); + } else if (arg1[0].equalsIgnoreCase("splitfishing")) { + splitFishing = !splitFishing; + cf.writeBooleanConfig("toggles", "SplitFishing", splitFishing); + player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Split fishing display has been set to " + EnumChatFormatting.DARK_GREEN + splitFishing + EnumChatFormatting.GREEN + ".")); } 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)); + EnumChatFormatting.GREEN + " Slayer RNGesus alerts: " + EnumChatFormatting.DARK_GREEN + rngesusAlerts + "\n" + + EnumChatFormatting.GREEN + " Split fishing display: " + EnumChatFormatting.DARK_GREEN + splitFishing)); } else { - player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Usage: /toggle <gparty/coords/golden/slayercount/rngesusalerts/list>")); + player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Usage: /toggle <gparty/coords/golden/slayercount/rngesusalerts/splitfishing/list>")); } } } diff --git a/src/main/java/me/Danker/handlers/ConfigHandler.java b/src/main/java/me/Danker/handlers/ConfigHandler.java index 4fc4be5..d393740 100644 --- a/src/main/java/me/Danker/handlers/ConfigHandler.java +++ b/src/main/java/me/Danker/handlers/ConfigHandler.java @@ -174,6 +174,7 @@ public class ConfigHandler { if (!hasKey("toggles", "Golden")) writeBooleanConfig("toggles", "Golden", false); if (!hasKey("toggles", "SlayerCount")) writeBooleanConfig("toggles", "SlayerCount", true); if (!hasKey("toggles", "RNGesusAlerts")) writeBooleanConfig("toggles", "RNGesusAlerts", true); + if (!hasKey("toggles", "SplitFishing")) writeBooleanConfig("toggles", "SplitFishing", true); if (!hasKey("api", "APIKey")) writeStringConfig("api", "APIKey", ""); // Wolf Loot @@ -261,6 +262,7 @@ public class ConfigHandler { tf.goldenToggled = getBoolean("toggles", "Golden"); tf.slayerCountTotal = getBoolean("toggles", "SlayerCount"); tf.rngesusAlerts = getBoolean("toggles", "RNGesusAlerts"); + tf.splitFishing = getBoolean("toggles", "SplitFishing"); final LootCommand lc = new LootCommand(); // Wolf |