aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/me/Danker/utils
diff options
context:
space:
mode:
authorbowser0000 <bowser0000@gmail.com>2020-08-13 00:35:14 -0400
committerbowser0000 <bowser0000@gmail.com>2020-08-13 00:35:14 -0400
commit72eb6d8b5df4c86fbf5fb63eb3edae0f8c7e14d8 (patch)
tree209f0ef1cf898e512891bdee997a901e72148b6a /src/main/java/me/Danker/utils
parentb93db28ffa5fb44bbf3af350b11adf4b77b75b60 (diff)
downloadSkyblockMod-72eb6d8b5df4c86fbf5fb63eb3edae0f8c7e14d8.tar.gz
SkyblockMod-72eb6d8b5df4c86fbf5fb63eb3edae0f8c7e14d8.tar.bz2
SkyblockMod-72eb6d8b5df4c86fbf5fb63eb3edae0f8c7e14d8.zip
Add chat maddox menu and dungeons tracker
Don't have strings for Spirit Bone, Spirit Boots or Spirit Pet. Hoping that Spirit Pet tracking works.
Diffstat (limited to 'src/main/java/me/Danker/utils')
-rw-r--r--src/main/java/me/Danker/utils/Utils.java20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/main/java/me/Danker/utils/Utils.java b/src/main/java/me/Danker/utils/Utils.java
index 4749305..5dc30c6 100644
--- a/src/main/java/me/Danker/utils/Utils.java
+++ b/src/main/java/me/Danker/utils/Utils.java
@@ -5,17 +5,20 @@ import java.util.List;
import java.util.regex.Matcher;
import me.Danker.TheMod;
+import me.Danker.handlers.ScoreboardHandler;
import me.Danker.handlers.TextRenderer;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.ScaledResolution;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.scoreboard.ScoreObjective;
import net.minecraft.util.AxisAlignedBB;
-import net.minecraft.util.ChatComponentText;
import net.minecraft.util.StringUtils;
public class Utils {
+ public static boolean inSkyblock = false;
+
public static int getItems(String item) {
Minecraft mc = Minecraft.getMinecraft();
EntityPlayer player = mc.thePlayer;
@@ -85,4 +88,19 @@ public class Utils {
new TextRenderer(mc, text, titleX, titleY, scale);
}
+ public static void checkForSkyblock() {
+ Minecraft mc = Minecraft.getMinecraft();
+ if (mc != null && mc.theWorld != null && !mc.isSingleplayer()) {
+ ScoreObjective scoreboardObj = mc.theWorld.getScoreboard().getObjectiveInDisplaySlot(1);
+ if (scoreboardObj != null) {
+ String scObjName = ScoreboardHandler.cleanSB(scoreboardObj.getDisplayName());
+ if (scObjName.contains("SKYBLOCK")) {
+ inSkyblock = true;
+ return;
+ }
+ }
+ }
+ inSkyblock = false;
+ }
+
}