diff --git a/src/main/java/net/minestom/server/utils/ViewEngine.java b/src/main/java/net/minestom/server/utils/ViewEngine.java index 2caedc349..9471def44 100644 --- a/src/main/java/net/minestom/server/utils/ViewEngine.java +++ b/src/main/java/net/minestom/server/utils/ViewEngine.java @@ -227,11 +227,11 @@ public final class ViewEngine { Stream sharedInstanceStream = shared.stream().>mapMulti((inst, consumer) -> { var ref = inst.getEntityTracker().references(lastPoint, range, target); ref.forEach(consumer); - }).flatMap(Collection::stream); + }).flatMap(Collection::stream).distinct(); result = Stream.concat(result, sharedInstanceStream); } } - return result.distinct(); + return result; } }