aboutsummaryrefslogtreecommitdiff
path: root/src
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 /src
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
Diffstat (limited to 'src')
-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
2 files changed, 22 insertions, 1 deletions
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");