Remove duplicates from object queries

This commit is contained in:
Devin
2017-11-04 12:18:32 -07:00
parent 752546b9d0
commit 17c7ba7d50
4 changed files with 4 additions and 0 deletions

View File

@@ -40,6 +40,7 @@ public class DecorativeObjectQuery extends TileObjectQuery<DecorativeObject, Dec
return getDecorativeObjects(client).stream()
.filter(Objects::nonNull)
.filter(predicate)
.distinct()
.toArray(DecorativeObject[]::new);
}

View File

@@ -41,6 +41,7 @@ public class GameObjectQuery extends TileObjectQuery<GameObject, GameObjectQuery
return getGameObjects(client).stream()
.filter(Objects::nonNull)
.filter(predicate)
.distinct()
.toArray(GameObject[]::new);
}

View File

@@ -40,6 +40,7 @@ public class GroundObjectQuery extends TileObjectQuery<GroundObject, GroundObjec
return getGroundObjects(client).stream()
.filter(Objects::nonNull)
.filter(predicate)
.distinct()
.toArray(GroundObject[]::new);
}

View File

@@ -40,6 +40,7 @@ public class WallObjectQuery extends TileObjectQuery<WallObject, WallObjectQuery
return getWallObjects(client).stream()
.filter(Objects::nonNull)
.filter(predicate)
.distinct()
.toArray(WallObject[]::new);
}