From c302e2b7ed4dd4d949f9ccff0536be8aa33e4ce8 Mon Sep 17 00:00:00 2001 From: My-Name-Is-Jeff <37018278+My-Name-Is-Jeff@users.noreply.github.com> Date: Sun, 13 Dec 2020 14:40:43 -0500 Subject: Fixed a swapped order --- src/main/java/me/Danker/DankersSkyblockMod.java | 9 ++++----- 1 file 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; } -- cgit