aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/me/Danker/utils
diff options
context:
space:
mode:
authorbowser0000 <bowser0000@gmail.com>2020-08-25 16:41:13 -0400
committerbowser0000 <bowser0000@gmail.com>2020-08-25 16:41:13 -0400
commitd7ca24feedb3ec7226c2832da48bf9f5b1df8054 (patch)
tree867696fa07b70556a685c12386f9341c0199800e /src/main/java/me/Danker/utils
parent09462affe26d0b9d6d460d062f7dfe9c9d09df4b (diff)
downloadSkyblockMod-d7ca24feedb3ec7226c2832da48bf9f5b1df8054.tar.gz
SkyblockMod-d7ca24feedb3ec7226c2832da48bf9f5b1df8054.tar.bz2
SkyblockMod-d7ca24feedb3ec7226c2832da48bf9f5b1df8054.zip
Fix pet colour when chest isn't 6 rows
Diffstat (limited to 'src/main/java/me/Danker/utils')
-rw-r--r--src/main/java/me/Danker/utils/Utils.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main/java/me/Danker/utils/Utils.java b/src/main/java/me/Danker/utils/Utils.java
index 16f790a..0a6cebc 100644
--- a/src/main/java/me/Danker/utils/Utils.java
+++ b/src/main/java/me/Danker/utils/Utils.java
@@ -12,11 +12,9 @@ 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.client.gui.inventory.GuiChest;
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;
@@ -126,12 +124,14 @@ public class Utils {
return result;
}
- public static void drawOnSlot(int xSlotPos, int ySlotPos, int colour) {
+ 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() - 221) / 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);