Remove duplicates from object queries
This commit is contained in:
@@ -40,6 +40,7 @@ public class DecorativeObjectQuery extends TileObjectQuery<DecorativeObject, Dec
|
|||||||
return getDecorativeObjects(client).stream()
|
return getDecorativeObjects(client).stream()
|
||||||
.filter(Objects::nonNull)
|
.filter(Objects::nonNull)
|
||||||
.filter(predicate)
|
.filter(predicate)
|
||||||
|
.distinct()
|
||||||
.toArray(DecorativeObject[]::new);
|
.toArray(DecorativeObject[]::new);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ public class GameObjectQuery extends TileObjectQuery<GameObject, GameObjectQuery
|
|||||||
return getGameObjects(client).stream()
|
return getGameObjects(client).stream()
|
||||||
.filter(Objects::nonNull)
|
.filter(Objects::nonNull)
|
||||||
.filter(predicate)
|
.filter(predicate)
|
||||||
|
.distinct()
|
||||||
.toArray(GameObject[]::new);
|
.toArray(GameObject[]::new);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ public class GroundObjectQuery extends TileObjectQuery<GroundObject, GroundObjec
|
|||||||
return getGroundObjects(client).stream()
|
return getGroundObjects(client).stream()
|
||||||
.filter(Objects::nonNull)
|
.filter(Objects::nonNull)
|
||||||
.filter(predicate)
|
.filter(predicate)
|
||||||
|
.distinct()
|
||||||
.toArray(GroundObject[]::new);
|
.toArray(GroundObject[]::new);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ public class WallObjectQuery extends TileObjectQuery<WallObject, WallObjectQuery
|
|||||||
return getWallObjects(client).stream()
|
return getWallObjects(client).stream()
|
||||||
.filter(Objects::nonNull)
|
.filter(Objects::nonNull)
|
||||||
.filter(predicate)
|
.filter(predicate)
|
||||||
|
.distinct()
|
||||||
.toArray(WallObject[]::new);
|
.toArray(WallObject[]::new);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user