Fix MCUtils and other calls to postTaskOnMain

Method changed changed it's role to providing a TickTask object which
isn't automatically scheduled onto the server
This commit is contained in:
Shane Freeder
2019-05-10 18:42:33 +01:00
parent 396186a950
commit 86be055929
7 changed files with 115 additions and 54 deletions

View File

@@ -22,7 +22,7 @@ index a79cba50e..e5e41c662 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index e7d3a5479..6096f309b 100644
index 530457772..630a0271e 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -0,0 +0,0 @@ import java.util.Iterator;
@@ -68,7 +68,7 @@ index e7d3a5479..6096f309b 100644
+
+ if (byteTotal > byteAllowed) {
+ PlayerConnection.LOGGER.warn(this.player.getName() + " tried to send too large of a book. Book Size: " + byteTotal + " - Allowed: "+ byteAllowed + " - Pages: " + pageList.size());
+ minecraftServer.postToMainThread(() -> this.disconnect("Book too large!"));
+ minecraftServer.scheduleOnMain(() -> this.disconnect("Book too large!"));
+ return;
+ }
+ }