summaryrefslogtreecommitdiffstats
path: root/nms-patches/EntitySlice.patch
blob: 3f38104873e0a9dae4b9944aeda89fa227ea24a5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
--- a/net/minecraft/server/EntitySlice.java
+++ b/net/minecraft/server/EntitySlice.java
@@ -12,7 +12,7 @@
 
 public class EntitySlice<T> extends AbstractSet<T> {
 
-    private static final Set<Class<?>> a = Sets.newHashSet();
+    private static final Set<Class<?>> a = Sets.newConcurrentHashSet(); // CraftBukkit
     private final Map<Class<?>, List<T>> b = Maps.newHashMap();
     private final Set<Class<?>> c = Sets.newIdentityHashSet();
     private final Class<T> d;
@@ -40,7 +40,7 @@
             Object object = iterator.next();
 
             if (oclass.isAssignableFrom(object.getClass())) {
-                this.a(object, oclass);
+                this.a((T) object, oclass);
             }
         }
 
@@ -77,7 +77,7 @@
         List list = (List) this.b.get(oclass);
 
         if (list == null) {
-            this.b.put(oclass, Lists.newArrayList(new Object[] { t0}));
+            this.b.put(oclass, Lists.newArrayList(t0));
         } else {
             list.add(t0);
         }
@@ -125,7 +125,7 @@
     }
 
     public Iterator<T> iterator() {
-        return this.e.isEmpty() ? Iterators.emptyIterator() : Iterators.unmodifiableIterator(this.e.iterator());
+        return this.e.isEmpty() ? Iterators.<T>emptyIterator() : Iterators.unmodifiableIterator(this.e.iterator());
     }
 
     public int size() {