aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMy-Name-Is-Jeff <37018278+My-Name-Is-Jeff@users.noreply.github.com>2020-12-13 14:40:43 -0500
committerMy-Name-Is-Jeff <37018278+My-Name-Is-Jeff@users.noreply.github.com>2020-12-13 14:40:43 -0500
commitc302e2b7ed4dd4d949f9ccff0536be8aa33e4ce8 (patch)
tree3786e36cf8c7bf08382774c77f9518bce9169ad3
parentf4e0781601e2a55bfdb6da74fbe2fe07193890c1 (diff)
downloadSkyblockMod-c302e2b7ed4dd4d949f9ccff0536be8aa33e4ce8.tar.gz
SkyblockMod-c302e2b7ed4dd4d949f9ccff0536be8aa33e4ce8.tar.bz2
SkyblockMod-c302e2b7ed4dd4d949f9ccff0536be8aa33e4ce8.zip
Fixed a swapped order
-rw-r--r--src/main/java/me/Danker/DankersSkyblockMod.java9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/main/java/me/Danker/DankersSkyblockMod.java b/src/main/java/me/Danker/DankersSkyblockMod.java
index ad5106f..982ed0d 100644
--- a/src/main/java/me/Danker/DankersSkyblockMod.java
+++ b/src/main/java/me/Danker/DankersSkyblockMod.java
@@ -3060,12 +3060,12 @@ public class DankersSkyblockMod
int slotIndex = mouseSlot.getSlotIndex();
- if(slotIndex % 9 != 0 && slotIndex != 53) {
+ if(slotIndex % 9 != 8 && slotIndex != 53) {
ItemStack itemStack = inventory.getStackInSlot(slotIndex + 1);
if(itemStack != null && itemStack.getItemDamage() == 5) isValid = true;
}
- if(!isValid && slotIndex % 9 != 8 && slotIndex != 0) {
+ if(!isValid && slotIndex % 9 != 0 && slotIndex != 0) {
ItemStack itemStack = inventory.getStackInSlot(slotIndex - 1);
if(itemStack != null && itemStack.getItemDamage() == 5) isValid = true;
}
@@ -3092,14 +3092,13 @@ public class DankersSkyblockMod
shouldCancel = true;
break;
}
- int needed = 0;
+ int needed = -1;
for(int i = 10; i <= 25; i++) {
if(i == 17 || i == 18) continue;
ItemStack itemStack = inventory.getStackInSlot(i);
- if(!itemStack.getDisplayName().contains(EnumChatFormatting.GREEN.toString())) continue;
if(itemStack.stackSize > needed) needed = itemStack.stackSize;
}
- shouldCancel = item.stackSize != needed;
+ shouldCancel = needed != -1 && item.stackSize != needed ;
break;
}