mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-13 20:44:08 +00:00
Fix Effective Scaling
This commit is contained in:
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);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user