diff options
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/SlotLocking.java | 9 | ||||
-rw-r--r-- | src/main/java/io/github/moulberry/notenoughupdates/miscgui/GuiItemCustomize.java | 1 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/SlotLocking.java b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/SlotLocking.java index 11351857..7f981092 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/SlotLocking.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/SlotLocking.java @@ -99,10 +99,11 @@ public class SlotLocking { public void changedSlot(int slotNumber){ int pingModifier = NotEnoughUpdates.INSTANCE.config.slotLocking.slotLockSwapDelay; if(pingModifier == 0){ return; }; + if(!isSlotIndexLocked(slotNumber)){ return;} long currentTimeMilis = System.currentTimeMillis(); for (int i = 0; i < slotChanges.length; i++) { - if(i != slotNumber && slotChanges[i] != 0 && slotChanges[i] < (currentTimeMilis+pingModifier)){ + if(i != slotNumber && slotChanges[i] != 0 && (slotChanges[i] + (long) pingModifier) > currentTimeMilis){ slotChanges[i] = 0; } } @@ -115,10 +116,8 @@ public class SlotLocking { long currentTimeMilis = System.currentTimeMillis(); for (int i = 0; i < slotChanges.length; i++) { - if(slotChanges[i] != 0 && slotChanges[i] < (currentTimeMilis+pingModifier)){ - if(isSlotIndexLocked(i)){ - return true; - } + if (slotChanges[i] != 0 && isSlotIndexLocked(i) && (slotChanges[i] + (long) pingModifier) > currentTimeMilis) { + return true; } } return false; diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/GuiItemCustomize.java b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/GuiItemCustomize.java index 21d1018d..07f1340d 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/GuiItemCustomize.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/GuiItemCustomize.java @@ -215,6 +215,7 @@ public class GuiItemCustomize extends GuiScreen { EnumChatFormatting.LIGHT_PURPLE+"\u00B6d = Purple", EnumChatFormatting.YELLOW+"\u00B6e = Yellow", EnumChatFormatting.WHITE+"\u00B6f = White", + "\u00A7Z\u00B6Z = SBA Chroma"+EnumChatFormatting.RESET+EnumChatFormatting.GRAY+" (Requires SBA)", "", EnumChatFormatting.GREEN+"Available formatting codes:", EnumChatFormatting.GRAY+"\u00B6k = "+EnumChatFormatting.OBFUSCATED+"Obfuscated", |