even even even more work
This commit is contained in:
@@ -17,16 +17,28 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
protected static final Logger LOGGER = LogManager.getLogger();
|
||||
- protected final RegistryID<T> b = new RegistryID<>(256);
|
||||
- protected final BiMap<MinecraftKey, T> c = HashBiMap.create();
|
||||
- private final BiMap<ResourceKey<T>, T> bb = HashBiMap.create();
|
||||
+ protected final RegistryID<T> b = new RegistryID<>(2048); // Paper - use bigger expected size to reduce collisions
|
||||
+ protected final BiMap<MinecraftKey, T> c = HashBiMap.create(2048); // Paper - use bigger expected size to reduce collisions
|
||||
+ private final BiMap<ResourceKey<T>, T> bb = HashBiMap.create(2048); // Paper - use bigger expected size to reduce collisions
|
||||
private final Set<ResourceKey<T>> bc = Sets.newIdentityHashSet();
|
||||
protected Object[] d;
|
||||
private int V;
|
||||
|
||||
private int bd;
|
||||
@@ -0,0 +0,0 @@ public class RegistryMaterials<T> extends IRegistryWritable<T> {
|
||||
this.d = collection.toArray(new Object[collection.size()]);
|
||||
}
|
||||
|
||||
- return this.d[random.nextInt(this.d.length)];
|
||||
+ return (T) this.d[random.nextInt(this.d.length)]; // Paper - Decompile fix
|
||||
- return SystemUtils.a(this.d, random);
|
||||
+ return (T) SystemUtils.a(this.d, random); // Paper - Decompile fix
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -0,0 +0,0 @@ public class RegistryMaterials<T> extends IRegistryWritable<T> {
|
||||
Iterator iterator = registrymaterials.b.iterator();
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
- T t0 = iterator.next();
|
||||
+ T t0 = (T) iterator.next(); // Paper - Decompile fix
|
||||
|
||||
builder.add(Pair.of(registrymaterials.c(t0).get(), t0));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user