aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/me/Danker/utils
diff options
context:
space:
mode:
authorbowser0000 <bowser0000@gmail.com>2020-08-25 00:18:42 -0400
committerbowser0000 <bowser0000@gmail.com>2020-08-25 00:18:42 -0400
commitece7f3de65618ee89f86513e4d8307a97c20f012 (patch)
tree992cdb04e51d996ca9cec2a0aecc7ecf7e7361c2 /src/main/java/me/Danker/utils
parent4c11aaf6d16940fb02cf14fb97bb76477912dd8f (diff)
downloadSkyblockMod-ece7f3de65618ee89f86513e4d8307a97c20f012.tar.gz
SkyblockMod-ece7f3de65618ee89f86513e4d8307a97c20f012.tar.bz2
SkyblockMod-ece7f3de65618ee89f86513e4d8307a97c20f012.zip
Add pet background (temporary) colours and fix Jerry Workshop /sbplayers
Colours are temporary, will be changed in a future commit.
Diffstat (limited to 'src/main/java/me/Danker/utils')
-rw-r--r--src/main/java/me/Danker/utils/Utils.java18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/main/java/me/Danker/utils/Utils.java b/src/main/java/me/Danker/utils/Utils.java
index 7153014..16f790a 100644
--- a/src/main/java/me/Danker/utils/Utils.java
+++ b/src/main/java/me/Danker/utils/Utils.java
@@ -4,13 +4,19 @@ import java.util.ArrayList;
import java.util.List;
import java.util.regex.Matcher;
+import org.lwjgl.opengl.GL11;
+
import me.Danker.TheMod;
import me.Danker.handlers.ScoreboardHandler;
import me.Danker.handlers.TextRenderer;
import net.minecraft.client.Minecraft;
+import net.minecraft.client.gui.Gui;
import net.minecraft.client.gui.ScaledResolution;
+import net.minecraft.client.gui.inventory.GuiContainer;
+import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
import net.minecraft.scoreboard.ScoreObjective;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.StringUtils;
@@ -120,4 +126,16 @@ public class Utils {
return result;
}
+ public static void drawOnSlot(int xSlotPos, int ySlotPos, int colour) {
+ ScaledResolution sr = new ScaledResolution(Minecraft.getMinecraft());
+ int guiLeft = (sr.getScaledWidth() - 176) / 2;
+ int guiTop = (sr.getScaledHeight() - 221) / 2;
+ int x = guiLeft + xSlotPos;
+ int y = guiTop + ySlotPos;
+
+ GL11.glTranslated(0, 0, 1);
+ Gui.drawRect(x, y, x + 16, y + 16, colour);
+ GL11.glTranslated(0, 0, -1);
+ }
+
}