aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/me
diff options
context:
space:
mode:
authorMy-Name-Is-Jeff <37018278+My-Name-Is-Jeff@users.noreply.github.com>2020-12-15 23:35:34 -0500
committerMy-Name-Is-Jeff <37018278+My-Name-Is-Jeff@users.noreply.github.com>2020-12-15 23:35:34 -0500
commit68d5bf758118f07b006c4e333259b014b1954b5d (patch)
treebdbe664ab9d33ba4bf32aef2559998f0fec75a6a /src/main/java/me
parent31a53cbc4933c2a3b8ec11d4f55a67e42a4942ce (diff)
downloadSkyblockMod-68d5bf758118f07b006c4e333259b014b1954b5d.tar.gz
SkyblockMod-68d5bf758118f07b006c4e333259b014b1954b5d.tar.bz2
SkyblockMod-68d5bf758118f07b006c4e333259b014b1954b5d.zip
Add a message if OldAnimationsMod is detected
Diffstat (limited to 'src/main/java/me')
-rw-r--r--src/main/java/me/Danker/DankersSkyblockMod.java31
1 files changed, 29 insertions, 2 deletions
diff --git a/src/main/java/me/Danker/DankersSkyblockMod.java b/src/main/java/me/Danker/DankersSkyblockMod.java
index 87fdd23..a1b9b2a 100644
--- a/src/main/java/me/Danker/DankersSkyblockMod.java
+++ b/src/main/java/me/Danker/DankersSkyblockMod.java
@@ -7,7 +7,6 @@ import me.Danker.handlers.*;
import me.Danker.utils.TicTacToeUtils;
import me.Danker.utils.Utils;
import net.minecraft.block.Block;
-import net.minecraft.block.state.BlockState;
import net.minecraft.block.state.IBlockState;
import net.minecraft.client.Minecraft;
import net.minecraft.client.entity.EntityPlayerSP;
@@ -101,6 +100,7 @@ public class DankersSkyblockMod
static double lastMaddoxTime = 0;
static KeyBinding[] keyBindings = new KeyBinding[2];
static boolean usingLabymod = false;
+ static boolean usingSpiderFrogOldAnimationsMod = false;
public static String guiToOpen = null;
static boolean foundLivid = false;
static Entity livid = null;
@@ -310,6 +310,13 @@ public class DankersSkyblockMod
public void postInit(final FMLPostInitializationEvent event) {
usingLabymod = Loader.isModLoaded("labymod");
System.out.println("LabyMod detection: " + usingLabymod);
+ try {
+ Class clazz = Class.forName("com.spiderfrog.oldanimations.OldAnimationsMod");
+ usingSpiderFrogOldAnimationsMod = true;
+ } catch (Exception var1) {
+ usingSpiderFrogOldAnimationsMod = false;
+ }
+ System.out.println("OldAnimationsMod detection: " + usingSpiderFrogOldAnimationsMod);
}
// Update checker
@@ -317,7 +324,27 @@ public class DankersSkyblockMod
public void onJoin(EntityJoinWorldEvent event) {
if (!updateChecked) {
updateChecked = true;
-
+
+ if (usingSpiderFrogOldAnimationsMod) {
+ new Thread(()->{
+ while (true) {
+ if (Minecraft.getMinecraft().thePlayer == null) {
+ try {
+ Thread.sleep(500);
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ } else {
+ Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText(EnumChatFormatting.RED +
+ "You are using spiderfrog's OldAnimationsMod.\n" +
+ "Danker's Skyblock Mod is incompatible with OldAnimationsMod.\n" +
+ "Please remove OldAnimationsMod or you may experience crashes or other issues."));
+ break;
+ }
+ }
+ }).start();
+ }
+
// MULTI THREAD DRIFTING
new Thread(() -> {
EntityPlayer player = Minecraft.getMinecraft().thePlayer;