-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
LoreLocator - Now properly highlights armor with stacked protection e…
…nchants. Also adjusted the default highlight color.
- Loading branch information
Showing
1 changed file
with
7 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,7 +22,6 @@ | |
import meteordevelopment.meteorclient.systems.modules.Module; | ||
import meteordevelopment.meteorclient.utils.render.color.SettingColor; | ||
|
||
|
||
/** | ||
* @author Tas [0xTas] <[email protected]> | ||
**/ | ||
|
@@ -118,7 +117,7 @@ public class LoreLocator extends Module { | |
public final Setting<SettingColor> color = settings.getDefaultGroup().add( | ||
new ColorSetting.Builder() | ||
.name("Highlight Color") | ||
.defaultValue(new SettingColor(69, 200, 255, 169)) | ||
.defaultValue(new SettingColor(138, 71, 221, 69)) | ||
.build() | ||
); | ||
|
||
|
@@ -206,6 +205,7 @@ public boolean shouldHighlightSlot(ItemStack stack) { | |
|
||
boolean hasMending = false; | ||
boolean hasInfinity = false; | ||
boolean hasProtection = false; | ||
HashMap<Enchantment, Integer> dupes = new HashMap<>(); | ||
for (int n = 0; n < nbt.size(); n++) { | ||
if (hasMending && hasInfinity) break; | ||
|
@@ -214,6 +214,11 @@ public boolean shouldHighlightSlot(ItemStack stack) { | |
if (enchant == null) return true; | ||
if (enchant == Enchantments.MENDING) hasMending = true; | ||
if (enchant == Enchantments.INFINITY) hasInfinity = true; | ||
if (enchant == Enchantments.PROTECTION || enchant == Enchantments.PROJECTILE_PROTECTION | ||
|| enchant == Enchantments.BLAST_PROTECTION || enchant == Enchantments.FIRE_PROTECTION) { | ||
if (!hasProtection) hasProtection = true; | ||
else return true; | ||
} | ||
|
||
if (dupes.containsKey(enchant)) { | ||
dupes.put(enchant, dupes.get(enchant) + 1); | ||
|