From aeb8efcbaa5da7c1d25a82ebaf4af06a8ff34a18 Mon Sep 17 00:00:00 2001 From: bowser0000 Date: Sat, 28 Nov 2020 20:09:01 -0500 Subject: Add myth tracker to auto display --- src/main/java/me/Danker/TheMod.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/main/java') diff --git a/src/main/java/me/Danker/TheMod.java b/src/main/java/me/Danker/TheMod.java index e07d4f1..ef8d8e2 100644 --- a/src/main/java/me/Danker/TheMod.java +++ b/src/main/java/me/Danker/TheMod.java @@ -2303,7 +2303,7 @@ public class TheMod Utils.checkForDungeons(); } - if (DisplayCommand.auto && mc != null && world != null) { + if (DisplayCommand.auto && mc != null && world != null && player != null) { List scoreboard = ScoreboardHandler.getSidebarLines(); boolean found = false; for (String s : scoreboard) { @@ -2336,6 +2336,14 @@ public class TheMod found = true; } } + for (int i = 0; i < 8; i++) { + ItemStack hotbarItem = player.inventory.getStackInSlot(i); + if (hotbarItem == null) continue; + if (hotbarItem.getDisplayName().contains("Ancestral Spade")) { + DisplayCommand.display = "mythological"; + found = true; + } + } if (!found) DisplayCommand.display = "off"; ConfigHandler.writeStringConfig("misc", "display", DisplayCommand.display); } -- cgit