diff options
author | bowser0000 <bowser0000@gmail.com> | 2022-08-09 20:33:04 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-09 20:33:04 -0400 |
commit | 0345c0ce9594d76a9ac1601bd039b1b64a6a38dc (patch) | |
tree | 7f762c94a742a07e5c3939e70d35cf7128071b32 /src/main/java/me/Danker/utils | |
parent | f56302bee3939677fc3fd015a97b12b5100c45b1 (diff) | |
parent | 4d2a84d9fd2f522b2ade9954f8d40f6d80e2b12b (diff) | |
download | SkyblockMod-0345c0ce9594d76a9ac1601bd039b1b64a6a38dc.tar.gz SkyblockMod-0345c0ce9594d76a9ac1601bd039b1b64a6a38dc.tar.bz2 SkyblockMod-0345c0ce9594d76a9ac1601bd039b1b64a6a38dc.zip |
Merge pull request #90 from CuzImClicks/development
Highlight completed Commissions
Fast warp commands
Fix kill combo hider
Diffstat (limited to 'src/main/java/me/Danker/utils')
-rw-r--r-- | src/main/java/me/Danker/utils/Utils.java | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/main/java/me/Danker/utils/Utils.java b/src/main/java/me/Danker/utils/Utils.java index 8791a43..deb5018 100644 --- a/src/main/java/me/Danker/utils/Utils.java +++ b/src/main/java/me/Danker/utils/Utils.java @@ -10,6 +10,8 @@ import me.Danker.handlers.ConfigHandler; import me.Danker.handlers.ScoreboardHandler; import net.minecraft.block.Block; import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.Gui; +import net.minecraft.client.gui.ScaledResolution; import net.minecraft.client.network.NetworkPlayerInfo; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.item.EntityItemFrame; @@ -20,6 +22,7 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; import net.minecraft.scoreboard.ScoreObjective; import net.minecraft.util.*; +import org.lwjgl.opengl.GL11; import java.awt.*; import java.util.List; @@ -506,6 +509,19 @@ public class Utils { return (Math.floor(level / 2D) + 25) / 100D; } + public static void drawOnSlot(int size, int xSlotPos, int ySlotPos, int colour) { + ScaledResolution sr = new ScaledResolution(Minecraft.getMinecraft()); + int guiLeft = (sr.getScaledWidth() - 176) / 2; + int guiTop = (sr.getScaledHeight() - 222) / 2; + int x = guiLeft + xSlotPos; + int y = guiTop + ySlotPos; + // Move down when chest isn't 6 rows + if (size != 90) y += (6 - (size - 36) / 9) * 9; + + GL11.glTranslated(0, 0, 1); + Gui.drawRect(x, y, x + 16, y + 16, colour); + GL11.glTranslated(0, 0, -1); + public static void desktopNotification(String name, String title, String text, TrayIcon.MessageType messageType) { try { final SystemTray tray = SystemTray.getSystemTray(); |