aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/io
diff options
context:
space:
mode:
authorLulonaut <67191924+Lulonaut@users.noreply.github.com>2022-06-09 08:43:00 +0200
committerGitHub <noreply@github.com>2022-06-09 08:43:00 +0200
commitfe26e98a591bf2cab0c72117f00c43614d41001b (patch)
tree07f7a9c4fce373eb0de586d56395e00b0a434eb9 /src/main/java/io
parent263aa8bc32ec52818f4c6e8c97dd6b8abfd86bec (diff)
downloadNotEnoughUpdates-fe26e98a591bf2cab0c72117f00c43614d41001b.tar.gz
NotEnoughUpdates-fe26e98a591bf2cab0c72117f00c43614d41001b.tar.bz2
NotEnoughUpdates-fe26e98a591bf2cab0c72117f00c43614d41001b.zip
toggle for fast render warning (#156)
Diffstat (limited to 'src/main/java/io')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/commands/misc/CosmeticsCommand.java2
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscgui/StorageOverlay.java14
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/Notifications.java8
3 files changed, 17 insertions, 7 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/commands/misc/CosmeticsCommand.java b/src/main/java/io/github/moulberry/notenoughupdates/commands/misc/CosmeticsCommand.java
index 9ccb7cf0..de772d65 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/commands/misc/CosmeticsCommand.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/commands/misc/CosmeticsCommand.java
@@ -18,7 +18,7 @@ public class CosmeticsCommand extends ClientCommandBase {
@Override
public void processCommand(ICommandSender sender, String[] args) throws CommandException {
- if (!OpenGlHelper.isFramebufferEnabled()) {
+ if (!OpenGlHelper.isFramebufferEnabled() && NotEnoughUpdates.INSTANCE.config.notifications.doFastRenderNotif) {
Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText(EnumChatFormatting.RED +
"NEU cosmetics do not work with OF Fast Render. Go to ESC > Options > Video Settings > Performance > Fast Render to disable it."));
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/StorageOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/StorageOverlay.java
index cb81589d..e5e0ff5c 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/StorageOverlay.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/StorageOverlay.java
@@ -738,7 +738,7 @@ public class StorageOverlay extends GuiElement {
if (storageId == currentPage) {
Utils.hasEffectOverride = true;
GlStateManager.translate(storageX - 7, storageY - 17 - 18, 0);
- ((AccessorGuiContainer)guiChest).doDrawSlot(containerChest.getSlot(k + 9));
+ ((AccessorGuiContainer) guiChest).doDrawSlot(containerChest.getSlot(k + 9));
GlStateManager.translate(-storageX + 7, -storageY + 17 + 18, 0);
Utils.hasEffectOverride = false;
} else {
@@ -753,7 +753,7 @@ public class StorageOverlay extends GuiElement {
} else if (storageId == currentPage) {
Utils.hasEffectOverride = true;
GlStateManager.translate(storageX - 7, storageY - 17 - 18, 0);
- ((AccessorGuiContainer)guiChest).doDrawSlot(containerChest.getSlot(k + 9));
+ ((AccessorGuiContainer) guiChest).doDrawSlot(containerChest.getSlot(k + 9));
GlStateManager.translate(-storageX + 7, -storageY + 17 + 18, 0);
Utils.hasEffectOverride = false;
} else {
@@ -1269,7 +1269,7 @@ public class StorageOverlay extends GuiElement {
GlStateManager.pushMatrix();
GlStateManager.translate(181 - 8, storageViewSize + 18 - (inventoryStartIndex / 9 * 18 + 31), 0);
- ((AccessorGuiContainer)guiChest).doDrawSlot(containerChest.inventorySlots.get(inventoryStartIndex + i));
+ ((AccessorGuiContainer) guiChest).doDrawSlot(containerChest.inventorySlots.get(inventoryStartIndex + i));
GlStateManager.popMatrix();
if (!searchBar.getText().isEmpty()) {
@@ -1303,7 +1303,7 @@ public class StorageOverlay extends GuiElement {
//Utils.drawItemStack(playerItems[i+9], itemX, itemY);
GlStateManager.pushMatrix();
GlStateManager.translate(181 - 8, storageViewSize + 18 - (inventoryStartIndex / 9 * 18 + 31), 0);
- ((AccessorGuiContainer)guiChest).doDrawSlot(containerChest.inventorySlots.get(inventoryStartIndex + 9 + i));
+ ((AccessorGuiContainer) guiChest).doDrawSlot(containerChest.inventorySlots.get(inventoryStartIndex + 9 + i));
GlStateManager.popMatrix();
if (!searchBar.getText().isEmpty()) {
@@ -2184,7 +2184,8 @@ public class StorageOverlay extends GuiElement {
for (Slot slot : container.inventorySlots.inventorySlots) {
if (slot != null &&
- slot.inventory == Minecraft.getMinecraft().thePlayer.inventory && ((AccessorGuiContainer)container).doIsMouseOverSlot(slot, mouseX, mouseY)) {
+ slot.inventory == Minecraft.getMinecraft().thePlayer.inventory &&
+ ((AccessorGuiContainer) container).doIsMouseOverSlot(slot, mouseX, mouseY)) {
SlotLocking.getInstance().toggleLock(slot.getSlotIndex());
return true;
}
@@ -2284,7 +2285,8 @@ public class StorageOverlay extends GuiElement {
}
public void fastRenderCheck() {
- if (!OpenGlHelper.isFramebufferEnabled() && NotEnoughUpdates.INSTANCE.config.storageGUI.enableStorageGUI3) {
+ if (!OpenGlHelper.isFramebufferEnabled() && NotEnoughUpdates.INSTANCE.config.notifications.doFastRenderNotif &&
+ NotEnoughUpdates.INSTANCE.config.storageGUI.enableStorageGUI3) {
this.fastRender = true;
NotificationHandler.displayNotification(Lists.newArrayList(
"\u00a74Fast Render Warning",
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/Notifications.java b/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/Notifications.java
index 9007db88..bcdee28a 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/Notifications.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/Notifications.java
@@ -33,6 +33,14 @@ public class Notifications {
@Expose
@ConfigOption(
+ name = "Fast Render warning",
+ desc = "\u00a7cIf and ONLY if you have Fast Render disabled and are still seeing the warning, you can disable it here.\nDisabling it with Fast Render still on will lead to broken features."
+ )
+ @ConfigEditorBoolean
+ public boolean doFastRenderNotif = true;
+
+ @Expose
+ @ConfigOption(
name = "Booster Cookie Warning",
desc = "Warning when a booster cookie is about to expire"
)