aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/NotEnoughUpdates.java1
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/core/config/gui/GuiOptionEditorKeybind.java5
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/DwarvenMinesTextures.java7
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/StorageManager.java2
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscgui/GuiCustomEnchant.java17
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscgui/InventoryStorageSelector.java91
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscgui/StorageOverlay.java13
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinWorld.java2
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/options/NEUConfig.java4
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/Enchanting.java48
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/MiscOverlays.java2
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/StorageGUI.java36
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/overlays/OverlayManager.java3
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/overlays/TimersOverlay.java9
14 files changed, 140 insertions, 100 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/NotEnoughUpdates.java b/src/main/java/io/github/moulberry/notenoughupdates/NotEnoughUpdates.java
index 86a36f49..4f2e8a93 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/NotEnoughUpdates.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/NotEnoughUpdates.java
@@ -9,6 +9,7 @@ import com.google.gson.JsonObject;
import com.mojang.authlib.Agent;
import com.mojang.authlib.minecraft.MinecraftSessionService;
import com.mojang.authlib.yggdrasil.YggdrasilAuthenticationService;
+import com.mojang.authlib.yggdrasil.YggdrasilMinecraftSessionService;
import com.mojang.authlib.yggdrasil.YggdrasilUserAuthentication;
import io.github.moulberry.notenoughupdates.auction.CustomAHGui;
import io.github.moulberry.notenoughupdates.collectionlog.GuiCollectionLog;
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/core/config/gui/GuiOptionEditorKeybind.java b/src/main/java/io/github/moulberry/notenoughupdates/core/config/gui/GuiOptionEditorKeybind.java
index 0c0514fe..601cc6b1 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/core/config/gui/GuiOptionEditorKeybind.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/core/config/gui/GuiOptionEditorKeybind.java
@@ -83,9 +83,10 @@ public class GuiOptionEditorKeybind extends GuiOptionEditor {
editingKeycode = false;
if(Keyboard.getEventKey() == Keyboard.KEY_ESCAPE) {
keyCode = 0;
- } else {
- keyCode = Keyboard.getEventKey() == 0 ? Keyboard.getEventCharacter() + 256 : Keyboard.getEventKey();
+ } else if(Keyboard.getEventKey() != 0) {
+ keyCode = Keyboard.getEventKey();
}
+ if(keyCode > 256) keyCode = 0;
option.set(keyCode);
return true;
}
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/DwarvenMinesTextures.java b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/DwarvenMinesTextures.java
index 65b47ec0..735243d3 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/DwarvenMinesTextures.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/DwarvenMinesTextures.java
@@ -54,8 +54,11 @@ public class DwarvenMinesTextures {
if(error) return 0;
if(Minecraft.getMinecraft().theWorld == null) return 0;
- if(SBInfo.getInstance().getLocation() == null) return 0;
- if(!SBInfo.getInstance().getLocation().equals("mining_3")) return 0;
+ String location = SBInfo.getInstance().getLocation();
+
+ if(location == null) return 0;
+ if(location.equals("crystal_hollows")) return 3;
+ if(!location.equals("mining_3")) return 0;
IBlockState state = Minecraft.getMinecraft().theWorld.getBlockState(pos);
boolean titanium = state.getBlock() == Blocks.stone && state.getValue(BlockStone.VARIANT) == BlockStone.EnumType.DIORITE_SMOOTH;
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/StorageManager.java b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/StorageManager.java
index 37a60b1b..a20e5abb 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/StorageManager.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/StorageManager.java
@@ -226,7 +226,7 @@ public class StorageManager {
}
public boolean shouldRenderStorageOverlay(String containerName) {
- if(!NotEnoughUpdates.INSTANCE.config.storageGUI.enableStorageGUI) {
+ if(!NotEnoughUpdates.INSTANCE.config.storageGUI.enableStorageGUI2) {
shouldRenderStorageOverlayCached = false;
return false;
}
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 d07a6898..3cc42d7d 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/GuiCustomEnchant.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/GuiCustomEnchant.java
@@ -10,6 +10,7 @@ import io.github.moulberry.notenoughupdates.core.GuiElementTextField;
import io.github.moulberry.notenoughupdates.core.util.lerp.LerpingFloat;
import io.github.moulberry.notenoughupdates.core.util.lerp.LerpingInteger;
import io.github.moulberry.notenoughupdates.miscfeatures.SlotLocking;
+import io.github.moulberry.notenoughupdates.options.NEUConfig;
import io.github.moulberry.notenoughupdates.util.Constants;
import io.github.moulberry.notenoughupdates.util.Utils;
import net.minecraft.client.Minecraft;
@@ -198,11 +199,8 @@ public class GuiCustomEnchant extends Gui {
}
public boolean shouldOverride(String containerName) {
- if(!NotEnoughUpdates.INSTANCE.config.enchanting.enableGui) return false;
-// shouldOverrideFast = false;
-// if(true) return shouldOverrideFast;
-
- shouldOverrideFast = containerName != null &&
+ shouldOverrideFast = NotEnoughUpdates.INSTANCE.config.enchanting.enableTableGUI &&
+ containerName != null &&
NotEnoughUpdates.INSTANCE.hasSkyblockScoreboard() &&
containerName.equalsIgnoreCase("Enchant Item");
if(!shouldOverrideFast) {
@@ -467,8 +465,13 @@ public class GuiCustomEnchant extends Gui {
}
}
}
- removable.sort(Comparator.comparingInt(e -> e.xpCost));
- applicable.sort(Comparator.comparingInt(e -> e.xpCost));
+ NEUConfig cfg = NotEnoughUpdates.INSTANCE.config;
+ int mult = cfg.enchanting.enchantOrdering == 0 ? 1 : -1;
+ Comparator<Enchantment> comparator = cfg.enchanting.enchantSorting == 0 ?
+ Comparator.comparingInt(e -> mult*e.xpCost) :
+ (c1, c2) -> mult*c1.enchId.toLowerCase().compareTo(c2.enchId.toLowerCase());
+ removable.sort(comparator);
+ applicable.sort(comparator);
}
}
}
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/InventoryStorageSelector.java b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/InventoryStorageSelector.java
index c1a7ec6d..d24f2572 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/InventoryStorageSelector.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/InventoryStorageSelector.java
@@ -30,7 +30,6 @@ public class InventoryStorageSelector {
private static final ResourceLocation STORAGE_PANE_CTM_TEXTURE = new ResourceLocation("notenoughupdates:storage_gui/storage_gui_pane_ctm.png");
public boolean isOverridingSlot = false;
- public int selectedIndex = 0;
public static InventoryStorageSelector getInstance() {
return INSTANCE;
@@ -65,19 +64,19 @@ public class InventoryStorageSelector {
}
if(KeybindHelper.isKeyPressed(NotEnoughUpdates.INSTANCE.config.storageGUI.arrowLeftKey)) {
- selectedIndex--;
+ NotEnoughUpdates.INSTANCE.config.storageGUI.selectedIndex--;
int max = StorageManager.getInstance().storageConfig.displayToStorageIdMap.size()-1;
- if(selectedIndex > max) selectedIndex = max;
- if(selectedIndex < 0) selectedIndex = 0;
+ if(NotEnoughUpdates.INSTANCE.config.storageGUI.selectedIndex > max) NotEnoughUpdates.INSTANCE.config.storageGUI.selectedIndex = max;
+ if(NotEnoughUpdates.INSTANCE.config.storageGUI.selectedIndex < 0) NotEnoughUpdates.INSTANCE.config.storageGUI.selectedIndex = 0;
} else if(KeybindHelper.isKeyPressed(NotEnoughUpdates.INSTANCE.config.storageGUI.arrowRightKey)) {
- selectedIndex++;
+ NotEnoughUpdates.INSTANCE.config.storageGUI.selectedIndex++;
int max = StorageManager.getInstance().storageConfig.displayToStorageIdMap.size()-1;
- if(selectedIndex > max) selectedIndex = max;
- if(selectedIndex < 0) selectedIndex = 0;
+ if(NotEnoughUpdates.INSTANCE.config.storageGUI.selectedIndex > max) NotEnoughUpdates.INSTANCE.config.storageGUI.selectedIndex = max;
+ if(NotEnoughUpdates.INSTANCE.config.storageGUI.selectedIndex < 0) NotEnoughUpdates.INSTANCE.config.storageGUI.selectedIndex = 0;
} else if(KeybindHelper.isKeyPressed(NotEnoughUpdates.INSTANCE.config.storageGUI.arrowDownKey)) {
- sendToPage(selectedIndex);
+ sendToPage(NotEnoughUpdates.INSTANCE.config.storageGUI.selectedIndex);
}
if(isSlotSelected()) {
@@ -87,7 +86,7 @@ public class InventoryStorageSelector {
if(Mouse.getEventButton() == useKeycode || Mouse.getEventButton() == attackKeycode) {
if(Mouse.getEventButtonState() &&
Mouse.getEventButton() != NotEnoughUpdates.INSTANCE.config.storageGUI.backpackScrollKey+100) {
- sendToPage(selectedIndex);
+ sendToPage(NotEnoughUpdates.INSTANCE.config.storageGUI.selectedIndex);
}
event.setCanceled(true);
@@ -99,10 +98,10 @@ public class InventoryStorageSelector {
if(!StorageManager.getInstance().storageConfig.displayToStorageIdMap.containsKey(displayId)) {
return;
}
- if(getPage(selectedIndex) == null) {
+ if(getPage(NotEnoughUpdates.INSTANCE.config.storageGUI.selectedIndex) == null) {
NotEnoughUpdates.INSTANCE.sendChatMessage("/storage");
} else {
- int index = StorageManager.getInstance().storageConfig.displayToStorageIdMap.get(selectedIndex);
+ int index = StorageManager.getInstance().storageConfig.displayToStorageIdMap.get(NotEnoughUpdates.INSTANCE.config.storageGUI.selectedIndex);
StorageManager.getInstance().sendToPage(index);
}
}
@@ -120,25 +119,23 @@ public class InventoryStorageSelector {
return;
}
- if(NotEnoughUpdates.INSTANCE.config.storageGUI.arrowKeyBackpacks) {
- if (KeybindHelper.isKeyPressed(NotEnoughUpdates.INSTANCE.config.storageGUI.backpackHotkey)) {
- Minecraft.getMinecraft().thePlayer.inventory.currentItem = 0;
- isOverridingSlot = true;
- } else if (KeybindHelper.isKeyPressed(NotEnoughUpdates.INSTANCE.config.storageGUI.arrowLeftKey)) {
- selectedIndex--;
-
- int max = StorageManager.getInstance().storageConfig.displayToStorageIdMap.size() - 1;
- if (selectedIndex > max) selectedIndex = max;
- if (selectedIndex < 0) selectedIndex = 0;
- } else if (KeybindHelper.isKeyPressed(NotEnoughUpdates.INSTANCE.config.storageGUI.arrowRightKey)) {
- selectedIndex++;
-
- int max = StorageManager.getInstance().storageConfig.displayToStorageIdMap.size() - 1;
- if (selectedIndex > max) selectedIndex = max;
- if (selectedIndex < 0) selectedIndex = 0;
- } else if (KeybindHelper.isKeyPressed(NotEnoughUpdates.INSTANCE.config.storageGUI.arrowDownKey)) {
- sendToPage(selectedIndex);
- }
+ if(KeybindHelper.isKeyPressed(NotEnoughUpdates.INSTANCE.config.storageGUI.backpackHotkey)) {
+ Minecraft.getMinecraft().thePlayer.inventory.currentItem = 0;
+ isOverridingSlot = true;
+ } else if(KeybindHelper.isKeyPressed(NotEnoughUpdates.INSTANCE.config.storageGUI.arrowLeftKey)) {
+ NotEnoughUpdates.INSTANCE.config.storageGUI.selectedIndex--;
+
+ int max = StorageManager.getInstance().storageConfig.displayToStorageIdMap.size()-1;
+ if(NotEnoughUpdates.INSTANCE.config.storageGUI.selectedIndex > max) NotEnoughUpdates.INSTANCE.config.storageGUI.selectedIndex = max;
+ if(NotEnoughUpdates.INSTANCE.config.storageGUI.selectedIndex < 0) NotEnoughUpdates.INSTANCE.config.storageGUI.selectedIndex = 0;
+ } else if(KeybindHelper.isKeyPressed(NotEnoughUpdates.INSTANCE.config.storageGUI.arrowRightKey)) {
+ NotEnoughUpdates.INSTANCE.config.storageGUI.selectedIndex++;
+
+ int max = StorageManager.getInstance().storageConfig.displayToStorageIdMap.size()-1;
+ if(NotEnoughUpdates.INSTANCE.config.storageGUI.selectedIndex > max) NotEnoughUpdates.INSTANCE.config.storageGUI.selectedIndex = max;
+ if(NotEnoughUpdates.INSTANCE.config.storageGUI.selectedIndex < 0) NotEnoughUpdates.INSTANCE.config.storageGUI.selectedIndex = 0;
+ } else if(KeybindHelper.isKeyPressed(NotEnoughUpdates.INSTANCE.config.storageGUI.arrowDownKey)) {
+ sendToPage(NotEnoughUpdates.INSTANCE.config.storageGUI.selectedIndex);
}
if(isSlotSelected()) {
@@ -147,7 +144,7 @@ public class InventoryStorageSelector {
if(attack.isPressed() || attack.isKeyDown()) {
if(attack.getKeyCode() != NotEnoughUpdates.INSTANCE.config.storageGUI.backpackScrollKey) {
- sendToPage(selectedIndex);
+ sendToPage(NotEnoughUpdates.INSTANCE.config.storageGUI.selectedIndex);
}
KeyBinding.setKeyBindState(attack.getKeyCode(), false);
@@ -156,7 +153,7 @@ public class InventoryStorageSelector {
if(use.isPressed() || use.isKeyDown()) {
if(attack.getKeyCode() != NotEnoughUpdates.INSTANCE.config.storageGUI.backpackScrollKey) {
- sendToPage(selectedIndex);
+ sendToPage(NotEnoughUpdates.INSTANCE.config.storageGUI.selectedIndex);
}
KeyBinding.setKeyBindState(use.getKeyCode(), false);
@@ -175,16 +172,19 @@ public class InventoryStorageSelector {
int keyCode = NotEnoughUpdates.INSTANCE.config.storageGUI.backpackScrollKey;
if(isOverridingSlot && KeybindHelper.isKeyDown(keyCode)) {
- selectedIndex -= direction;
+ NotEnoughUpdates.INSTANCE.config.storageGUI.selectedIndex -= direction;
int max = StorageManager.getInstance().storageConfig.displayToStorageIdMap.size()-1;
- if(selectedIndex > max) selectedIndex = max;
- if(selectedIndex < 0) selectedIndex = 0;
+ if(NotEnoughUpdates.INSTANCE.config.storageGUI.selectedIndex > max) NotEnoughUpdates.INSTANCE.config.storageGUI.selectedIndex = max;
+ if(NotEnoughUpdates.INSTANCE.config.storageGUI.selectedIndex < 0) NotEnoughUpdates.INSTANCE.config.storageGUI.selectedIndex = 0;
return 0;
}
- if(NotEnoughUpdates.INSTANCE.config.storageGUI.scrollToBackpack &&
- resultantSlot == 0 && direction == -1 && !isOverridingSlot) {
+ boolean allowScroll = NotEnoughUpdates.INSTANCE.config.storageGUI.scrollToBackpack2 == 0 ?
+ KeybindHelper.isKeyDown(NotEnoughUpdates.INSTANCE.config.storageGUI.backpackScrollKey) :
+ NotEnoughUpdates.INSTANCE.config.storageGUI.scrollToBackpack2 == 1;
+
+ if(allowScroll && resultantSlot == 0 && direction == -1 && !isOverridingSlot) {
isOverridingSlot = true;
Minecraft.getMinecraft().getItemRenderer().resetEquippedProgress();
return 0;
@@ -192,8 +192,7 @@ public class InventoryStorageSelector {
isOverridingSlot = false;
Minecraft.getMinecraft().getItemRenderer().resetEquippedProgress();
return 0;
- } else if(NotEnoughUpdates.INSTANCE.config.storageGUI.scrollToBackpack &&
- resultantSlot == 8 && direction == 1 && !isOverridingSlot) {
+ } else if(allowScroll && resultantSlot == 8 && direction == 1 && !isOverridingSlot) {
isOverridingSlot = true;
Minecraft.getMinecraft().getItemRenderer().resetEquippedProgress();
return 0;
@@ -210,7 +209,7 @@ public class InventoryStorageSelector {
}
public ItemStack getNamedHeldItemOverride() {
- StorageManager.StoragePage page = getPage(selectedIndex);
+ StorageManager.StoragePage page = getPage(NotEnoughUpdates.INSTANCE.config.storageGUI.selectedIndex);
if(page != null && page.backpackDisplayStack != null) {
return page.backpackDisplayStack;
}
@@ -218,7 +217,7 @@ public class InventoryStorageSelector {
}
public ItemStack getHeldItemOverride() {
- return getHeldItemOverride(selectedIndex);
+ return getHeldItemOverride(NotEnoughUpdates.INSTANCE.config.storageGUI.selectedIndex);
}
public ItemStack getHeldItemOverride(int selectedIndex) {
@@ -242,8 +241,8 @@ public class InventoryStorageSelector {
}
int max = StorageManager.getInstance().storageConfig.displayToStorageIdMap.size()-1;
- if(selectedIndex > max) selectedIndex = max;
- if(selectedIndex < 0) selectedIndex = 0;
+ if(NotEnoughUpdates.INSTANCE.config.storageGUI.selectedIndex > max) NotEnoughUpdates.INSTANCE.config.storageGUI.selectedIndex = max;
+ if(NotEnoughUpdates.INSTANCE.config.storageGUI.selectedIndex < 0) NotEnoughUpdates.INSTANCE.config.storageGUI.selectedIndex = 0;
int width = scaledResolution.getScaledWidth();
int height = scaledResolution.getScaledHeight();
@@ -261,7 +260,7 @@ public class InventoryStorageSelector {
int top = scaledResolution.getScaledHeight() - 22;
if(NotEnoughUpdates.INSTANCE.config.storageGUI.showInvBackpackPreview && isSlotSelected()) {
- StorageManager.StoragePage page = getPage(selectedIndex);
+ StorageManager.StoragePage page = getPage(NotEnoughUpdates.INSTANCE.config.storageGUI.selectedIndex);
if(page != null && page.rows > 0) {
int rows = page.rows;
@@ -430,8 +429,8 @@ public class InventoryStorageSelector {
}
int index = 1;
- if(StorageManager.getInstance().storageConfig.displayToStorageIdMap.containsKey(selectedIndex)) {
- int displayIndex = StorageManager.getInstance().storageConfig.displayToStorageIdMap.get(selectedIndex);
+ if(StorageManager.getInstance().storageConfig.displayToStorageIdMap.containsKey(NotEnoughUpdates.INSTANCE.config.storageGUI.selectedIndex)) {
+ int displayIndex = StorageManager.getInstance().storageConfig.displayToStorageIdMap.get(NotEnoughUpdates.INSTANCE.config.storageGUI.selectedIndex);
if(displayIndex < 9) {
index = displayIndex+1;
} else {
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 2dd0fbd1..e525117c 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/StorageOverlay.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/StorageOverlay.java
@@ -118,6 +118,7 @@ public class StorageOverlay extends GuiElement {
private int desiredHeightMY = -1;
private boolean dirty = false;
+ private boolean allowTypingInSearchBar = true;
private int scrollGrabOffset = -1;
@@ -1238,6 +1239,7 @@ public class StorageOverlay extends GuiElement {
GlStateManager.popMatrix();
GlStateManager.translate(0, 0, 300);
+ allowTypingInSearchBar = false;
if(stackOnMouse != null) {
if(hoveringOtherBackpack) {
Utils.drawItemStack(new ItemStack(Item.getItemFromBlock(Blocks.barrier)), mouseX - 8, mouseY - 8);
@@ -1277,6 +1279,8 @@ public class StorageOverlay extends GuiElement {
}
} else if(tooltipToDisplay != null) {
Utils.drawHoveringText(tooltipToDisplay, mouseX, mouseY, width, height, -1, Minecraft.getMinecraft().fontRendererObj);
+ } else {
+ allowTypingInSearchBar = true;
}
GlStateManager.translate(0, 0, -300);
}
@@ -1440,9 +1444,8 @@ public class StorageOverlay extends GuiElement {
if(!(Minecraft.getMinecraft().currentScreen instanceof GuiChest)) return false;
int dWheel = Mouse.getEventDWheel();
- if(dWheel != 0 &&
- (((NotEnoughUpdates.INSTANCE.config.storageGUI.scrollLock == 0)||
- (NotEnoughUpdates.INSTANCE.config.storageGUI.scrollLock == 1 && !KeybindHelper.isKeyPressed(NotEnoughUpdates.INSTANCE.config.storageGUI.slotLockKey))))) {
+ if(!(NotEnoughUpdates.INSTANCE.config.storageGUI.cancelScrollKey != 0 &&
+ Keyboard.isKeyDown(NotEnoughUpdates.INSTANCE.config.storageGUI.cancelScrollKey)) && dWheel != 0) {
if(dWheel < 0) {
dWheel = -1;
if(scrollVelocity > 0) scrollVelocity = 0;
@@ -1636,7 +1639,7 @@ public class StorageOverlay extends GuiElement {
switch(buttonIndex) {
case 0:
- NotEnoughUpdates.INSTANCE.config.storageGUI.enableStorageGUI = false; break;
+ NotEnoughUpdates.INSTANCE.config.storageGUI.enableStorageGUI2 = false; break;
case 1:
int size = desiredHeightSwitch != -1 ? desiredHeightSwitch : NotEnoughUpdates.INSTANCE.config.storageGUI.storageHeight;
int sizeIndex = Math.round((size-104)/54f);
@@ -1882,7 +1885,7 @@ public class StorageOverlay extends GuiElement {
page.customTitle = renameStorageField.getText();
}
}
- } else if(NotEnoughUpdates.INSTANCE.config.storageGUI.searchBarAutofocus || searchBar.getFocus()) {
+ } else if(searchBar.getFocus() || (allowTypingInSearchBar && NotEnoughUpdates.INSTANCE.config.storageGUI.searchBarAutofocus)) {
String prevText = searchBar.getText();
searchBar.setFocus(true);
renameStorageField.setFocus(false);
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinWorld.java b/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinWorld.java
index fff1c449..0df8b30b 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinWorld.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinWorld.java
@@ -33,6 +33,8 @@ public class MixinWorld {
cir.setReturnValue(BiomeGenBase.extremeHillsPlus);
} else if(retexture == 2) {
cir.setReturnValue(BiomeGenBase.extremeHillsEdge);
+ } else if(retexture == 3) {
+ cir.setReturnValue(BiomeGenBase.coldBeach);
}
}
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/options/NEUConfig.java b/src/main/java/io/github/moulberry/notenoughupdates/options/NEUConfig.java
index fcbed1af..5b0e0128 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/options/NEUConfig.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/options/NEUConfig.java
@@ -174,8 +174,8 @@ public class NEUConfig extends Config {
@Expose
@Category(
- name = "Enchanting",
- desc = "Enchanting"
+ name = "Enchanting GUI/Solvers",
+ desc = "Enchanting GUI/Solvers"
)
public Enchanting enchanting = new Enchanting();
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/Enchanting.java b/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/Enchanting.java
index 1833df51..a505f8b7 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/Enchanting.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/Enchanting.java
@@ -4,13 +4,55 @@ import com.google.gson.annotations.Expose;
import io.github.moulberry.notenoughupdates.core.config.annotations.*;
public class Enchanting {
+ @ConfigOption(
+ name = "Enchant Table GUI",
+ desc = ""
+ )
+ @ConfigEditorAccordion(id = 1)
+ public boolean tableGUIAccordion = false;
+
@Expose
@ConfigOption(
- name = "Enable Custom Enchanting Gui",
- desc = "Adds a BETA enchanting gui"
+ name = "Enable Enchant Table GUI",
+ desc = "Show a custom GUI when using the Enchant Table"
)
@ConfigEditorBoolean
- public boolean enableGui = false;
+ @ConfigAccordionId(id = 1)
+ public boolean enableTableGUI = true;
+
+ @Expose
+ @ConfigOption(
+ name = "Incompatible Enchants",
+ desc = "Handle enchants that are incompatible with your current item, eg. Smite on a sword with Sharpness"
+ )
+ @ConfigEditorDropdown(
+ values = {"Highlight", "Hide"}
+ )
+ @ConfigAccordionId(id = 1)
+ public int incompatibleEnchants = 0;
+
+ @Expose
+ @ConfigOption(
+ name = "Enchant Sorting",
+ desc = "Change the method of sorting enchants in the GUI"
+ )
+ @ConfigEditorDropdown(
+ values = {"By Cost", "Alphabetical"}
+ )
+ @ConfigAccordionId(id = 1)
+ public int enchantSorting = 0;
+
+ @Expose
+ @ConfigOption(
+ name = "Enchant Ordering",
+ desc = "Change the method of ordered used by the sort"
+ )
+ @ConfigEditorDropdown(
+ values = {"Ascending", "Descending"}
+ )
+ @ConfigAccordionId(id = 1)
+ public int enchantOrdering = 0;
+
@ConfigOption(
name = "Enchanting Solvers",
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/MiscOverlays.java b/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/MiscOverlays.java
index d31370b7..db36b111 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/MiscOverlays.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/MiscOverlays.java
@@ -42,7 +42,7 @@ public class MiscOverlays {
"\u00a73Experiments: \u00a7e3h38m"}
)
@ConfigAccordionId(id = 0)
- public List<Integer> todoText = new ArrayList<>(Arrays.asList(0, 1, 2, 3, 4, 5, 6));
+ public List<Integer> todoText2 = new ArrayList<>(Arrays.asList(0, 1, 2, 3, 4, 5, 6));
@ConfigOption(
name = "Show Only If Soon",
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/StorageGUI.java b/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/StorageGUI.java
index 2b48bc74..07e4ef86 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/StorageGUI.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/StorageGUI.java
@@ -13,6 +13,9 @@ public class StorageGUI {
public boolean storageOverlayAccordion = false;
@Expose
+ public int selectedIndex = 0;
+
+ @Expose
@ConfigOption(
name = "Enable Storage GUI",
desc = "Show a custom storage overlay when accessing /storage. " +
@@ -20,7 +23,7 @@ public class StorageGUI {
)
@ConfigEditorBoolean
@ConfigAccordionId(id = 1)
- public boolean enableStorageGUI = false;
+ public boolean enableStorageGUI2 = false;
@Expose
@ConfigOption(
@@ -104,25 +107,13 @@ public class StorageGUI {
@Expose
@ConfigOption(
- name = "Scroll Lock",
- desc = "Stop scrolling when holding the key below.\n"+
- "Usefull for people using scrollable tooltips."
- )
- @ConfigEditorDropdown(
- values = {"Off", "On"}
+ name = "Scrollable Tooltips",
+ desc = "Support for scrolling tooltips for users with small monitors\n" +
+ "This will prevent the menu from scrolling while holding the key, allowing you to scroll tooltips"
)
+ @ConfigEditorKeybind(defaultKey = 0)
@ConfigAccordionId(id = 1)
- public int scrollLock = 0;
-
- @Expose
- @ConfigOption(
- name = "Scroll Lock Key",
- desc = "Hold this keep to stop scrolling in the gui.\n" +
- "Don't forget to enable it above."
- )
- @ConfigEditorKeybind(defaultKey = Keyboard.KEY_LSHIFT)
- @ConfigAccordionId(id = 1)
- public int slotLockKey = Keyboard.KEY_LSHIFT;
+ public int cancelScrollKey = 0;
@ConfigOption(
@@ -145,11 +136,14 @@ public class StorageGUI {
@Expose
@ConfigOption(
name = "Scroll to Backpack",
- desc = "Allow scrolling to the backpack using the mouse wheel. If you have the hotkey enabled (default: KEY_GRAVE), you can still use that"
+ desc = "Allow scrolling to the backpack using the mouse wheel.\n" +
+ "\"Scroll (Key)\" = Allow scrolling to 10th slot only while 'Backpack Scroll Key' (default: SHIFT) is pressed"
+ )
+ @ConfigEditorDropdown(
+ values = {"Scroll (Key)", "Scroll (Always)", "Don't Scroll"}
)
- @ConfigEditorBoolean
@ConfigAccordionId(id = 0)
- public boolean scrollToBackpack = false;
+ public int scrollToBackpack2 = 0;
@Expose
@ConfigOption(
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/overlays/OverlayManager.java b/src/main/java/io/github/moulberry/notenoughupdates/overlays/OverlayManager.java
index 64b27351..357815b7 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/overlays/OverlayManager.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/overlays/OverlayManager.java
@@ -2,7 +2,6 @@ package io.github.moulberry.notenoughupdates.overlays;
import com.google.common.collect.Lists;
import io.github.moulberry.notenoughupdates.NotEnoughUpdates;
-import io.github.moulberry.notenoughupdates.core.config.Position;
import io.github.moulberry.notenoughupdates.miscfeatures.PetInfoOverlay;
import java.util.ArrayList;
@@ -36,7 +35,7 @@ public class OverlayManager {
"\u00a73Experiments: \u00a7e3h38m");
textOverlays.add(timersOverlay = new TimersOverlay(NotEnoughUpdates.INSTANCE.config.miscOverlays.todoPosition, () -> {
List<String> strings = new ArrayList<>();
- for(int i : NotEnoughUpdates.INSTANCE.config.miscOverlays.todoText) {
+ for(int i : NotEnoughUpdates.INSTANCE.config.miscOverlays.todoText2) {
if(i >= 0 && i < todoDummy.size()) strings.add(todoDummy.get(i));
}
return strings;
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/overlays/TimersOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/overlays/TimersOverlay.java
index 05fc4a7e..e9338f94 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/overlays/TimersOverlay.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/overlays/TimersOverlay.java
@@ -1,7 +1,5 @@
package io.github.moulberry.notenoughupdates.overlays;
-import com.google.common.collect.ComparisonChain;
-import com.google.common.collect.Ordering;
import io.github.moulberry.notenoughupdates.NotEnoughUpdates;
import io.github.moulberry.notenoughupdates.core.config.Position;
import io.github.moulberry.notenoughupdates.options.NEUConfig;
@@ -9,21 +7,16 @@ import io.github.moulberry.notenoughupdates.util.SBInfo;
import io.github.moulberry.notenoughupdates.util.Utils;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.inventory.GuiChest;
-import net.minecraft.client.network.NetworkPlayerInfo;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.inventory.ContainerChest;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack;
-import net.minecraft.scoreboard.ScorePlayerTeam;
import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.world.WorldSettings;
import net.minecraftforge.client.event.ClientChatReceivedEvent;
import net.minecraftforge.fml.common.eventhandler.EventPriority;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
-import net.minecraftforge.fml.relauncher.Side;
-import net.minecraftforge.fml.relauncher.SideOnly;
import org.lwjgl.util.vector.Vector2f;
import java.time.ZoneId;
@@ -431,7 +424,7 @@ public class TimersOverlay extends TextOverlay {
}
overlayStrings = new ArrayList<>();
- for(int index : NotEnoughUpdates.INSTANCE.config.miscOverlays.todoText) {
+ for(int index : NotEnoughUpdates.INSTANCE.config.miscOverlays.todoText2) {
if(map.containsKey(index)) {
overlayStrings.add(map.get(index));
}