Fix Effective Scaling

This commit is contained in:
Kam committed 2025-02-23 15:38:42 -05:00
1 parent 84b07f4f6f
commit 3e23893e78
5 files changed
+162 -53

No files matched your search

@@ -141,6 +141,14 @@ public class ClientTickHandler{
private void updateCompassMarks() {
Minecraft mc = Minecraft.getMinecraft();
EntityPlayer player = mc.thePlayer;
// Update compass
HudComponent compass = ClientHudManager.getInstance()
.getHudComponents().get(EnumHudComponent.QuestCompass);
if(!compass.enabled || mc.thePlayer == null)
return;
ArrayList<CompassHudComponent.MarkTargetEntry> marks = new ArrayList<>();
// Scan entities in loaded chunks
@@ -148,6 +156,9 @@ public class ClientTickHandler{
if(entity instanceof EntityNPCInterface) {
EntityNPCInterface npc = (EntityNPCInterface) entity;
if(npc.dimension != player.dimension)
continue;
// Check distance
if(player.getDistanceToEntity(npc) > SCAN_RANGE)
continue;
@@ -169,11 +180,6 @@ public class ClientTickHandler{
}
}
// Update compass
HudComponent compass = ClientHudManager.getInstance()
.getHudComponents().get(EnumHudComponent.QuestCompass);
if(compass != null) {
((CompassHudComponent) compass).updateMarkTargets(marks);
}
((CompassHudComponent) compass).updateMarkTargets(marks);
}
}