diff options
| author | DoKM <mcazzyman@gmail.com> | 2021-07-23 10:37:57 +0200 |
|---|---|---|
| committer | DoKM <mcazzyman@gmail.com> | 2021-07-23 10:37:57 +0200 |
| commit | f69a7b921079d0cf6bd29fa8912e687ee3bc6d29 (patch) | |
| tree | c58bd2287a76bed751a6e2169d4a626f8409f98b /src/main/java/io/github/moulberry/notenoughupdates/miscgui | |
| parent | cb3c51f303672d350354a32cf504a4a242f9f4aa (diff) | |
| parent | 0f48092ef19488a43114478095f1d4a2040d369c (diff) | |
| download | notenoughupdates-f69a7b921079d0cf6bd29fa8912e687ee3bc6d29.tar.gz notenoughupdates-f69a7b921079d0cf6bd29fa8912e687ee3bc6d29.tar.bz2 notenoughupdates-f69a7b921079d0cf6bd29fa8912e687ee3bc6d29.zip | |
Merge remote-tracking branch 'Moulberry/master'
Diffstat (limited to 'src/main/java/io/github/moulberry/notenoughupdates/miscgui')
| -rw-r--r-- | src/main/java/io/github/moulberry/notenoughupdates/miscgui/GuiCustomEnchant.java | 11 | ||||
| -rw-r--r-- | src/main/java/io/github/moulberry/notenoughupdates/miscgui/StorageOverlay.java | 17 |
2 files changed, 15 insertions, 13 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/GuiCustomEnchant.java b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/GuiCustomEnchant.java index 3cc42d7d..381c8944 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/GuiCustomEnchant.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/GuiCustomEnchant.java @@ -199,7 +199,12 @@ public class GuiCustomEnchant extends Gui { } public boolean shouldOverride(String containerName) { - shouldOverrideFast = NotEnoughUpdates.INSTANCE.config.enchanting.enableTableGUI && + if(true) { + shouldOverrideFast = false; + return false; + } + + shouldOverrideFast = NotEnoughUpdates.INSTANCE.config.enchantingSolvers.enableTableGUI && containerName != null && NotEnoughUpdates.INSTANCE.hasSkyblockScoreboard() && containerName.equalsIgnoreCase("Enchant Item"); @@ -466,8 +471,8 @@ public class GuiCustomEnchant extends Gui { } } NEUConfig cfg = NotEnoughUpdates.INSTANCE.config; - int mult = cfg.enchanting.enchantOrdering == 0 ? 1 : -1; - Comparator<Enchantment> comparator = cfg.enchanting.enchantSorting == 0 ? + int mult = cfg.enchantingSolvers.enchantOrdering == 0 ? 1 : -1; + Comparator<Enchantment> comparator = cfg.enchantingSolvers.enchantSorting == 0 ? Comparator.comparingInt(e -> mult*e.xpCost) : (c1, c2) -> mult*c1.enchId.toLowerCase().compareTo(c2.enchId.toLowerCase()); removable.sort(comparator); 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 e525117c..5d841885 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/StorageOverlay.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/StorageOverlay.java @@ -18,10 +18,7 @@ import net.minecraft.client.gui.inventory.GuiChest; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.OpenGlHelper; -import net.minecraft.client.renderer.Tessellator; -import net.minecraft.client.renderer.WorldRenderer; import net.minecraft.client.renderer.entity.RenderItem; -import net.minecraft.client.renderer.vertex.DefaultVertexFormats; import net.minecraft.client.shader.Framebuffer; import net.minecraft.init.Blocks; import net.minecraft.init.Items; @@ -36,11 +33,9 @@ import org.lwjgl.input.Mouse; import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL14; import org.lwjgl.util.vector.Vector2f; -import org.lwjgl.util.vector.Vector4f; import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; import java.awt.*; -import java.awt.event.KeyEvent; import java.util.*; import java.util.List; @@ -1241,6 +1236,7 @@ public class StorageOverlay extends GuiElement { GlStateManager.translate(0, 0, 300); allowTypingInSearchBar = false; if(stackOnMouse != null) { + GlStateManager.enableDepth(); if(hoveringOtherBackpack) { Utils.drawItemStack(new ItemStack(Item.getItemFromBlock(Blocks.barrier)), mouseX - 8, mouseY - 8); } else { @@ -1445,7 +1441,7 @@ public class StorageOverlay extends GuiElement { int dWheel = Mouse.getEventDWheel(); if(!(NotEnoughUpdates.INSTANCE.config.storageGUI.cancelScrollKey != 0 && - Keyboard.isKeyDown(NotEnoughUpdates.INSTANCE.config.storageGUI.cancelScrollKey)) && dWheel != 0) { + KeybindHelper.isKeyDown(NotEnoughUpdates.INSTANCE.config.storageGUI.cancelScrollKey)) && dWheel != 0) { if(dWheel < 0) { dWheel = -1; if(scrollVelocity > 0) scrollVelocity = 0; @@ -1639,7 +1635,7 @@ public class StorageOverlay extends GuiElement { switch(buttonIndex) { case 0: - NotEnoughUpdates.INSTANCE.config.storageGUI.enableStorageGUI2 = false; break; + NotEnoughUpdates.INSTANCE.config.storageGUI.enableStorageGUI3 = false; break; case 1: int size = desiredHeightSwitch != -1 ? desiredHeightSwitch : NotEnoughUpdates.INSTANCE.config.storageGUI.storageHeight; int sizeIndex = Math.round((size-104)/54f); @@ -1649,8 +1645,8 @@ public class StorageOverlay extends GuiElement { sizeIndex++; } size = sizeIndex*54+104; - if(size < 104) size = 104; - if(size > 312) size = 312; + if(size < 104) size = 312; + if(size > 320) size = 104; desiredHeightMX = mouseX; desiredHeightMY = mouseY; desiredHeightSwitch = size; break; @@ -1898,9 +1894,10 @@ public class StorageOverlay extends GuiElement { searchBar.getText().isEmpty()) { searchBar.setFocus(false); } + } else if(Keyboard.getEventKey() == Keyboard.KEY_E) { + return false; } - } return true; |
