remove all the rest of the import hunks

This commit is contained in:
Jake Potrebic
2024-12-15 11:42:40 -08:00
parent 62b6e85d1a
commit 8cca65b8ac
12 changed files with 102 additions and 354 deletions

View File

@@ -1,14 +1,5 @@
--- a/net/minecraft/server/players/GameProfileCache.java
+++ b/net/minecraft/server/players/GameProfileCache.java
@@ -17,8 +_,6 @@
import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
-import java.io.Reader;
-import java.io.Writer;
import java.nio.charset.StandardCharsets;
import java.text.DateFormat;
import java.text.ParseException;
@@ -56,6 +_,10 @@
private final AtomicLong operationCount = new AtomicLong();
@Nullable
@@ -135,15 +126,6 @@
}
public void setExecutor(Executor exectutor) {
@@ -193,7 +_,7 @@
try {
Object var9;
- try (Reader reader = Files.newReader(this.file, StandardCharsets.UTF_8)) {
+ try (java.io.Reader reader = Files.newReader(this.file, StandardCharsets.UTF_8)) {
JsonArray jsonArray = this.gson.fromJson(reader, JsonArray.class);
if (jsonArray != null) {
DateFormat dateFormat = createDateFormat();
@@ -206,6 +_,11 @@
return (List<GameProfileCache.GameProfileInfo>)var9;
@@ -169,8 +151,7 @@
String string = this.gson.toJson((JsonElement)jsonArray);
+ Runnable save = () -> { // Paper - Perf: Async GameProfileCache saving
- try (Writer writer = Files.newWriter(this.file, StandardCharsets.UTF_8)) {
+ try (java.io.Writer writer = Files.newWriter(this.file, StandardCharsets.UTF_8)) {
try (Writer writer = Files.newWriter(this.file, StandardCharsets.UTF_8)) {
writer.write(string);
} catch (IOException var9) {
}