From 9a5cca0eaba26c40c9e2e88148bda2be161e1d70 Mon Sep 17 00:00:00 2001 From: NopoTheGamer <40329022+NopoTheGamer@users.noreply.github.com> Date: Wed, 19 Oct 2022 13:08:31 +0000 Subject: Remove the extra bar textures as fsr never used them (#361) --- .../notenoughupdates/core/GuiElementBoolean.java | 14 +++----------- .../moulberry/notenoughupdates/util/GuiTextures.java | 4 ---- .../resources/assets/notenoughupdates/core/bar_1.png | Bin 2095 -> 0 bytes .../resources/assets/notenoughupdates/core/bar_2.png | Bin 2095 -> 0 bytes .../resources/assets/notenoughupdates/core/bar_3.png | Bin 2095 -> 0 bytes .../resources/assets/notenoughupdates/core/bar_on.png | Bin 2095 -> 0 bytes 6 files changed, 3 insertions(+), 15 deletions(-) delete mode 100644 src/main/resources/assets/notenoughupdates/core/bar_1.png delete mode 100644 src/main/resources/assets/notenoughupdates/core/bar_2.png delete mode 100644 src/main/resources/assets/notenoughupdates/core/bar_3.png delete mode 100644 src/main/resources/assets/notenoughupdates/core/bar_on.png diff --git a/src/main/java/io/github/moulberry/notenoughupdates/core/GuiElementBoolean.java b/src/main/java/io/github/moulberry/notenoughupdates/core/GuiElementBoolean.java index b0586210..11547aaa 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/core/GuiElementBoolean.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/core/GuiElementBoolean.java @@ -26,7 +26,6 @@ import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.GlStateManager; import net.minecraft.util.ResourceLocation; import org.lwjgl.input.Mouse; -import org.lwjgl.opengl.GL11; import java.util.function.Consumer; @@ -63,8 +62,10 @@ public class GuiElementBoolean extends GuiElement { @Override public void render() { GlStateManager.color(1, 1, 1, 1); + Minecraft.getMinecraft().getTextureManager().bindTexture(GuiTextures.BAR); + RenderUtils.drawTexturedRect(x, y, xSize, ySize); + ResourceLocation buttonLoc = GuiTextures.ON; - ResourceLocation barLoc = GuiTextures.BAR_ON; long currentMillis = System.currentTimeMillis(); long deltaMillis = currentMillis - lastMillis; lastMillis = currentMillis; @@ -101,25 +102,16 @@ public class GuiElementBoolean extends GuiElement { int animation = (int) (LerpUtils.sigmoidZeroOne(this.animation / 36f) * 36); if (animation < 3) { buttonLoc = GuiTextures.OFF; - barLoc = GuiTextures.BAR; } else if (animation < 13) { buttonLoc = GuiTextures.ONE; - barLoc = GuiTextures.BAR_ONE; } else if (animation < 23) { buttonLoc = GuiTextures.TWO; - barLoc = GuiTextures.BAR_TWO; } else if (animation < 33) { buttonLoc = GuiTextures.THREE; - barLoc = GuiTextures.BAR_THREE; } - GL11.glTranslatef(0, 0, 100); Minecraft.getMinecraft().getTextureManager().bindTexture(buttonLoc); RenderUtils.drawTexturedRect(x + animation, y, 12, 14); - GL11.glTranslatef(0, 0, -100); - - Minecraft.getMinecraft().getTextureManager().bindTexture(barLoc); - RenderUtils.drawTexturedRect(x, y, xSize, ySize); } @Override diff --git a/src/main/java/io/github/moulberry/notenoughupdates/util/GuiTextures.java b/src/main/java/io/github/moulberry/notenoughupdates/util/GuiTextures.java index 3ead5a56..062e65e2 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/util/GuiTextures.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/util/GuiTextures.java @@ -101,10 +101,6 @@ public class GuiTextures { new ResourceLocation("notenoughupdates:descending_overlay.png"); public static final ResourceLocation BAR = new ResourceLocation("notenoughupdates:core/bar.png"); - public static final ResourceLocation BAR_ONE = new ResourceLocation("notenoughupdates:core/bar_1.png"); - public static final ResourceLocation BAR_TWO = new ResourceLocation("notenoughupdates:core/bar_2.png"); - public static final ResourceLocation BAR_THREE = new ResourceLocation("notenoughupdates:core/bar_3.png"); - public static final ResourceLocation BAR_ON = new ResourceLocation("notenoughupdates:core/bar_on.png"); public static final ResourceLocation OFF = new ResourceLocation("notenoughupdates:core/toggle_off.png"); public static final ResourceLocation ONE = new ResourceLocation("notenoughupdates:core/toggle_1.png"); public static final ResourceLocation TWO = new ResourceLocation("notenoughupdates:core/toggle_2.png"); diff --git a/src/main/resources/assets/notenoughupdates/core/bar_1.png b/src/main/resources/assets/notenoughupdates/core/bar_1.png deleted file mode 100644 index 664c0f32..00000000 Binary files a/src/main/resources/assets/notenoughupdates/core/bar_1.png and /dev/null differ diff --git a/src/main/resources/assets/notenoughupdates/core/bar_2.png b/src/main/resources/assets/notenoughupdates/core/bar_2.png deleted file mode 100644 index 664c0f32..00000000 Binary files a/src/main/resources/assets/notenoughupdates/core/bar_2.png and /dev/null differ diff --git a/src/main/resources/assets/notenoughupdates/core/bar_3.png b/src/main/resources/assets/notenoughupdates/core/bar_3.png deleted file mode 100644 index 664c0f32..00000000 Binary files a/src/main/resources/assets/notenoughupdates/core/bar_3.png and /dev/null differ diff --git a/src/main/resources/assets/notenoughupdates/core/bar_on.png b/src/main/resources/assets/notenoughupdates/core/bar_on.png deleted file mode 100644 index 664c0f32..00000000 Binary files a/src/main/resources/assets/notenoughupdates/core/bar_on.png and /dev/null differ -- cgit