aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/me/Danker/TheMod.java
diff options
context:
space:
mode:
authorbowser0000 <bowser0000@gmail.com>2020-09-14 22:57:57 -0400
committerbowser0000 <bowser0000@gmail.com>2020-09-14 22:57:57 -0400
commit1e82de1cfd719c72f4c0c6ffc541fe6da5fad8ab (patch)
tree1dc3b0a395d80c74037a4101ba01265c4e7f4d43 /src/main/java/me/Danker/TheMod.java
parent3198b59936c0221b258fa6e97edaf33eed336ee7 (diff)
downloadSkyblockMod-1e82de1cfd719c72f4c0c6ffc541fe6da5fad8ab.tar.gz
SkyblockMod-1e82de1cfd719c72f4c0c6ffc541fe6da5fad8ab.tar.bz2
SkyblockMod-1e82de1cfd719c72f4c0c6ffc541fe6da5fad8ab.zip
Add expertise kills in fishing rod lore
Diffstat (limited to 'src/main/java/me/Danker/TheMod.java')
-rw-r--r--src/main/java/me/Danker/TheMod.java21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/main/java/me/Danker/TheMod.java b/src/main/java/me/Danker/TheMod.java
index 8769bd3..925b5df 100644
--- a/src/main/java/me/Danker/TheMod.java
+++ b/src/main/java/me/Danker/TheMod.java
@@ -53,6 +53,7 @@ import net.minecraft.inventory.ContainerChest;
import net.minecraft.inventory.IInventory;
import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.ChatComponentText;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.IChatComponent;
@@ -1636,11 +1637,31 @@ public class TheMod
final ToggleCommand tc = new ToggleCommand();
if (event.toolTip == null) return;
+
+ ItemStack item = event.itemStack;
if (tc.goldenToggled) {
for (int i = 0; i < event.toolTip.size(); i++) {
event.toolTip.set(i, Utils.returnGoldenEnchants(event.toolTip.get(i)));
}
}
+
+ if (tc.expertiseLoreToggled) {
+ if (item.hasTagCompound()) {
+ NBTTagCompound tags = item.getSubCompound("ExtraAttributes", false);
+ if (tags != null) {
+ if (tags.hasKey("expertise_kills")) {
+ int index = 4;
+ if (!Minecraft.getMinecraft().gameSettings.advancedItemTooltips) index -= 2;
+
+ event.toolTip.add(event.toolTip.size() - index, "");
+ event.toolTip.add(event.toolTip.size() - index, "Expertise Kills: " + EnumChatFormatting.RED + tags.getInteger("expertise_kills"));
+ if (Utils.expertiseKillsLeft(tags.getInteger("expertise_kills")) != -1) {
+ event.toolTip.add(event.toolTip.size() - index, Utils.expertiseKillsLeft(tags.getInteger("expertise_kills")) + " kills to tier up!");
+ }
+ }
+ }
+ }
+ }
}
@SubscribeEvent