aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/me/Danker/features/loot
diff options
context:
space:
mode:
authorbowser0000 <bowser0000@gmail.com>2022-08-06 22:08:32 -0400
committerbowser0000 <bowser0000@gmail.com>2022-08-06 22:08:32 -0400
commit66fa83a1942b4ec79c5fa94168c04b84c60c628a (patch)
treec2abdaa3f1f249df2b94935639b0f24f8e04600c /src/main/java/me/Danker/features/loot
parentabd656382da708b8cd77df1f4f0a74f2287618c5 (diff)
downloadSkyblockMod-66fa83a1942b4ec79c5fa94168c04b84c60c628a.tar.gz
SkyblockMod-66fa83a1942b4ec79c5fa94168c04b84c60c628a.tar.bz2
SkyblockMod-66fa83a1942b4ec79c5fa94168c04b84c60c628a.zip
Add trophy fish completion to display
Diffstat (limited to 'src/main/java/me/Danker/features/loot')
-rw-r--r--src/main/java/me/Danker/features/loot/LootDisplay.java46
-rw-r--r--src/main/java/me/Danker/features/loot/TrophyFishTracker.java23
2 files changed, 67 insertions, 2 deletions
diff --git a/src/main/java/me/Danker/features/loot/LootDisplay.java b/src/main/java/me/Danker/features/loot/LootDisplay.java
index 556108c..fe68c3e 100644
--- a/src/main/java/me/Danker/features/loot/LootDisplay.java
+++ b/src/main/java/me/Danker/features/loot/LootDisplay.java
@@ -965,7 +965,7 @@ public class LootDisplay {
EnumChatFormatting.DARK_PURPLE + "Soul Fish:\n" +
EnumChatFormatting.DARK_PURPLE + "Karate Fish:\n" +
EnumChatFormatting.GOLD + "Golden Fish:";
- countText = EnumChatFormatting.WHITE + TrophyFishTracker.getTierCount(TrophyFishTracker.fish, "Sulpher Skitter") + "\n" +
+ if (!ToggleCommand.showTrophyCompletion) countText = EnumChatFormatting.WHITE + TrophyFishTracker.getTierCount(TrophyFishTracker.fish, "Sulpher Skitter") + "\n" +
EnumChatFormatting.WHITE + TrophyFishTracker.getTierCount(TrophyFishTracker.fish, "Obfuscated 1") + "\n" +
EnumChatFormatting.WHITE + TrophyFishTracker.getTierCount(TrophyFishTracker.fish, "Steaming-Hot Flounder") + "\n" +
EnumChatFormatting.WHITE + TrophyFishTracker.getTierCount(TrophyFishTracker.fish, "Gusher") + "\n" +
@@ -983,6 +983,27 @@ public class LootDisplay {
EnumChatFormatting.DARK_PURPLE + TrophyFishTracker.getTierCount(TrophyFishTracker.fish, "Soul Fish") + "\n" +
EnumChatFormatting.DARK_PURPLE + TrophyFishTracker.getTierCount(TrophyFishTracker.fish, "Karate Fish") + "\n" +
EnumChatFormatting.GOLD + TrophyFishTracker.getTierCount(TrophyFishTracker.fish, "Golden Fish");
+
+ if (ToggleCommand.showTrophyCompletion) {
+ TrophyFishTracker.drawCompletion(TrophyFishTracker.fish, "Sulpher Skitter", (int) (MoveCommand.displayXY[0] + (110 * ScaleCommand.displayScale)), MoveCommand.displayXY[1], ScaleCommand.displayScale);
+ TrophyFishTracker.drawCompletion(TrophyFishTracker.fish, "Obfuscated 1", (int) (MoveCommand.displayXY[0] + (110 * ScaleCommand.displayScale)), (int) (MoveCommand.displayXY[1] + (mc.fontRendererObj.FONT_HEIGHT * ScaleCommand.displayScale)), ScaleCommand.displayScale);
+ TrophyFishTracker.drawCompletion(TrophyFishTracker.fish, "Steaming-Hot Flounder", (int) (MoveCommand.displayXY[0] + (110 * ScaleCommand.displayScale)), (int) (MoveCommand.displayXY[1] + (2 * mc.fontRendererObj.FONT_HEIGHT * ScaleCommand.displayScale)), ScaleCommand.displayScale);
+ TrophyFishTracker.drawCompletion(TrophyFishTracker.fish, "Gusher", (int) (MoveCommand.displayXY[0] + (110 * ScaleCommand.displayScale)), (int) (MoveCommand.displayXY[1] + (3 * mc.fontRendererObj.FONT_HEIGHT * ScaleCommand.displayScale)), ScaleCommand.displayScale);
+ TrophyFishTracker.drawCompletion(TrophyFishTracker.fish, "Blobfish", (int) (MoveCommand.displayXY[0] + (110 * ScaleCommand.displayScale)), (int) (MoveCommand.displayXY[1] + (4 * mc.fontRendererObj.FONT_HEIGHT * ScaleCommand.displayScale)), ScaleCommand.displayScale);
+ TrophyFishTracker.drawCompletion(TrophyFishTracker.fish, "Obfuscated 2", (int) (MoveCommand.displayXY[0] + (110 * ScaleCommand.displayScale)), (int) (MoveCommand.displayXY[1] + (5 * mc.fontRendererObj.FONT_HEIGHT * ScaleCommand.displayScale)), ScaleCommand.displayScale);
+ TrophyFishTracker.drawCompletion(TrophyFishTracker.fish, "Slugfish", (int) (MoveCommand.displayXY[0] + (110 * ScaleCommand.displayScale)), (int) (MoveCommand.displayXY[1] + (6 * mc.fontRendererObj.FONT_HEIGHT * ScaleCommand.displayScale)), ScaleCommand.displayScale);
+ TrophyFishTracker.drawCompletion(TrophyFishTracker.fish, "Flyfish", (int) (MoveCommand.displayXY[0] + (110 * ScaleCommand.displayScale)), (int) (MoveCommand.displayXY[1] + (7 * mc.fontRendererObj.FONT_HEIGHT * ScaleCommand.displayScale)), ScaleCommand.displayScale);
+ TrophyFishTracker.drawCompletion(TrophyFishTracker.fish, "Obfuscated 3", (int) (MoveCommand.displayXY[0] + (110 * ScaleCommand.displayScale)), (int) (MoveCommand.displayXY[1] + (8 * mc.fontRendererObj.FONT_HEIGHT * ScaleCommand.displayScale)), ScaleCommand.displayScale);
+ TrophyFishTracker.drawCompletion(TrophyFishTracker.fish, "Lavahorse", (int) (MoveCommand.displayXY[0] + (110 * ScaleCommand.displayScale)), (int) (MoveCommand.displayXY[1] + (9 * mc.fontRendererObj.FONT_HEIGHT * ScaleCommand.displayScale)), ScaleCommand.displayScale);
+ TrophyFishTracker.drawCompletion(TrophyFishTracker.fish, "Mana Ray", (int) (MoveCommand.displayXY[0] + (110 * ScaleCommand.displayScale)), (int) (MoveCommand.displayXY[1] + (10 * mc.fontRendererObj.FONT_HEIGHT * ScaleCommand.displayScale)), ScaleCommand.displayScale);
+ TrophyFishTracker.drawCompletion(TrophyFishTracker.fish, "Volcanic Stonefish", (int) (MoveCommand.displayXY[0] + (110 * ScaleCommand.displayScale)), (int) (MoveCommand.displayXY[1] + (11 * mc.fontRendererObj.FONT_HEIGHT * ScaleCommand.displayScale)), ScaleCommand.displayScale);
+ TrophyFishTracker.drawCompletion(TrophyFishTracker.fish, "Vanille", (int) (MoveCommand.displayXY[0] + (110 * ScaleCommand.displayScale)), (int) (MoveCommand.displayXY[1] + (12 * mc.fontRendererObj.FONT_HEIGHT * ScaleCommand.displayScale)), ScaleCommand.displayScale);
+ TrophyFishTracker.drawCompletion(TrophyFishTracker.fish, "Skeleton Fish", (int) (MoveCommand.displayXY[0] + (110 * ScaleCommand.displayScale)), (int) (MoveCommand.displayXY[1] + (13 * mc.fontRendererObj.FONT_HEIGHT * ScaleCommand.displayScale)), ScaleCommand.displayScale);
+ TrophyFishTracker.drawCompletion(TrophyFishTracker.fish, "Moldfin", (int) (MoveCommand.displayXY[0] + (110 * ScaleCommand.displayScale)), (int) (MoveCommand.displayXY[1] + (14 * mc.fontRendererObj.FONT_HEIGHT * ScaleCommand.displayScale)), ScaleCommand.displayScale);
+ TrophyFishTracker.drawCompletion(TrophyFishTracker.fish, "Soul Fish", (int) (MoveCommand.displayXY[0] + (110 * ScaleCommand.displayScale)), (int) (MoveCommand.displayXY[1] + (15 * mc.fontRendererObj.FONT_HEIGHT * ScaleCommand.displayScale)), ScaleCommand.displayScale);
+ TrophyFishTracker.drawCompletion(TrophyFishTracker.fish, "Karate Fish", (int) (MoveCommand.displayXY[0] + (110 * ScaleCommand.displayScale)), (int) (MoveCommand.displayXY[1] + (16 * mc.fontRendererObj.FONT_HEIGHT * ScaleCommand.displayScale)), ScaleCommand.displayScale);
+ TrophyFishTracker.drawCompletion(TrophyFishTracker.fish, "Golden Fish", (int) (MoveCommand.displayXY[0] + (110 * ScaleCommand.displayScale)), (int) (MoveCommand.displayXY[1] + (17 * mc.fontRendererObj.FONT_HEIGHT * ScaleCommand.displayScale)), ScaleCommand.displayScale);
+ }
break;
case "fishing_trophy_session":
dropsText = EnumChatFormatting.WHITE + "Sulpher Skitter:\n" +
@@ -1003,7 +1024,7 @@ public class LootDisplay {
EnumChatFormatting.DARK_PURPLE + "Soul Fish:\n" +
EnumChatFormatting.DARK_PURPLE + "Karate Fish:\n" +
EnumChatFormatting.GOLD + "Golden Fish:";
- countText = EnumChatFormatting.WHITE + TrophyFishTracker.getTierCount(TrophyFishTracker.fishSession, "Sulpher Skitter") + "\n" +
+ if (!ToggleCommand.showTrophyCompletion) countText = EnumChatFormatting.WHITE + TrophyFishTracker.getTierCount(TrophyFishTracker.fishSession, "Sulpher Skitter") + "\n" +
EnumChatFormatting.WHITE + TrophyFishTracker.getTierCount(TrophyFishTracker.fishSession, "Obfuscated 1") + "\n" +
EnumChatFormatting.WHITE + TrophyFishTracker.getTierCount(TrophyFishTracker.fishSession, "Steaming-Hot Flounder") + "\n" +
EnumChatFormatting.WHITE + TrophyFishTracker.getTierCount(TrophyFishTracker.fishSession, "Gusher") + "\n" +
@@ -1021,6 +1042,27 @@ public class LootDisplay {
EnumChatFormatting.DARK_PURPLE + TrophyFishTracker.getTierCount(TrophyFishTracker.fishSession, "Soul Fish") + "\n" +
EnumChatFormatting.DARK_PURPLE + TrophyFishTracker.getTierCount(TrophyFishTracker.fishSession, "Karate Fish") + "\n" +
EnumChatFormatting.GOLD + TrophyFishTracker.getTierCount(TrophyFishTracker.fishSession, "Golden Fish");
+
+ if (ToggleCommand.showTrophyCompletion) {
+ TrophyFishTracker.drawCompletion(TrophyFishTracker.fishSession, "Sulpher Skitter", (int) (MoveCommand.displayXY[0] + (110 * ScaleCommand.displayScale)), MoveCommand.displayXY[1], ScaleCommand.displayScale);
+ TrophyFishTracker.drawCompletion(TrophyFishTracker.fishSession, "Obfuscated 1", (int) (MoveCommand.displayXY[0] + (110 * ScaleCommand.displayScale)), (int) (MoveCommand.displayXY[1] + (mc.fontRendererObj.FONT_HEIGHT * ScaleCommand.displayScale)), ScaleCommand.displayScale);
+ TrophyFishTracker.drawCompletion(TrophyFishTracker.fishSession, "Steaming-Hot Flounder", (int) (MoveCommand.displayXY[0] + (110 * ScaleCommand.displayScale)), (int) (MoveCommand.displayXY[1] + (2 * mc.fontRendererObj.FONT_HEIGHT * ScaleCommand.displayScale)), ScaleCommand.displayScale);
+ TrophyFishTracker.drawCompletion(TrophyFishTracker.fishSession, "Gusher", (int) (MoveCommand.displayXY[0] + (110 * ScaleCommand.displayScale)), (int) (MoveCommand.displayXY[1] + (3 * mc.fontRendererObj.FONT_HEIGHT * ScaleCommand.displayScale)), ScaleCommand.displayScale);
+ TrophyFishTracker.drawCompletion(TrophyFishTracker.fishSession, "Blobfish", (int) (MoveCommand.displayXY[0] + (110 * ScaleCommand.displayScale)), (int) (MoveCommand.displayXY[1] + (4 * mc.fontRendererObj.FONT_HEIGHT * ScaleCommand.displayScale)), ScaleCommand.displayScale);
+ TrophyFishTracker.drawCompletion(TrophyFishTracker.fishSession, "Obfuscated 2", (int) (MoveCommand.displayXY[0] + (110 * ScaleCommand.displayScale)), (int) (MoveCommand.displayXY[1] + (5 * mc.fontRendererObj.FONT_HEIGHT * ScaleCommand.displayScale)), ScaleCommand.displayScale);
+ TrophyFishTracker.drawCompletion(TrophyFishTracker.fishSession, "Slugfish", (int) (MoveCommand.displayXY[0] + (110 * ScaleCommand.displayScale)), (int) (MoveCommand.displayXY[1] + (6 * mc.fontRendererObj.FONT_HEIGHT * ScaleCommand.displayScale)), ScaleCommand.displayScale);
+ TrophyFishTracker.drawCompletion(TrophyFishTracker.fishSession, "Flyfish", (int) (MoveCommand.displayXY[0] + (110 * ScaleCommand.displayScale)), (int) (MoveCommand.displayXY[1] + (7 * mc.fontRendererObj.FONT_HEIGHT * ScaleCommand.displayScale)), ScaleCommand.displayScale);
+ TrophyFishTracker.drawCompletion(TrophyFishTracker.fishSession, "Obfuscated 3", (int) (MoveCommand.displayXY[0] + (110 * ScaleCommand.displayScale)), (int) (MoveCommand.displayXY[1] + (8 * mc.fontRendererObj.FONT_HEIGHT * ScaleCommand.displayScale)), ScaleCommand.displayScale);
+ TrophyFishTracker.drawCompletion(TrophyFishTracker.fishSession, "Lavahorse", (int) (MoveCommand.displayXY[0] + (110 * ScaleCommand.displayScale)), (int) (MoveCommand.displayXY[1] + (9 * mc.fontRendererObj.FONT_HEIGHT * ScaleCommand.displayScale)), ScaleCommand.displayScale);
+ TrophyFishTracker.drawCompletion(TrophyFishTracker.fishSession, "Mana Ray", (int) (MoveCommand.displayXY[0] + (110 * ScaleCommand.displayScale)), (int) (MoveCommand.displayXY[1] + (10 * mc.fontRendererObj.FONT_HEIGHT * ScaleCommand.displayScale)), ScaleCommand.displayScale);
+ TrophyFishTracker.drawCompletion(TrophyFishTracker.fishSession, "Volcanic Stonefish", (int) (MoveCommand.displayXY[0] + (110 * ScaleCommand.displayScale)), (int) (MoveCommand.displayXY[1] + (11 * mc.fontRendererObj.FONT_HEIGHT * ScaleCommand.displayScale)), ScaleCommand.displayScale);
+ TrophyFishTracker.drawCompletion(TrophyFishTracker.fishSession, "Vanille", (int) (MoveCommand.displayXY[0] + (110 * ScaleCommand.displayScale)), (int) (MoveCommand.displayXY[1] + (12 * mc.fontRendererObj.FONT_HEIGHT * ScaleCommand.displayScale)), ScaleCommand.displayScale);
+ TrophyFishTracker.drawCompletion(TrophyFishTracker.fishSession, "Skeleton Fish", (int) (MoveCommand.displayXY[0] + (110 * ScaleCommand.displayScale)), (int) (MoveCommand.displayXY[1] + (13 * mc.fontRendererObj.FONT_HEIGHT * ScaleCommand.displayScale)), ScaleCommand.displayScale);
+ TrophyFishTracker.drawCompletion(TrophyFishTracker.fishSession, "Moldfin", (int) (MoveCommand.displayXY[0] + (110 * ScaleCommand.displayScale)), (int) (MoveCommand.displayXY[1] + (14 * mc.fontRendererObj.FONT_HEIGHT * ScaleCommand.displayScale)), ScaleCommand.displayScale);
+ TrophyFishTracker.drawCompletion(TrophyFishTracker.fishSession, "Soul Fish", (int) (MoveCommand.displayXY[0] + (110 * ScaleCommand.displayScale)), (int) (MoveCommand.displayXY[1] + (15 * mc.fontRendererObj.FONT_HEIGHT * ScaleCommand.displayScale)), ScaleCommand.displayScale);
+ TrophyFishTracker.drawCompletion(TrophyFishTracker.fishSession, "Karate Fish", (int) (MoveCommand.displayXY[0] + (110 * ScaleCommand.displayScale)), (int) (MoveCommand.displayXY[1] + (16 * mc.fontRendererObj.FONT_HEIGHT * ScaleCommand.displayScale)), ScaleCommand.displayScale);
+ TrophyFishTracker.drawCompletion(TrophyFishTracker.fishSession, "Golden Fish", (int) (MoveCommand.displayXY[0] + (110 * ScaleCommand.displayScale)), (int) (MoveCommand.displayXY[1] + (17 * mc.fontRendererObj.FONT_HEIGHT * ScaleCommand.displayScale)), ScaleCommand.displayScale);
+ }
break;
case "mythological":
dropsText = EnumChatFormatting.GOLD + "Coins:\n" +
diff --git a/src/main/java/me/Danker/features/loot/TrophyFishTracker.java b/src/main/java/me/Danker/features/loot/TrophyFishTracker.java
index d11fcfe..6202871 100644
--- a/src/main/java/me/Danker/features/loot/TrophyFishTracker.java
+++ b/src/main/java/me/Danker/features/loot/TrophyFishTracker.java
@@ -3,7 +3,10 @@ package me.Danker.features.loot;
import com.google.gson.GsonBuilder;
import com.google.gson.JsonObject;
import me.Danker.events.ModInitEvent;
+import me.Danker.utils.RenderUtils;
import me.Danker.utils.Utils;
+import net.minecraft.init.Items;
+import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.StringUtils;
import net.minecraftforge.client.event.ClientChatReceivedEvent;
@@ -117,4 +120,24 @@ public class TrophyFishTracker {
type.get("DIAMOND").getAsInt();
}
+ public static void drawCompletion(JsonObject obj, String name, int x, int y, double scale) {
+ JsonObject type = obj.get(name).getAsJsonObject();
+
+ boolean bronze = type.get("BRONZE").getAsInt() > 0;
+ boolean silver = type.get("SILVER").getAsInt() > 0;
+ boolean gold = type.get("GOLD").getAsInt() > 0;
+ boolean diamond = type.get("DIAMOND").getAsInt() > 0;
+
+ ItemStack incomplete = new ItemStack(Items.dye, 1, 8);
+ ItemStack bronzeComplete = new ItemStack(Items.brick);
+ ItemStack silverComplete = new ItemStack(Items.iron_ingot);
+ ItemStack goldComplete = new ItemStack(Items.gold_ingot);
+ ItemStack diamondComplete = new ItemStack(Items.diamond);
+
+ RenderUtils.renderItem(bronze ? bronzeComplete : incomplete, x, y - 2, scale / 1.3D);
+ RenderUtils.renderItem(silver ? silverComplete : incomplete, x + 15, y - 2, scale / 1.3D);
+ RenderUtils.renderItem(gold ? goldComplete : incomplete, x + 30, y - 2, scale / 1.3D);
+ RenderUtils.renderItem(diamond ? diamondComplete : incomplete, x + 45, y - 2, scale / 1.3D);
+ }
+
}