diff options
author | hannibal00212 <hannibal00212@users.noreply.github.com> | 2022-07-08 10:07:34 +0000 |
---|---|---|
committer | GitHub Action <actions@github.com> | 2022-07-08 10:07:34 +0000 |
commit | 324f31cd1402ad8f7877bb9bba99036e4140bbdb (patch) | |
tree | 94beace22acbaaca08360122d79500dd3abed945 /src/main/java/com/thatgravyboat/skyblockhud/tracker/TrackerHandler.java | |
parent | c167f4e84e22da7b7c4405b5d59c817734654fc0 (diff) | |
download | skyhanni-324f31cd1402ad8f7877bb9bba99036e4140bbdb.tar.gz skyhanni-324f31cd1402ad8f7877bb9bba99036e4140bbdb.tar.bz2 skyhanni-324f31cd1402ad8f7877bb9bba99036e4140bbdb.zip |
Prettified Code!
Diffstat (limited to 'src/main/java/com/thatgravyboat/skyblockhud/tracker/TrackerHandler.java')
-rw-r--r-- | src/main/java/com/thatgravyboat/skyblockhud/tracker/TrackerHandler.java | 71 |
1 files changed, 35 insertions, 36 deletions
diff --git a/src/main/java/com/thatgravyboat/skyblockhud/tracker/TrackerHandler.java b/src/main/java/com/thatgravyboat/skyblockhud/tracker/TrackerHandler.java index da625a0a5..dc7ec1f63 100644 --- a/src/main/java/com/thatgravyboat/skyblockhud/tracker/TrackerHandler.java +++ b/src/main/java/com/thatgravyboat/skyblockhud/tracker/TrackerHandler.java @@ -4,6 +4,7 @@ import com.thatgravyboat.skyblockhud.SkyblockHud; import com.thatgravyboat.skyblockhud.api.events.SkyBlockEntityKilled; import com.thatgravyboat.skyblockhud.location.LocationHandler; import com.thatgravyboat.skyblockhud.location.Locations; +import java.util.*; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.Gui; import net.minecraft.client.renderer.RenderHelper; @@ -12,8 +13,6 @@ 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<>(); @@ -71,39 +70,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; + // } + // } + // } + // } } } |