aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/me/Danker/features/loot/TrophyFishTracker.java
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/TrophyFishTracker.java
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/TrophyFishTracker.java')
-rw-r--r--src/main/java/me/Danker/features/loot/TrophyFishTracker.java23
1 files changed, 23 insertions, 0 deletions
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);
+ }
+
}