From fef0bbe01b492e00db4b1ec9dd37684b628de6ae Mon Sep 17 00:00:00 2001 From: themode Date: Sun, 13 Feb 2022 17:36:06 +0100 Subject: [PATCH] Do not override stream methods --- .../net/minestom/server/utils/ViewEngine.java | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/src/main/java/net/minestom/server/utils/ViewEngine.java b/src/main/java/net/minestom/server/utils/ViewEngine.java index c3811346b..2caedc349 100644 --- a/src/main/java/net/minestom/server/utils/ViewEngine.java +++ b/src/main/java/net/minestom/server/utils/ViewEngine.java @@ -256,13 +256,6 @@ public final class ViewEngine { viewableOption.references().forEach(action); } } - - @Override - public Stream stream() { - synchronized (mutex) { - return viewableOption.references(); - } - } } final class EntitySet extends AbstractSet { @@ -303,17 +296,5 @@ public final class ViewEngine { viewableOption.bitSet.forEach((int id) -> action.accept((Player) Entity.getEntity(id))); } } - - @Override - public Stream stream() { - synchronized (mutex) { - return viewableOption.bitSet.intStream().mapToObj(operand -> (Player) Entity.getEntity(operand)); - } - } - - @Override - public Stream parallelStream() { - return stream().parallel(); - } } }