aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java
diff options
context:
space:
mode:
authorMoulberry <james.jenour@student.scotch.wa.edu.au>2020-11-28 10:53:35 +1100
committerMoulberry <james.jenour@student.scotch.wa.edu.au>2020-11-28 10:53:35 +1100
commit38bfc81ad013925463cd382bf99807d15b4fc53e (patch)
tree29e9edd2832f079e4eada13f09b7c8ecec869ce2 /src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java
parent089bac89c5435eb7e5cf80e7602da953a65f5b1a (diff)
downloadnotenoughupdates-38bfc81ad013925463cd382bf99807d15b4fc53e.tar.gz
notenoughupdates-38bfc81ad013925463cd382bf99807d15b4fc53e.tar.bz2
notenoughupdates-38bfc81ad013925463cd382bf99807d15b4fc53e.zip
bye melb
Diffstat (limited to 'src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java b/src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java
index 667128b9..64bf3015 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java
@@ -99,7 +99,7 @@ public class Utils {
}
}
- int newScale = guiScales.size() > 0 ? Math.max(1, Math.min(4, guiScales.peek())) : Minecraft.getMinecraft().gameSettings.guiScale;
+ int newScale = guiScales.size() > 0 ? Math.max(0, Math.min(4, guiScales.peek())) : Minecraft.getMinecraft().gameSettings.guiScale;
if(newScale == 0) newScale = Minecraft.getMinecraft().gameSettings.guiScale;
int oldScale = Minecraft.getMinecraft().gameSettings.guiScale;
@@ -366,8 +366,10 @@ public class Utils {
}
public static void playPressSound() {
- Minecraft.getMinecraft().getSoundHandler().playSound(PositionedSoundRecord.create(
- new ResourceLocation("gui.button.press"), 1.0F));
+ if(NotEnoughUpdates.INSTANCE.manager.config.guiButtonClicks.value) {
+ Minecraft.getMinecraft().getSoundHandler().playSound(PositionedSoundRecord.create(
+ new ResourceLocation("gui.button.press"), 1.0F));
+ }
}
public static String cleanDuplicateColourCodes(String line) {
@@ -821,7 +823,7 @@ public class Utils {
GlStateManager.disableRescaleNormal();
RenderHelper.disableStandardItemLighting();
GlStateManager.disableLighting();
- GlStateManager.disableDepth();
+ GlStateManager.enableDepth();
int tooltipTextWidth = 0;
for (String textLine : textLines)
@@ -950,6 +952,7 @@ public class Utils {
drawGradientRect(zLevel, tooltipX - 3, tooltipY - 3, tooltipX + tooltipTextWidth + 3, tooltipY - 3 + 1, borderColorStart, borderColorStart);
drawGradientRect(zLevel, tooltipX - 3, tooltipY + tooltipHeight + 2, tooltipX + tooltipTextWidth + 3, tooltipY + tooltipHeight + 3, borderColorEnd, borderColorEnd);
+ GlStateManager.disableDepth();
for (int lineNumber = 0; lineNumber < textLines.size(); ++lineNumber)
{
String line = textLines.get(lineNumber);