aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java')
-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/ToggleCommand.java11
-rw-r--r--src/main/java/me/Danker/features/HidePetCandy.java26
-rw-r--r--src/main/java/me/Danker/gui/DankerGui.java7
-rw-r--r--src/main/java/me/Danker/handlers/ConfigHandler.java1
6 files changed, 45 insertions, 2 deletions
diff --git a/src/main/java/me/Danker/DankersSkyblockMod.java b/src/main/java/me/Danker/DankersSkyblockMod.java
index bf71dda..b3701cb 100644
--- a/src/main/java/me/Danker/DankersSkyblockMod.java
+++ b/src/main/java/me/Danker/DankersSkyblockMod.java
@@ -105,6 +105,7 @@ public class DankersSkyblockMod {
MinecraftForge.EVENT_BUS.register(new GoldenEnchants());
MinecraftForge.EVENT_BUS.register(new GolemSpawningAlert());
MinecraftForge.EVENT_BUS.register(new GpartyNotifications());
+ MinecraftForge.EVENT_BUS.register(new HidePetCandy());
MinecraftForge.EVENT_BUS.register(new HideTooltipsInExperiments());
MinecraftForge.EVENT_BUS.register(new HighlightSkeletonMasters());
MinecraftForge.EVENT_BUS.register(new IceWalkSolver());
diff --git a/src/main/java/me/Danker/commands/DankerGuiCommand.java b/src/main/java/me/Danker/commands/DankerGuiCommand.java
index 2cc706e..6f548fa 100644
--- a/src/main/java/me/Danker/commands/DankerGuiCommand.java
+++ b/src/main/java/me/Danker/commands/DankerGuiCommand.java
@@ -94,6 +94,7 @@ public class DankerGuiCommand extends CommandBase {
debug.append("[highlightskeletonmasters][").append(ToggleCommand.highlightSkeletonMasters).append("]\n");
debug.append("[teammatesinradius][").append(ToggleCommand.teammatesInRadius).append("]\n");
debug.append("[gianthp][").append(ToggleCommand.giantHP).append("]\n");
+ debug.append("[hidepetcandy][").append(ToggleCommand.hidePetCandy).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/ToggleCommand.java b/src/main/java/me/Danker/commands/ToggleCommand.java
index a9fe663..27167b6 100644
--- a/src/main/java/me/Danker/commands/ToggleCommand.java
+++ b/src/main/java/me/Danker/commands/ToggleCommand.java
@@ -36,6 +36,7 @@ public class ToggleCommand extends CommandBase implements ICommand {
public static boolean highlightSkeletonMasters;
public static boolean teammatesInRadius;
public static boolean giantHP;
+ public static boolean hidePetCandy;
// Chat Messages
public static boolean sceptreMessages;
public static boolean midasStaffMessages;
@@ -96,7 +97,7 @@ public class ToggleCommand extends CommandBase implements ICommand {
"startswithterminal/selectallterminal/clickinorderterminal/" +
"ultrasequencer/chronomatron/superpairs/hidetooltipsinaddons/pickblock/" +
"melodytooltips/highlightslayers/highlightarachne/highlightskeletonmasters/teammatesinradius/" +
- "gianthp/dungeonbossmusic/bloodroommusic/dungeonmusic/list>";
+ "gianthp/hidepetcandy/dungeonbossmusic/bloodroommusic/dungeonmusic/list>";
}
public static String usage(ICommandSender arg0) {
@@ -125,7 +126,7 @@ public class ToggleCommand extends CommandBase implements ICommand {
"ultrasequencer", "chronomatron", "superpairs",
"hidetooltipsinaddons", "pickblock", "melodytooltips", "highlightslayers",
"highlightskeletonmasters", "dungeonbossmusic", "bloodroommusic", "dungeonmusic",
- "teammatesinradius", "gianthp", "list");
+ "teammatesinradius", "gianthp", "hidepetcandy", "list");
}
return null;
}
@@ -416,6 +417,11 @@ public class ToggleCommand extends CommandBase implements ICommand {
ConfigHandler.writeBooleanConfig("toggles", "GiantHP", giantHP);
player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Giant HP display has been set to " + DankersSkyblockMod.SECONDARY_COLOUR + giantHP + DankersSkyblockMod.MAIN_COLOUR + "."));
break;
+ case "hidepetcandy":
+ hidePetCandy = !hidePetCandy;
+ ConfigHandler.writeBooleanConfig("toggles", "HidePetCandy", hidePetCandy);
+ player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Hide pet candy has been set to " + DankersSkyblockMod.SECONDARY_COLOUR + hidePetCandy + DankersSkyblockMod.MAIN_COLOUR + "."));
+ break;
case "dungeonbossmusic":
dungeonBossMusic = !dungeonBossMusic;
CustomMusic.dungeonboss.stop();
@@ -482,6 +488,7 @@ public class ToggleCommand extends CommandBase implements ICommand {
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 + " Giant HP display: " + DankersSkyblockMod.VALUE_COLOUR + giantHP + "\n" +
+ DankersSkyblockMod.TYPE_COLOUR + " Hide pet candy: " + DankersSkyblockMod.VALUE_COLOUR + hidePetCandy + "\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/HidePetCandy.java b/src/main/java/me/Danker/features/HidePetCandy.java
new file mode 100644
index 0000000..8ef28d2
--- /dev/null
+++ b/src/main/java/me/Danker/features/HidePetCandy.java
@@ -0,0 +1,26 @@
+package me.Danker.features;
+
+import me.Danker.commands.ToggleCommand;
+import me.Danker.utils.Utils;
+import net.minecraftforge.event.entity.player.ItemTooltipEvent;
+import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
+
+public class HidePetCandy {
+
+ @SubscribeEvent
+ public void onTooltip(ItemTooltipEvent event) {
+ if (!Utils.inSkyblock) return;
+ if (event.toolTip == null) return;
+
+ if (ToggleCommand.hidePetCandy) {
+ for (int i = 0; i < event.toolTip.size(); i++) {
+ if (event.toolTip.get(i).endsWith("Pet Candy Used")) {
+ event.toolTip.remove(i);
+ event.toolTip.remove(i);
+ break;
+ }
+ }
+ }
+ }
+
+}
diff --git a/src/main/java/me/Danker/gui/DankerGui.java b/src/main/java/me/Danker/gui/DankerGui.java
index cc33514..16e0640 100644
--- a/src/main/java/me/Danker/gui/DankerGui.java
+++ b/src/main/java/me/Danker/gui/DankerGui.java
@@ -65,6 +65,7 @@ public class DankerGui extends GuiScreen {
private GuiButton highlightSkeletonMasters;
private GuiButton teammatesInRadius;
private GuiButton giantHP;
+ private GuiButton hidePetCandy;
// Chat Messages
private GuiButton sceptreMessages;
private GuiButton midasStaffMessages;
@@ -151,6 +152,7 @@ public class DankerGui extends GuiScreen {
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.");
giantHP = new FeatureButton("Display Giant HP: " + Utils.getColouredBoolean(ToggleCommand.giantHP), "Displays health of Sadan's giants during F6 bossfight and F7 blood room.");
+ hidePetCandy = new FeatureButton("Hide Pet Candy: " + Utils.getColouredBoolean(ToggleCommand.hidePetCandy), "Hide pet candy in pet tooltips.");
allButtons.clear();
allButtons.add(changeDisplay);
@@ -195,6 +197,7 @@ public class DankerGui extends GuiScreen {
allButtons.add(highlightSkeletonMasters);
allButtons.add(teammatesInRadius);
allButtons.add(giantHP);
+ allButtons.add(hidePetCandy);
search.setText(initSearchText);
search.setVisible(true);
@@ -433,6 +436,10 @@ public class DankerGui extends GuiScreen {
ToggleCommand.giantHP = !ToggleCommand.giantHP;
ConfigHandler.writeBooleanConfig("toggles", "GiantHP", ToggleCommand.giantHP);
giantHP.displayString = "Display Giant HP: " + Utils.getColouredBoolean(ToggleCommand.giantHP);
+ } else if (button == hidePetCandy) {
+ ToggleCommand.hidePetCandy = !ToggleCommand.hidePetCandy;
+ ConfigHandler.writeBooleanConfig("toggles", "HidePetCandy", ToggleCommand.hidePetCandy);
+ hidePetCandy.displayString = "Hide Pet Candy: " + Utils.getColouredBoolean(ToggleCommand.hidePetCandy);
}
}
diff --git a/src/main/java/me/Danker/handlers/ConfigHandler.java b/src/main/java/me/Danker/handlers/ConfigHandler.java
index 810def2..db33cb2 100644
--- a/src/main/java/me/Danker/handlers/ConfigHandler.java
+++ b/src/main/java/me/Danker/handlers/ConfigHandler.java
@@ -213,6 +213,7 @@ public class ConfigHandler {
ToggleCommand.highlightSkeletonMasters = initBoolean("toggles", "HighlightSkeletonMasters", false);
ToggleCommand.teammatesInRadius = initBoolean("toggles", "TeammatesInRadius", false);
ToggleCommand.giantHP = initBoolean("toggles", "GiantHP", false);
+ ToggleCommand.hidePetCandy = initBoolean("toggles", "HidePetCandy", false);
// Chat Messages
ToggleCommand.sceptreMessages = initBoolean("toggles", "SceptreMessages", true);
ToggleCommand.midasStaffMessages = initBoolean("toggles", "MidasStaffMessages", true);