aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDoKM <mcazzyman@gmail.com>2021-08-16 15:11:39 +0200
committerDoKM <mcazzyman@gmail.com>2021-08-16 15:11:39 +0200
commit990d5523721f1b2c6206ac4cff30fe56987faa0f (patch)
tree3a101d6a6532bad6aab288e237d78ff603be1c7a
parentdfa28718b54de915bb823eea54313b40842c1ce9 (diff)
downloadNotEnoughUpdates-990d5523721f1b2c6206ac4cff30fe56987faa0f.tar.gz
NotEnoughUpdates-990d5523721f1b2c6206ac4cff30fe56987faa0f.tar.bz2
NotEnoughUpdates-990d5523721f1b2c6206ac4cff30fe56987faa0f.zip
Fix Neubuttons and accessory bag icon overlap
also update the change log
-rw-r--r--Update Notes/2.0-Pre31.md3
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/NEUEventListener.java15
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscgui/AccessoryBagOverlay.java8
3 files changed, 25 insertions, 1 deletions
diff --git a/Update Notes/2.0-Pre31.md b/Update Notes/2.0-Pre31.md
index 02da8b18..bba18209 100644
--- a/Update Notes/2.0-Pre31.md
+++ b/Update Notes/2.0-Pre31.md
@@ -25,6 +25,7 @@
- Added toggle to prismapump overlay.
- Added load from/copy to clipboard and reset config buttons to neuec gui.
- Added load from/copy to clipboard to neu inventory buttons gui.
+- Added SBA chroma support to neuec.
### **Bug Fixes**
- Fishing helper not showing "!" when rod colours are disabled.
@@ -49,6 +50,7 @@
- Fixed dungeon map appearing in boss room while holding bow (will be gone after switching from bow to another item).
- Fixed dwarven mines waypoints not working if dwarven mines overlay was disabled.
- Fixed being able to slot lock the 9th slot.
+- Fixed NEUButtons overlapping with the Accessory Bag overlay by moving the overlapping icons to the right of the overlay. (should work pretty well, too lazy to test with custom button positions but should work fine.)
### **Other**
@@ -67,4 +69,5 @@
- Disabled middle click search when searchbar is disabled.
- Disabled tutorial command.
- Disabled gamemodes command.
+- Changed first time message to open /neuhelp instead of tutorial.
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/NEUEventListener.java b/src/main/java/io/github/moulberry/notenoughupdates/NEUEventListener.java
index 0933c1a7..6ebcc04f 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/NEUEventListener.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/NEUEventListener.java
@@ -1003,6 +1003,11 @@ public class NEUEventListener {
if(button.anchorBottom) {
y += ySize;
}
+ if(AccessoryBagOverlay.isInAccessoryBag()){
+ if(x > guiLeft + xSize && x < guiLeft + xSize + 80 + 28+ 5 && y > guiTop-18 && y < guiTop + 150){
+ x += 80+28;
+ }
+ }
GlStateManager.color(1, 1, 1, 1f);
@@ -1105,6 +1110,11 @@ public class NEUEventListener {
if(button.anchorBottom) {
y += ySize;
}
+ if(AccessoryBagOverlay.isInAccessoryBag()){
+ if(x > guiLeft + xSize && x < guiLeft + xSize + 80 + 28+ 5 && y > guiTop-18 && y < guiTop + 150){
+ x += 80+28;
+ }
+ }
if(x-guiLeft >= 85 && x-guiLeft <= 115 && y-guiTop >= 4 && y-guiTop <= 25) {
disableCraftingText = true;
@@ -1430,6 +1440,11 @@ public class NEUEventListener {
if(button.anchorBottom) {
y += ySize;
}
+ if(AccessoryBagOverlay.isInAccessoryBag()){
+ if(x > guiLeft + xSize && x < guiLeft + xSize + 80 + 28+ 5 && y > guiTop-18 && y < guiTop + 150){
+ x += 80+28;
+ }
+ }
if(mouseX >= x && mouseX <= x+18 && mouseY >= y && mouseY <= y+18) {
if(Minecraft.getMinecraft().thePlayer.inventory.getItemStack() == null) {
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/AccessoryBagOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/AccessoryBagOverlay.java
index b2d301a6..728d4478 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/AccessoryBagOverlay.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/AccessoryBagOverlay.java
@@ -582,13 +582,19 @@ public class AccessoryBagOverlay {
return o1.compareTo(o2);
};
}
+ private static boolean inAccessoryBag = false;
+ public static boolean isInAccessoryBag(){
+ return inAccessoryBag;
+ }
- public static void renderOverlay() {
+ public static void renderOverlay() {
+ inAccessoryBag = false;
if(Minecraft.getMinecraft().currentScreen instanceof GuiChest && NEUEventListener.inventoryLoaded) {
GuiChest eventGui = (GuiChest) Minecraft.getMinecraft().currentScreen;
ContainerChest cc = (ContainerChest) eventGui.inventorySlots;
String containerName = cc.getLowerChestInventory().getDisplayName().getUnformattedText();
if(containerName.trim().startsWith("Accessory Bag")) {
+ inAccessoryBag = true;
try {
int xSize = (int) Utils.getField(GuiContainer.class, eventGui, "xSize", "field_146999_f");
int ySize = (int) Utils.getField(GuiContainer.class, eventGui, "ySize", "field_147000_g");