Update to Minecraft 1.17.1 (#6097)

This commit is contained in:
Nassim Jahnke
2021-07-07 08:52:40 +02:00
parent 43f52d9c13
commit 7037cd401f
58 changed files with 182 additions and 258 deletions

View File

@@ -59,12 +59,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
}
private long getNextOperation() {
@@ -0,0 +0,0 @@ public class GameProfileCache {
return this.operationCount.incrementAndGet();
}
@Nullable
- public GameProfile get(String name) {
+ public synchronized GameProfile get(String name) { // Paper - synchronize
- public Optional<GameProfile> get(String name) {
+ public synchronized Optional<GameProfile> get(String name) { // Paper - synchronize
String s1 = name.toLowerCase(Locale.ROOT);
GameProfileCache.GameProfileInfo usercache_usercacheentry = (GameProfileCache.GameProfileInfo) this.profilesByName.get(s1);
boolean flag = false;
@@ -76,7 +75,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ this.save(true); // Paper
}
return gameprofile;
return optional;
@@ -0,0 +0,0 @@ public class GameProfileCache {
return arraylist;
}
@@ -98,6 +97,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
} catch (IOException ioexception) {
;
}
-
+ // Paper start
+ };
+ if (asyncSave) {
@@ -106,6 +106,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ save.run();
+ }
+ // Paper end
}
private Stream<GameProfileCache.GameProfileInfo> getTopMRUProfiles(int limit) {