From e39dbceda13ee51064c893fe42a2a2856559940b Mon Sep 17 00:00:00 2001 From: bowser0000 Date: Wed, 5 May 2021 18:32:30 -0400 Subject: Add fishing to auto display --- src/main/java/me/Danker/features/AutoDisplay.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/main/java/me') diff --git a/src/main/java/me/Danker/features/AutoDisplay.java b/src/main/java/me/Danker/features/AutoDisplay.java index 182c0b4..783c428 100644 --- a/src/main/java/me/Danker/features/AutoDisplay.java +++ b/src/main/java/me/Danker/features/AutoDisplay.java @@ -6,6 +6,8 @@ import me.Danker.handlers.ConfigHandler; import me.Danker.handlers.ScoreboardHandler; import net.minecraft.client.Minecraft; import net.minecraft.client.entity.EntityPlayerSP; +import net.minecraft.client.settings.GameSettings; +import net.minecraft.init.Items; import net.minecraft.item.ItemStack; import net.minecraft.world.World; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; @@ -65,6 +67,16 @@ public class AutoDisplay { if (hotbarItem.getDisplayName().contains("Ancestral Spade")) { LootDisplay.display = "mythological"; found = true; + break; + } else if (hotbarItem.getItem() == Items.fishing_rod) { + List lore = hotbarItem.getTooltip(player, mc.gameSettings.advancedItemTooltips); + for (int j = lore.size() - 1; j >= 0; j--) { // reverse + if (lore.get(j).contains("FISHING ROD")) { + LootDisplay.display = "fishing"; + found = true; + break; + } + } } } if (!found) LootDisplay.display = "off"; -- cgit