3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-27 00:22:46 +01:00
Paper/nms-patches/EntitySlice.patch
2018-12-26 08:00:00 +11:00

39 Zeilen
1.3 KiB
Diff

--- a/net/minecraft/server/EntitySlice.java
+++ b/net/minecraft/server/EntitySlice.java
@@ -13,7 +13,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;
@@ -35,7 +35,7 @@
protected void a(Class<?> oclass) {
EntitySlice.a.add(oclass);
- Iterator iterator = this.e.iterator();
+ Iterator<T> iterator = this.e.iterator(); // CraftBukkit - decompile error
while (iterator.hasNext()) {
T t0 = iterator.next();
@@ -78,7 +78,7 @@
List<T> 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);
}
@@ -86,7 +86,7 @@
}
public boolean remove(Object object) {
- T t0 = object;
+ T t0 = (T) object; // CraftBukkit - decompile error
boolean flag = false;
Iterator iterator = this.c.iterator();