aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/thatgravyboat/skyblockhud/tracker/TrackerHandler.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/thatgravyboat/skyblockhud/tracker/TrackerHandler.java')
-rw-r--r--src/main/java/com/thatgravyboat/skyblockhud/tracker/TrackerHandler.java74
1 files changed, 36 insertions, 38 deletions
diff --git a/src/main/java/com/thatgravyboat/skyblockhud/tracker/TrackerHandler.java b/src/main/java/com/thatgravyboat/skyblockhud/tracker/TrackerHandler.java
index f8eaba306..da625a0a5 100644
--- a/src/main/java/com/thatgravyboat/skyblockhud/tracker/TrackerHandler.java
+++ b/src/main/java/com/thatgravyboat/skyblockhud/tracker/TrackerHandler.java
@@ -2,20 +2,18 @@ package com.thatgravyboat.skyblockhud.tracker;
import com.thatgravyboat.skyblockhud.SkyblockHud;
import com.thatgravyboat.skyblockhud.api.events.SkyBlockEntityKilled;
-import com.thatgravyboat.skyblockhud.core.config.Position;
import com.thatgravyboat.skyblockhud.location.LocationHandler;
import com.thatgravyboat.skyblockhud.location.Locations;
-import com.thatgravyboat.skyblockhud.utils.Utils;
-import java.util.*;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.Gui;
-import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.client.renderer.RenderHelper;
import net.minecraft.client.renderer.entity.RenderItem;
import net.minecraft.item.ItemStack;
import net.minecraftforge.client.event.RenderGameOverlayEvent;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
+import java.util.*;
+
public class TrackerHandler extends Gui {
public static Set<TrackerObject> trackerObjects = new HashSet<>();
@@ -73,39 +71,39 @@ public class TrackerHandler extends Gui {
@SubscribeEvent
public void renderOverlay(RenderGameOverlayEvent.Post event) {
- if (Utils.overlayShouldRender(event.type, SkyblockHud.hasSkyblockScoreboard(), trackers.containsKey(LocationHandler.getCurrentLocation()), !SkyblockHud.config.trackers.hideTracker)) {
- Map<String, TrackerObject> tracker = trackers.get(LocationHandler.getCurrentLocation());
- Minecraft mc = Minecraft.getMinecraft();
-
- if (tracker != null) {
- Position pos = SkyblockHud.config.trackers.trackerPosition;
- int startPos = pos.getAbsX(event.resolution, (tracker.size() >= 6 ? 130 : tracker.size() * 20));
- int y = pos.getAbsY(event.resolution, (int) (10 + Math.ceil(tracker.size() / 5d) * 20));
-
- Gui.drawRect(startPos, y, startPos + 130, y + 10, -1072689136);
- mc.fontRendererObj.drawString("Tracker", startPos + 4, y + 1, 0xffffff, false);
- y += 10;
- Gui.drawRect(startPos, y, startPos + (tracker.size() >= 6 ? 130 : (tracker.size() * 20) + 10), (int) (y + (Math.ceil(tracker.size() / 5d) * 20)), 1610612736);
- int x = startPos + 5;
- for (TrackerObject object : tracker.values()) {
- String s = Utils.formattedNumber(object.getCount(), 1000);
- GlStateManager.disableLighting();
- GlStateManager.enableDepth();
- drawItemStack(object.getDisplayStack(), x, y);
- GlStateManager.disableDepth();
- GlStateManager.disableBlend();
- mc.fontRendererObj.drawStringWithShadow(s, (float) (x + 19 - 2 - mc.fontRendererObj.getStringWidth(s)), (float) (y + 9), object.getCount() < 1 ? 16733525 : 16777215);
- GlStateManager.enableBlend();
- GlStateManager.enableDepth();
-
- if ((x - startPos + 5) / 20 == 5) {
- x = startPos + 5;
- y += 20;
- } else {
- x += 20;
- }
- }
- }
- }
+// if (Utils.overlayShouldRender(event.type, SkyblockHud.hasSkyblockScoreboard(), trackers.containsKey(LocationHandler.getCurrentLocation()), !SkyblockHud.config.trackers.hideTracker)) {
+// Map<String, TrackerObject> tracker = trackers.get(LocationHandler.getCurrentLocation());
+// Minecraft mc = Minecraft.getMinecraft();
+//
+// if (tracker != null) {
+// Position pos = SkyblockHud.config.trackers.trackerPosition;
+// int startPos = pos.getAbsX(event.resolution, (tracker.size() >= 6 ? 130 : tracker.size() * 20));
+// int y = pos.getAbsY(event.resolution, (int) (10 + Math.ceil(tracker.size() / 5d) * 20));
+//
+// Gui.drawRect(startPos, y, startPos + 130, y + 10, -1072689136);
+// mc.fontRendererObj.drawString("Tracker", startPos + 4, y + 1, 0xffffff, false);
+// y += 10;
+// Gui.drawRect(startPos, y, startPos + (tracker.size() >= 6 ? 130 : (tracker.size() * 20) + 10), (int) (y + (Math.ceil(tracker.size() / 5d) * 20)), 1610612736);
+// int x = startPos + 5;
+// for (TrackerObject object : tracker.values()) {
+// String s = Utils.formattedNumber(object.getCount(), 1000);
+// GlStateManager.disableLighting();
+// GlStateManager.enableDepth();
+// drawItemStack(object.getDisplayStack(), x, y);
+// GlStateManager.disableDepth();
+// GlStateManager.disableBlend();
+// mc.fontRendererObj.drawStringWithShadow(s, (float) (x + 19 - 2 - mc.fontRendererObj.getStringWidth(s)), (float) (y + 9), object.getCount() < 1 ? 16733525 : 16777215);
+// GlStateManager.enableBlend();
+// GlStateManager.enableDepth();
+//
+// if ((x - startPos + 5) / 20 == 5) {
+// x = startPos + 5;
+// y += 20;
+// } else {
+// x += 20;
+// }
+// }
+// }
+// }
}
}