aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/rosegoldaddons/utils/RenderUtils.java
diff options
context:
space:
mode:
authorRoseGoldIsntGay <yoavkau@gmail.com>2022-07-27 21:47:43 +0300
committerRoseGoldIsntGay <yoavkau@gmail.com>2022-07-27 21:47:43 +0300
commit170ccfa42e36f04306820fbc3ef8a8ce3cf75010 (patch)
tree6728741f9a9befcb71ce1f27262073c984affe9a /src/main/java/rosegoldaddons/utils/RenderUtils.java
parent854c131bf7965cef66d37e80640999242c9e0d65 (diff)
downloadRGA-170ccfa42e36f04306820fbc3ef8a8ce3cf75010.tar.gz
RGA-170ccfa42e36f04306820fbc3ef8a8ce3cf75010.tar.bz2
RGA-170ccfa42e36f04306820fbc3ef8a8ce3cf75010.zip
last update for a whileHEADmaster
imma be real with y'all this is really old changes i never pushed to git so forgive me if the changelog is partial added an autoclicker that probably gets u banned added auto leave limbo added three weirdos auto solver added block size modifiers for dungeons i changed a log of stuff probably bug fixes have fun
Diffstat (limited to 'src/main/java/rosegoldaddons/utils/RenderUtils.java')
-rw-r--r--src/main/java/rosegoldaddons/utils/RenderUtils.java20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/main/java/rosegoldaddons/utils/RenderUtils.java b/src/main/java/rosegoldaddons/utils/RenderUtils.java
index d6a7f8f..9d314a3 100644
--- a/src/main/java/rosegoldaddons/utils/RenderUtils.java
+++ b/src/main/java/rosegoldaddons/utils/RenderUtils.java
@@ -3,6 +3,7 @@ package rosegoldaddons.utils;
import net.minecraft.block.Block;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.FontRenderer;
+import net.minecraft.client.gui.Gui;
import net.minecraft.client.gui.ScaledResolution;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.client.renderer.Tessellator;
@@ -111,7 +112,6 @@ public class RenderUtils {
drawSelectionBoundingBox(axisAlignedBB);
-
GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
glDepthMask(true);
resetCaps();
@@ -653,6 +653,24 @@ public class RenderUtils {
glScissor((int) (x * factor), (int) ((scaledResolution.getScaledHeight() - y2) * factor), (int) ((x2 - x) * factor), (int) ((y2 - y) * factor));
}
+
+ public static void drawRectangle(int x, int y, int width, int height) {
+ glEnable(GL_BLEND);
+ glColor3f(0,0,0);
+ glRecti(x, y, width, height);
+ glFlush();
+ }
+
+ public static void drawTexture(ResourceLocation resourceLocation, int x, int y, int width, int height, int textureWidth, int textureHeight, int textureX, int textureY) {
+ Main.mc.getTextureManager().bindTexture(resourceLocation);
+ GlStateManager.color(255, 255, 255);
+ Gui.drawModalRectWithCustomSizedTexture(x, y, textureX, textureY, width, height, textureWidth, textureHeight);
+ }
+
+ public static void drawTexture(ResourceLocation resourceLocation, int x, int y, int width, int height) {
+ drawTexture(resourceLocation, x, y, width, height, width, height, 0, 0);
+ }
+
/**
* Modified from NotEnoughUpdates under Creative Commons Attribution-NonCommercial 3.0
* https://github.com/Moulberry/NotEnoughUpdates/blob/master/LICENSE