aboutsummaryrefslogtreecommitdiff
path: root/mod
diff options
context:
space:
mode:
authorsyeyoung <42869671+cyoung06@users.noreply.github.com>2023-02-27 15:15:44 +0900
committerGitHub <noreply@github.com>2023-02-27 15:15:44 +0900
commiteaa2b8412f96b7492982810122c51c39659d011a (patch)
treea56dc136f672aaf2c274f4b457987124dfb8f2de /mod
parent6b41f58518616c5be8eaadda4ca28e4895bf1399 (diff)
downloadSkyblock-Dungeons-Guide-eaa2b8412f96b7492982810122c51c39659d011a.tar.gz
Skyblock-Dungeons-Guide-eaa2b8412f96b7492982810122c51c39659d011a.tar.bz2
Skyblock-Dungeons-Guide-eaa2b8412f96b7492982810122c51c39659d011a.zip
Skyblock dungeons guide 345 (#347)
* - Fix #345, DG unload incompatibility with essential due to "thePlayer" not being EntityPlayerSP but some kind of wierd player emulated by Essential - Fix unloading error mentioned in #345, JarLoader popping ProgressBar that doesn't exist Signed-off-by: syeyoung <cyoung06@naver.com> * - Additional Checks on EntityPlayerSP Signed-off-by: syeyoung <cyoung06@naver.com> --------- Signed-off-by: syeyoung <cyoung06@naver.com>
Diffstat (limited to 'mod')
-rwxr-xr-xmod/src/main/java/kr/syeyoung/dungeonsguide/mod/DungeonsGuide.java9
1 files changed, 6 insertions, 3 deletions
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/DungeonsGuide.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/DungeonsGuide.java
index f4ec6ec0..c55d21cd 100755
--- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/DungeonsGuide.java
+++ b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/DungeonsGuide.java
@@ -343,8 +343,10 @@ public class DungeonsGuide implements DGInterface {
if (packetInjector != null) packetInjector.cleanup();
try {
- EntityPlayerSP ep = (EntityPlayerSP) Minecraft.getMinecraft().getRenderManager().livingPlayer;
- transform(ep);
+ if (Minecraft.getMinecraft().getRenderManager().livingPlayer instanceof AbstractClientPlayer) {
+ AbstractClientPlayer ep = (AbstractClientPlayer) Minecraft.getMinecraft().getRenderManager().livingPlayer;
+ transform(ep);
+ }
} catch (Exception e) {
e.printStackTrace();
}
@@ -358,7 +360,8 @@ public class DungeonsGuide implements DGInterface {
e.printStackTrace();
}
NetHandlerPlayClient netHandlerPlayClient = Minecraft.getMinecraft().getNetHandler();
- if (netHandlerPlayClient == null && (Minecraft.getMinecraft().getRenderManager().livingPlayer) != null)
+ if (netHandlerPlayClient == null && (Minecraft.getMinecraft().getRenderManager().livingPlayer) != null
+ && Minecraft.getMinecraft().getRenderManager().livingPlayer instanceof EntityPlayerSP)
netHandlerPlayClient = ((EntityPlayerSP) Minecraft.getMinecraft().getRenderManager().livingPlayer).sendQueue;
if (netHandlerPlayClient != null) {