3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-21 05:50:05 +01:00
Paper/nms-patches/EntitySlice.patch

39 Zeilen
1.3 KiB
Diff

2015-05-25 12:37:24 +02:00
--- a/net/minecraft/server/EntitySlice.java
+++ b/net/minecraft/server/EntitySlice.java
2017-05-14 04:00:00 +02:00
@@ -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;
2018-12-25 22:00:00 +01:00
@@ -35,7 +35,7 @@
2018-12-25 22:00:00 +01:00
protected void a(Class<?> oclass) {
EntitySlice.a.add(oclass);
- Iterator iterator = this.e.iterator();
+ Iterator<T> iterator = this.e.iterator(); // CraftBukkit - decompile error
2018-12-25 22:00:00 +01:00
while (iterator.hasNext()) {
T t0 = iterator.next();
2017-05-14 04:00:00 +02:00
@@ -78,7 +78,7 @@
2018-12-25 22:00:00 +01:00
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);
}
2018-12-25 22:00:00 +01:00
@@ -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();