aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCuzImClicks <bruno778.whiteelfie@gmail.com>2022-04-22 22:28:55 +0200
committerCuzImClicks <bruno778.whiteelfie@gmail.com>2022-04-22 22:28:55 +0200
commit5f6ce80319b21d53abbec15886f4e2fbd765f748 (patch)
tree46996c2eb5dd9d5d2cb5bc1955dbe19ae82e927c /src
parent4b49b2c392d3acec1d2503edb29b510dd2a214cc (diff)
downloadSkyblockMod-5f6ce80319b21d53abbec15886f4e2fbd765f748.tar.gz
SkyblockMod-5f6ce80319b21d53abbec15886f4e2fbd765f748.tar.bz2
SkyblockMod-5f6ce80319b21d53abbec15886f4e2fbd765f748.zip
fixed HighlightCommissions
Diffstat (limited to 'src')
-rw-r--r--src/main/java/me/Danker/utils/Utils.java17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/main/java/me/Danker/utils/Utils.java b/src/main/java/me/Danker/utils/Utils.java
index c9021f7..0fa2d0a 100644
--- a/src/main/java/me/Danker/utils/Utils.java
+++ b/src/main/java/me/Danker/utils/Utils.java
@@ -8,6 +8,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;
@@ -18,6 +20,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.util.*;
import java.util.regex.Matcher;
@@ -491,6 +494,20 @@ 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 enum DungeonFloor {
NONE,
E0,