diff options
author | CuzImClicks <bruno778.whiteelfie@gmail.com> | 2021-03-14 04:42:48 +0100 |
---|---|---|
committer | CuzImClicks <bruno778.whiteelfie@gmail.com> | 2021-03-14 04:42:48 +0100 |
commit | 740d6b33cb227ea0e2699e1bc24003463ec28d52 (patch) | |
tree | 56ed52617532dc7a7a05eacff908b5749d8d32db | |
parent | 22f9a760f373cfbedb542e02b08ebf15bc4dfb10 (diff) | |
download | SkyblockMod-740d6b33cb227ea0e2699e1bc24003463ec28d52.tar.gz SkyblockMod-740d6b33cb227ea0e2699e1bc24003463ec28d52.tar.bz2 SkyblockMod-740d6b33cb227ea0e2699e1bc24003463ec28d52.zip |
performance improvement and config
-rw-r--r-- | src/main/java/me/Danker/features/ArachneESP.java | 3 | ||||
-rw-r--r-- | src/main/java/me/Danker/features/SlayerESP.java | 38 | ||||
-rw-r--r-- | src/main/java/me/Danker/handlers/ConfigHandler.java | 1 |
3 files changed, 20 insertions, 22 deletions
diff --git a/src/main/java/me/Danker/features/ArachneESP.java b/src/main/java/me/Danker/features/ArachneESP.java index 4ce7ff3..6187eed 100644 --- a/src/main/java/me/Danker/features/ArachneESP.java +++ b/src/main/java/me/Danker/features/ArachneESP.java @@ -62,10 +62,9 @@ public class ArachneESP { List<Entity> entities = world.getLoadedEntityList(); List<String> scoreboard = ScoreboardHandler.getSidebarLines(); - //if (!isSpidersDen(scoreboard)) return; + if (!isSpidersDen(scoreboard)) return; if (!arachneActive) return; for (Entity e : entities) { - System.out.println(e.getName()); if (e.getName().contains("Arachne") && !e.getName().contains("Arachne's Brood")) { arachne = e; } diff --git a/src/main/java/me/Danker/features/SlayerESP.java b/src/main/java/me/Danker/features/SlayerESP.java index ff53b7e..5628dcc 100644 --- a/src/main/java/me/Danker/features/SlayerESP.java +++ b/src/main/java/me/Danker/features/SlayerESP.java @@ -6,6 +6,7 @@ import me.Danker.handlers.ScoreboardHandler; import me.Danker.utils.Utils; import net.minecraft.client.Minecraft; import net.minecraft.entity.Entity; +import net.minecraft.entity.item.EntityArmorStand; import net.minecraft.entity.monster.EntitySpider; import net.minecraft.entity.monster.EntityZombie; import net.minecraft.entity.passive.EntityWolf; @@ -45,32 +46,29 @@ public class SlayerESP { @SubscribeEvent public void onTick(TickEvent.ClientTickEvent event) { - //if (!Utils.inSkyblock) return; + if (!Utils.inSkyblock) return; if (event.phase != TickEvent.Phase.START) return; World world = Minecraft.getMinecraft().theWorld; + if (world == null) return; if (DankersSkyblockMod.tickAmount % 2 == 0 && ToggleCommand.highlightSlayers) { - if (world != null) { - for (String line : ScoreboardHandler.getSidebarLines()) { + for (String line : ScoreboardHandler.getSidebarLines()) { - String cleanedLine = ScoreboardHandler.cleanSB(line); - if (cleanedLine.contains("Slay the boss!")) { - slayerActive = true; - break; - } + String cleanedLine = ScoreboardHandler.cleanSB(line); + if (cleanedLine.contains("Slay the boss!")) { + slayerActive = true; + break; } - if (!slayerActive) return; - List<Entity> entities = world.getLoadedEntityList(); - for (Entity e : entities) { - System.out.println(e.getName()); - if (e.getName().contains("Revenant Horror")) { - zombie = e; - } else if (e.getName().contains("Tarantula Broodfather")) { - spider = e; - } else if (e.getName().contains("Sven Packmaster")) { - wolf = e; - } - + } + if (!slayerActive) return; + List<Entity> entities = world.getLoadedEntityList(); + for (Entity e : entities) { + if (e.getName().contains("Revenant Horror")) { + zombie = e; + } else if (e.getName().contains("Tarantula Broodfather")) { + spider = e; + } else if (e.getName().contains("Sven Packmaster")) { + wolf = e; } } } diff --git a/src/main/java/me/Danker/handlers/ConfigHandler.java b/src/main/java/me/Danker/handlers/ConfigHandler.java index 3b08e94..dc43dca 100644 --- a/src/main/java/me/Danker/handlers/ConfigHandler.java +++ b/src/main/java/me/Danker/handlers/ConfigHandler.java @@ -231,6 +231,7 @@ public class ConfigHandler { ToggleCommand.specialHoeRightClick = initBoolean("toggles", "SpecialHoe", false); ToggleCommand.melodyTooltips = initBoolean("toggles", "MelodyTooltips", false); ToggleCommand.highlightSlayers = initBoolean("toggles", "HighlightSlayers", false); + ToggleCommand.highlightArachne = initBoolean("toggles", "HighlightArachne", false); // Chat Messages ToggleCommand.sceptreMessages = initBoolean("toggles", "SceptreMessages", true); ToggleCommand.midasStaffMessages = initBoolean("toggles", "MidasStaffMessages", true); |