From 308e85498dddd78c5a9b41e555c235aecb86dc67 Mon Sep 17 00:00:00 2001 From: Juuz <6596629+Juuxel@users.noreply.github.com> Date: Thu, 2 Feb 2023 18:34:50 +0200 Subject: Remove commented-out code in ScreenDrawing --- .../cottonmc/cotton/gui/client/ScreenDrawing.java | 38 ---------------------- 1 file changed, 38 deletions(-) (limited to 'src/main/java/io') diff --git a/src/main/java/io/github/cottonmc/cotton/gui/client/ScreenDrawing.java b/src/main/java/io/github/cottonmc/cotton/gui/client/ScreenDrawing.java index 19171c9..7af67f1 100644 --- a/src/main/java/io/github/cottonmc/cotton/gui/client/ScreenDrawing.java +++ b/src/main/java/io/github/cottonmc/cotton/gui/client/ScreenDrawing.java @@ -197,44 +197,6 @@ public class ScreenDrawing { DrawableHelper.fill(matrices, left, top, left + width, top + height, color); } - /** - * Draws a rectangle for a Fluid, because fluids are tough. - */ - /* - public static void rect(Fluid fluid, int left, int top, int width, int height, float u1, float v1, float u2, float v2, int color) { - Identifier fluidTexture = fluid.getStill(); - - TextureAtlasSprite tas = Minecraft.getMinecraft().getTextureMapBlocks().getAtlasSprite(fluidTexture.toString()); - Minecraft.getMinecraft().getTextureManager().bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE); - - if (width <= 0) width = 1; - if (height <= 0) height = 1; - - float a = (color >> 24 & 255) / 255.0F; - float r = (color >> 16 & 255) / 255.0F; - float g = (color >> 8 & 255) / 255.0F; - float b = (color & 255) / 255.0F; - Tessellator tessellator = Tessellator.getInstance(); - BufferBuilder buffer = tessellator.getBufferBuilder(); - GlStateManager.enableBlend(); - //GlStateManager.disableTexture2D(); - GlStateManager.blendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO); - GlStateManager.color4f(r, g, b, a); - buffer.begin(GL11.GL_QUADS, DefaultVertexFormats.POSITION_TEX); //I thought GL_QUADS was deprecated but okay, sure. - buffer.pos(left, top + height, 0.0D).tex(tas.getInterpolatedU(u1), tas.getInterpolatedV(v2)).endVertex(); - buffer.pos(left + width, top + height, 0.0D).tex(tas.getInterpolatedU(u2), tas.getInterpolatedV(v2)).endVertex(); - buffer.pos(left + width, top, 0.0D).tex(tas.getInterpolatedU(u2), tas.getInterpolatedV(v1)).endVertex(); - buffer.pos(left, top, 0.0D).tex(tas.getInterpolatedU(u1), tas.getInterpolatedV(v1)).endVertex(); - tessellator.draw(); - //GlStateManager.enableTexture2D(); - GlStateManager.disableBlend(); - }*/ - - /* - public static void rect(Fluid fluid, int left, int top, int width, int height, int color) { - rect(fluid, left, top, width, height, 0, 0, 16, 16, color); - }*/ - /** * Draws a beveled, round rectangle that is substantially similar to default Minecraft UI panels. * -- cgit