diff options
author | bowser0000 <bowser0000@gmail.com> | 2021-05-05 18:32:30 -0400 |
---|---|---|
committer | bowser0000 <bowser0000@gmail.com> | 2021-05-05 18:32:30 -0400 |
commit | e39dbceda13ee51064c893fe42a2a2856559940b (patch) | |
tree | ee4400105870ece7a2e5ea29b8b7f89d8b0e85bf /src/main/java | |
parent | 8cf11c262ec7c2ba89365671c1434799f862faa7 (diff) | |
download | SkyblockMod-e39dbceda13ee51064c893fe42a2a2856559940b.tar.gz SkyblockMod-e39dbceda13ee51064c893fe42a2a2856559940b.tar.bz2 SkyblockMod-e39dbceda13ee51064c893fe42a2a2856559940b.zip |
Add fishing to auto display
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/me/Danker/features/AutoDisplay.java | 12 |
1 files changed, 12 insertions, 0 deletions
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<String> 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"; |