entityhider: Pets entity hider & isFollower (#2094)
This commit is contained in:
@@ -62,6 +62,9 @@ public abstract class EntityHiderBridgeMixin implements RSClient
|
||||
@Inject
|
||||
public static boolean hideNPCs2D;
|
||||
|
||||
@Inject
|
||||
public static boolean hidePets;
|
||||
|
||||
@Inject
|
||||
public static boolean hideAttackers;
|
||||
|
||||
@@ -222,6 +225,13 @@ public abstract class EntityHiderBridgeMixin implements RSClient
|
||||
hideSpecificPlayers = players;
|
||||
}
|
||||
|
||||
@Inject
|
||||
@Override
|
||||
public void setPetsHidden(boolean state)
|
||||
{
|
||||
hidePets = state;
|
||||
}
|
||||
|
||||
@Inject
|
||||
@Override
|
||||
public void setAttackersHidden(boolean state)
|
||||
|
||||
@@ -83,6 +83,9 @@ public abstract class EntityHiderMixin implements RSScene
|
||||
@Shadow("hideNPCs2D")
|
||||
private static boolean hideNPCs2D;
|
||||
|
||||
@Shadow("hidePets")
|
||||
private static boolean hidePets;
|
||||
|
||||
@Shadow("hideAttackers")
|
||||
private static boolean hideAttackers;
|
||||
|
||||
@@ -188,6 +191,14 @@ public abstract class EntityHiderMixin implements RSScene
|
||||
}
|
||||
}
|
||||
|
||||
if (hidePets)
|
||||
{
|
||||
if (npc.getDefinition().isFollower())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (hideDeadNPCs && npc.getHealthRatio() == 0)
|
||||
{
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user