add ability to hide npc by index value - andrewterra
This commit is contained in:
@@ -88,6 +88,9 @@ public abstract class EntityHiderBridgeMixin implements RSClient
|
||||
@Inject
|
||||
public static Set<Integer> blacklistDeadNpcs = new HashSet<>();
|
||||
|
||||
@Inject
|
||||
public static List<Integer> hiddenNpcIndices = new ArrayList<>();
|
||||
|
||||
@Inject
|
||||
@Override
|
||||
public void setIsHidingEntities(boolean state)
|
||||
@@ -264,4 +267,18 @@ public abstract class EntityHiderBridgeMixin implements RSClient
|
||||
{
|
||||
hideDeadNPCs = state;
|
||||
}
|
||||
|
||||
@Inject
|
||||
@Override
|
||||
public void setHiddenNpcIndices(List<Integer> npcIndices)
|
||||
{
|
||||
hiddenNpcIndices = npcIndices;
|
||||
}
|
||||
|
||||
@Inject
|
||||
@Override
|
||||
public List<Integer> getHiddenNpcIndices()
|
||||
{
|
||||
return hiddenNpcIndices;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -99,6 +99,9 @@ public abstract class EntityHiderMixin implements RSScene
|
||||
@Shadow("hideDeadNPCs")
|
||||
private static boolean hideDeadNPCs;
|
||||
|
||||
@Shadow("hiddenNpcIndices")
|
||||
private static List<Integer> hiddenNpcIndices;
|
||||
|
||||
@Copy("newGameObject")
|
||||
@Replace("newGameObject")
|
||||
boolean copy$addEntityMarker(int var1, int var2, int var3, int var4, int var5, int x, int y, int var8, RSRenderable entity, int var10, boolean var11, long var12, int var13)
|
||||
@@ -213,6 +216,14 @@ public abstract class EntityHiderMixin implements RSScene
|
||||
return false;
|
||||
}
|
||||
|
||||
for (Integer index : hiddenNpcIndices)
|
||||
{
|
||||
if (index != null && npc.getIndex() == index)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return drawingUI ? !hideNPCs2D : !hideNPCs;
|
||||
}
|
||||
else if (entity instanceof RSProjectile)
|
||||
|
||||
Reference in New Issue
Block a user