mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-12 23:37:32 +00:00
Fix Compass Hud Crash
This commit is contained in:
1 parent
7a9e8e22f3
commit
d4940f1208
1 file changed
+10
-1
@@ -142,11 +142,20 @@ public class ClientTickHandler{
|
||||
Minecraft mc = Minecraft.getMinecraft();
|
||||
EntityPlayer player = mc.thePlayer;
|
||||
|
||||
if(player == null || mc.theWorld == null)
|
||||
return;
|
||||
|
||||
if(ClientHudManager.getInstance() == null || ClientHudManager.getInstance().getHudComponents() == null)
|
||||
return;
|
||||
|
||||
// Update compass
|
||||
HudComponent compass = ClientHudManager.getInstance()
|
||||
.getHudComponents().get(EnumHudComponent.QuestCompass);
|
||||
|
||||
if(!compass.enabled || mc.thePlayer == null)
|
||||
if(!(compass instanceof CompassHudComponent))
|
||||
return;
|
||||
|
||||
if(!compass.enabled)
|
||||
return;
|
||||
|
||||
ArrayList<CompassHudComponent.MarkTargetEntry> marks = new ArrayList<>();
|
||||
|
||||
Reference in new issue
Block a user